garbageData.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package model
  2. type GarbageDataRsp struct {
  3. Code int `json:"code"`
  4. Msg string `json:"msg"`
  5. Data []GarbageDataDetail `json:"data"`
  6. }
  7. type GarbageDataReq struct {
  8. DeviceIds []string `json:"deviceIds"`
  9. }
  10. type GarbageDataDetail struct {
  11. DeviceId string `json:"deviceId"`
  12. StartTime string `json:"startTime"`
  13. EndTime string `json:"endTime"`
  14. PostTime string `json:"postTime"`
  15. BatteryVoltage float32 `json:"batteryVoltage"`
  16. BatteryPercentage float32 `json:"batteryPercentage"`
  17. SensorCount int `json:"sensorCount"`
  18. SensorOne float32 `json:"sensorOne"`
  19. SensorTwo float32 `json:"sensorTwo"`
  20. SensorOnePercentage float32 `json:"sensorOnePercentage"`
  21. SensorTwoPercentage float32 `json:"sensorTwoPercentage"`
  22. WorkTime string `json:"workTime"`
  23. }
  24. type GarbageLoginReq struct {
  25. Username string `json:"username"`
  26. Password string `json:"password"`
  27. }
  28. type GarbageLoginRsp struct {
  29. Code int `json:"code"`
  30. Msg string `json:"msg"`
  31. Data struct {
  32. AccessToken string `json:"access_token"`
  33. } `json:"data"`
  34. }
  35. const GarbageLoginKey = "garbage_login_token"
  36. const GarbageDataKey = "garbage_data_%s"