common.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package response
  2. import "server/dao"
  3. type PageResult struct {
  4. List interface{} `json:"list"`
  5. Total int64 `json:"total"`
  6. Page int `json:"page"`
  7. PageSize int `json:"pageSize"`
  8. }
  9. type EnvDev struct {
  10. Sn string `json:"sn"` //设备SN
  11. Address string `json:"Address"` //设备地址
  12. Name string `json:"name"` //设备名称
  13. TaskTime uint `json:"taskTime"` //设备采集周期,单位分钟
  14. WaitTime uint `json:"waitTime"` //等待时间,单位秒
  15. SerialId int8 `json:"serialId"` //串口id
  16. }
  17. type LampDev struct {
  18. Sn string `json:"sn"` //设备SN
  19. Address string `json:"address"` //设备地址
  20. Name string `json:"name"` //设备名称
  21. RadarId int8 `json:"radarId"` //雷达id(用于在雷达监测到来车后,控制雷达在的那一路的单灯控制器)
  22. SerialId int8 `json:"serialId"` // 串口id
  23. }
  24. type DeviceFileData struct {
  25. EnvDev []EnvDev `json:"envDev"`
  26. LampDev []LampDev `json:"lampDev"`
  27. }
  28. type DeviceGenres struct {
  29. dao.DeviceGenre
  30. Count int
  31. }