33 lines
932 B
Go
33 lines
932 B
Go
package types
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Device ...
|
|
type Device struct {
|
|
DeviceID string `json:"device_id"`
|
|
DeviceName *string `json:"device_name"`
|
|
DeviceLocation *string `json:"device_location"`
|
|
DeviceLastContact time.Time `json:"device_last_contact"`
|
|
CreationDate time.Time `json:"creation_date"`
|
|
}
|
|
|
|
// Humidity ...
|
|
type Humidity struct {
|
|
HumidityID string `json:"humidity_id"`
|
|
HumidityValue float64 `json:"humidity_value,string"`
|
|
HumidityDate time.Time `json:"humidity_date"`
|
|
SensorID string `json:"sensor_id"`
|
|
CreationDate time.Time `json:"creation_date"`
|
|
}
|
|
|
|
// Temperature ...
|
|
type Temperature struct {
|
|
TemperatureID string `json:"temperature_id"`
|
|
TemperatureValue float64 `json:"temperature_value,string"`
|
|
TemperatureDate time.Time `json:"temperature_date"`
|
|
SensorID string `json:"sensor_id"`
|
|
CreationDate time.Time `json:"creation_date"`
|
|
}
|