39 lines
815 B
Go
39 lines
815 B
Go
package database
|
|
|
|
import "time"
|
|
|
|
type VariableType struct {
|
|
Label string `json:"label"`
|
|
Variable string `json:"variable"`
|
|
Unit string `json:"unit"`
|
|
Value interface{} `json:"value,omitempty"`
|
|
Status string `json:"status,omitempty"`
|
|
}
|
|
|
|
type Measurement struct {
|
|
Time time.Time
|
|
Application string
|
|
Device string
|
|
Attributes map[string]interface{}
|
|
Values map[string]VariableType
|
|
}
|
|
|
|
// Simplified structures for backward compatibility
|
|
type DeviceType struct {
|
|
Label string
|
|
ModelIdentifier string
|
|
Attributes map[string]interface{}
|
|
}
|
|
|
|
type Application struct {
|
|
Label string
|
|
Attributes map[string]interface{}
|
|
}
|
|
|
|
type Device struct {
|
|
Label string
|
|
Application Application
|
|
DeviceType DeviceType
|
|
Attributes map[string]interface{}
|
|
}
|