28 lines
1.1 KiB
Go
28 lines
1.1 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// SensorData 传感器数据结构
|
|
type SensorData struct {
|
|
ID int64 `json:"id"`
|
|
Timestamp time.Time `json:"timestamp"`
|
|
WindSpeed int `json:"wind_speed"` // 风速
|
|
WindForce int `json:"wind_force"` // 风力
|
|
WindDirection8 int `json:"wind_direction_8"` // 8方位风向
|
|
WindDirection360 int `json:"wind_direction_360"` // 360度风向
|
|
Humidity int `json:"humidity"` // 湿度
|
|
Temperature int `json:"temperature"` // 温度
|
|
AtmPressure int `json:"atm_pressure"` // 大气压
|
|
SolarRadiation int `json:"solar_radiation"` // 太阳辐射
|
|
Rainfall int `json:"rainfall"` // 累计雨量
|
|
}
|
|
|
|
// AggregatedData 聚合数据结构
|
|
type AggregatedData struct {
|
|
Timestamp time.Time `json:"timestamp"`
|
|
AvgTemperature float64 `json:"avg_temperature"`
|
|
Rainfall float64 `json:"rainfall"`
|
|
AvgHumidity float64 `json:"avg_humidity"`
|
|
AvgWindSpeed float64 `json:"avg_wind_speed"`
|
|
}
|