fwhProDomain.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package domain
  2. type FwhPageResponse[T any] struct {
  3. Code int `json:"code"`
  4. Message string `json:"message"`
  5. Result []T `json:"result"`
  6. Success bool `json:"success"`
  7. Total uint64 `json:"total"`
  8. }
  9. type AlarmSnapshotInfo struct {
  10. Id int64 `json:"id"`
  11. CodeType int32 `json:"codeType"` // 作用未知
  12. FileName string `json:"fileName"`
  13. FileUrl string `json:"fileUrl"`
  14. LinkId string `json:"linkId"` // site SN
  15. LogTime string `json:"logTime"` // format YYYY-MM-DD
  16. SerialNumber string `json:"serialNumber"`
  17. StartTime string `json:"startTime"` // format YYYY-MM-DD HH:mm:SS
  18. EndTime string `json:"endTime"` // format YYYY-MM-DD HH:mm:SS
  19. Status int `json:"status"` // 1-完成
  20. CompleteTime string `json:"completeTime"` // format YYYY-MM-DD HH:mm:SS
  21. }
  22. type EventAlarmItem struct {
  23. ID *string `json:"id"` // UUID or null
  24. CmdType string `json:"cmdType"` // 命令说明
  25. CmdName string `json:"cmdName"` // 命令类型 exp:201...
  26. GatewayId string `json:"gatewayId"` // SN
  27. GatewayType *string `json:"gatewayType"`
  28. GatewayStatus *string `json:"gatewayStatus"`
  29. ActiveStatus *string `json:"activeStatus"` // 激活状态
  30. ActiveTime *string `json:"activeTime"` // 激活时间
  31. AlarmCode string `json:"alarmCode"` // 告警码,事件则为0
  32. LogName string `json:"logName"`
  33. LogType string `json:"logType"` // 日志类型 0-事件 1-告警
  34. LogData string `json:"logData"` // JSON数据
  35. LogTime string `json:"logTime"` // 设备时间(日志上传时间,告警未结束为开始时间,结束为结束时间)
  36. Time string `json:"time"` // UTC时间
  37. StartTime string `json:"startTime"` // 事件或告警的开始时间
  38. EndTime *string `json:"endTime"` // 告警结束时间,事件没有结束时间为null,告警枚举结束时间则未结束
  39. }
  40. type ShutdownRecord struct {
  41. GatewayId string `json:"gatewayId"` // SN
  42. ShutdownType int `json:"shutdownType"` // 1-系统停机 2-aPower停机
  43. Country string `json:"country"` // 国家
  44. Province string `json:"province"` // 州/省
  45. ActiveTime string `json:"activeTime"` // 激活时间
  46. DeviceTime string `json:"deviceTime"` // 告警时的设备时间 (Shutdown开始时间)
  47. }