dust.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright 2019 github.com. All rights reserved.
  2. // Use of this source code is governed by github.com.
  3. package v1
  4. import (
  5. "smart-site-management-gateway/param/base"
  6. "smart-site-management-gateway/pb/v1"
  7. )
  8. type LatestDustMonitorQuery struct {
  9. Sn string `form:"sn" json:"sn"`
  10. Type int32 `form:"type" json:"type"`
  11. }
  12. type LatestDustMonitorDataRequest struct {
  13. base.Header
  14. LatestDustMonitorQuery
  15. }
  16. type LatestDustMonitorDataResponse struct {
  17. base.Result
  18. Data v1.DustMonitorData `json:"data"`
  19. }
  20. type DustMonitorHistoryQuery struct {
  21. Sn string `form:"sn" json:"sn"`
  22. Type int32 `form:"type" json:"type"`
  23. Time int64 `form:"time" json:"time"`
  24. }
  25. type DustMonitorHistoryRequest struct {
  26. base.Header
  27. DustMonitorHistoryQuery
  28. }
  29. type DustMonitorHistoryResponse struct {
  30. base.Result
  31. Data v1.DustMonitorHistoryReply `json:"data"`
  32. }
  33. type DustListQuery struct {
  34. Page int32 `form:"page"`
  35. PageSize int32 `form:"page_size"`
  36. }
  37. type DustListRequest struct {
  38. base.Header
  39. DustListQuery
  40. }
  41. type DustListResponse struct {
  42. base.Result
  43. Data v1.DustListReply `json:"data"`
  44. }
  45. type DustAqiQuery struct {
  46. Sn string `form:"sn"`
  47. }
  48. type DustAqiRequest struct {
  49. base.Header
  50. DustAqiQuery
  51. }
  52. type DustAqiData struct {
  53. Aqi int `json:"aqi"`
  54. }
  55. type DustAqiResponse struct {
  56. base.Result
  57. Data DustAqiData `json:"data"`
  58. }