statistics.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package dto
  2. type GetStatisticInfoRequest struct {
  3. AppId int `json:"app_id"`
  4. }
  5. type GetStatisticInfoResponse struct {
  6. StatisticInfo
  7. }
  8. type StatisticInfo struct {
  9. DeviceCount int64 `json:"device_count"`
  10. DeviceOnlineCount int64 `json:"device_online_count"`
  11. DeviceDownCount int64 `json:"device_down_count"`
  12. AlarmCount int64 `json:"alarm_count"`
  13. UntreatedAlarmCount int64 `json:"untreated_alarm_count"`
  14. LinkCount int64 `json:"link_count"`
  15. NowDateLinkCount int64 `json:"now_date_link_count"`
  16. }
  17. type GetDevStatusRequest struct {
  18. AppId int `json:"app_id"`
  19. LimitPage
  20. }
  21. type GetDevStatusResponse struct {
  22. List []DevStatusInfo `json:"list"`
  23. Total int64 `json:"total"`
  24. }
  25. type DevStatusInfo struct {
  26. DeviceId int `gorm:"column:deviceId"`
  27. DeviceName string `gorm:"column:deviceName"`
  28. StationName string `gorm:"column:station_name"`
  29. AppName string `gorm:"column:app_name"`
  30. Mpinfo []MpinfoList `json:"mpinfo" gorm:"-"`
  31. Online int `gorm:"column:online"`
  32. }
  33. type MpinfoList struct {
  34. MpName string `json:"mp_name"`
  35. MpZone string `json:"mp_zone"`
  36. MpPosition string `json:"mp_position"`
  37. }