project.go 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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 ProjectInfoItem struct {
  9. // 字段名称
  10. Name string `form:"name" json:"name"`
  11. // 字段值
  12. Value string `form:"value" json:"value"`
  13. }
  14. type ProjectChangeBody struct {
  15. List []ProjectInfoItem `form:"list" json:"list"`
  16. }
  17. type ProjectChangeRequest struct {
  18. base.Header
  19. ProjectChangeBody
  20. }
  21. type ProjectChangeResponse struct {
  22. base.Result
  23. }
  24. type ProjectInfoForChangeRequest struct {
  25. base.Header
  26. }
  27. type ProjectInfoForChangeResponse struct {
  28. base.Result
  29. Data v1.ProjectInfoForChangeReply `json:"data"`
  30. }
  31. type ProjectChangeInfoListQuery struct {
  32. Page int32 `form:"page"`
  33. }
  34. type ProjectChangeInfoListRequest struct {
  35. base.Header
  36. ProjectChangeInfoListQuery
  37. }
  38. type ProjectChangeInfoListResponse struct {
  39. base.Result
  40. Data v1.ProjectChangeInfoListReply `json:"data"`
  41. }
  42. type DeviceApproveBody struct {
  43. // 设备id
  44. Id int64 `form:"id"`
  45. // true 通过 false 不通过
  46. Status bool `form:"status"`
  47. // 审批回复
  48. Feedback string `form:"feedback"`
  49. }
  50. type DeviceApproveRequest struct {
  51. base.Header
  52. DeviceApproveBody
  53. }
  54. type DeviceApproveResponse struct {
  55. base.Result
  56. }
  57. type DeviceListQuery struct {
  58. // 审核状态 0 待审核 1 通过 2 未通过
  59. Status int `form:"status"`
  60. Filter string `form:"filter"`
  61. Page int32 `form:"page"`
  62. PageSize int64 `form:"page_size"`
  63. }
  64. type DeviceListRequest struct {
  65. base.Header
  66. DeviceListQuery
  67. }
  68. type DeviceListResponse struct {
  69. base.Result
  70. Data v1.DeviceListReply `json:"data"`
  71. }
  72. type ProjectInfoRequest struct {
  73. base.Header
  74. }
  75. type ProjectInfoResponse struct {
  76. base.Result
  77. Data v1.ProjectInfoReply `json:"data"`
  78. }
  79. type ProjectDeviceStatisticsRequest struct {
  80. base.Header
  81. }
  82. type ProjectDeviceStatisticsResponse struct {
  83. base.Result
  84. Data v1.ProjectDeviceStatisticsReply `json:"data"`
  85. }
  86. type ProjectProgressRequest struct {
  87. base.Header
  88. }
  89. type ProjectProgressResponse struct {
  90. base.Result
  91. Data v1.ProjectProgressReply `json:"data"`
  92. }
  93. type ProjectProgressAddBody struct {
  94. Name string `form:"name"`
  95. ExpectStartTime int64 `form:"expect_start_time"`
  96. ExpectEndTime int64 `form:"expect_end_time"`
  97. }
  98. type ProjectProgressAddRequest struct {
  99. base.Header
  100. ProjectProgressAddBody
  101. }
  102. type ProjectProgressAddResponse struct {
  103. base.Result
  104. Data v1.ProjectProgressAddReply `json:"data"`
  105. }
  106. type ProjectProgressDelPath struct {
  107. Id int64 `uri:"id"`
  108. }
  109. type ProjectProgressDelRequest struct {
  110. base.Header
  111. ProjectProgressDelPath
  112. }
  113. type ProjectProgressDelResponse struct {
  114. base.Result
  115. }
  116. type ProjectProgressSetBody struct {
  117. Id int64 `form:"id"`
  118. Image string `form:"image"`
  119. RealityStartTime int64 `form:"reality_start_time" json:"reality_start_time"`
  120. RealityEndTime int64 `form:"reality_end_time" json:"reality_end_time"`
  121. }
  122. type ProjectProgressSetRequest struct {
  123. base.Header
  124. ProjectProgressSetBody
  125. }
  126. type ProjectProgressSetResponse struct {
  127. base.Result
  128. }
  129. type DeviceVideoChannelQuery struct {
  130. Sn string `form:"sn"`
  131. }
  132. type DeviceVideoChannelRequest struct {
  133. base.Header
  134. DeviceVideoChannelQuery
  135. }
  136. type DeviceVideoChannelResponse struct {
  137. base.Result
  138. Data v1.DeviceVideoChannelReply `json:"data"`
  139. }
  140. type ProjectSetPicBody struct {
  141. // 0 平面图 1 效果图
  142. PicType int32 `form:"pic_type"`
  143. PicUrl []string `form:"pic_url"`
  144. }
  145. type ProjectSetPicRequest struct {
  146. base.Header
  147. ProjectSetPicBody
  148. }
  149. type ProjectSetPicResponse struct {
  150. base.Result
  151. }
  152. type ProjectUpdateBody struct {
  153. Name string `form:"name"`
  154. ShortName string `form:"short_name"`
  155. Location string `form:"location"`
  156. }
  157. type ProjectUpdateRequest struct {
  158. base.Header
  159. ProjectUpdateBody
  160. }
  161. type ProjectUpdateResponse struct {
  162. base.Result
  163. }