43 lines
1.2 KiB
Go
43 lines
1.2 KiB
Go
package types
|
|
|
|
import "time"
|
|
|
|
// Temperature ...
|
|
type Temperature struct {
|
|
TemperatureID string `json:"temperature_id" xml:"temperature_id"`
|
|
TemperatureValue float64 `json:"temperature_value,string" xml:"temperature_value,string"`
|
|
TemperatureFromDate time.Time `json:"temperature_from_date" xml:"temperature_from_date"`
|
|
TemperatureTillDate time.Time `json:"temperature_till_date" xml:"temperature_till_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"`
|
|
}
|
|
|
|
func (t *Temperature) GetCreationDate() *time.Time {
|
|
return t.CreationDate
|
|
}
|
|
|
|
func (t *Temperature) GetID() string {
|
|
return t.TemperatureID
|
|
}
|
|
|
|
func (t *Temperature) GetSensorID() string {
|
|
return t.SensorID
|
|
}
|
|
|
|
func (t *Temperature) GetValue() float64 {
|
|
return t.TemperatureValue
|
|
}
|
|
|
|
func (t *Temperature) SetTillDate(date time.Time) {
|
|
t.TemperatureTillDate = date
|
|
}
|
|
|
|
func (t *Temperature) SetCreationDate(date *time.Time) {
|
|
t.CreationDate = date
|
|
}
|
|
|
|
func (t *Temperature) SetUpdateDate(date *time.Time) {
|
|
t.UpdateDate = date
|
|
}
|