PKGBUILD/pkg/types/measuredValue.go
Markus Pesch 4931c63c10
fix: add postgres backend
changes:
- Add postgres backend
- Modified or added table attributes.
  UpdateDate, ForeignKeys, Booleans
- Fix test for sqlite and postgres. Compare json instead the struct.
2020-06-01 22:50:05 +02:00

19 lines
655 B
Go

package types
import (
"time"
)
// MeasuredValue represent a value provided by a measuring instrument. For
// example from a sensor. It can contains different types, for example humidity
// or temperature.
type MeasuredValue struct {
ID string `json:"id" xml:"id"`
Value float64 `json:"value,string" xml:"value,string"`
ValueType string `json:"value_type" xml:"value_type"`
Date time.Time `json:"date" xml:"date"`
SensorID string `json:"sensor_id" xml:"sensor_id"`
CreationDate time.Time `json:"creation_date" xml:"creation_date"`
UpdateDate *time.Time `json:"update_date" xml:"update_date"`
}