Files
zmkgC/api/saft_hat/entity.go
2025-07-07 20:11:59 +08:00

40 lines
2.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package saft_hat
import "time"
type Device struct {
DevNum string `json:"devNum" dc:"设备编号"`
DevName string `json:"devName" dc:"设备名称"`
Status int `json:"status" dc:"状态"`
CreateTime time.Time `json:"createTime" dc:"添加时间"`
UpdateTime time.Time `json:"updateTime" dc:"修改时间"`
ProjectID int64 `json:"projectId" dc:"项目id"`
Temperature float64 `json:"temperature" dc:"设备采集温度"`
Humidity float64 `json:"humidity" dc:"设备采集湿度"`
Posture int `json:"posture" dc:"姿势1表示正常-1表示脱帽-2表示倒地"`
BatteryTemp float64 `json:"batteryTemp" dc:"电池温度"`
FixedBy string `json:"fixedBy" dc:"定位方"`
BatteryLevel float64 `json:"batteryLevel" dc:"电量"`
IsLowBattery int `json:"isLowBattery" dc:"是否低电量 1为低电量0为正常"`
}
type Location struct {
DevNum string `json:"devNum" dc:"设备编号"`
Time string `json:"time" dc:"时间"`
Alarm *int `json:"alarm" dc:"告警信息"`
Status *int `json:"status" dc:"状态"`
Latitude float64 `json:"latitude" dc:"纬度"`
Longitude float64 `json:"longitude" dc:"经度"`
Elevation *int16 `json:"elevation" dc:"海拔"`
Speed *int16 `json:"speed" dc:"速度"`
Direction *int16 `json:"direction" dc:"方向"`
Mileage *int64 `json:"mileage" dc:"里程数"`
AccEnable *bool `json:"accEnable" dc:"ACC开关"`
LocateEnable *bool `json:"locateEnable" dc:"定位开关"`
LatitudeType *int8 `json:"latitudeType" dc:"纬度类型"` // 0:北纬, 1:南纬
LongitudeType *int8 `json:"longitudeType" dc:"经度类型"` // 0:东经, 1:西经
SpeedingWarn *bool `json:"speedingWarn" dc:"超速报警"`
PowerVoltageWarn *bool `json:"powerVoltageWarn" dc:"电压告警"`
PowerFailure *bool `json:"powerFailure" dc:"电源掉电"`
}