device.go 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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-supplier-management-gateway/param/base"
  6. "smart-supplier-management-gateway/pb/v1"
  7. )
  8. type DeviceTypeAddBody struct {
  9. ProviderId int64 `form:"provider_id" json:"provider_id"`
  10. // 设备类型
  11. DeviceType int32 `form:"device_type" json:"device_type"`
  12. // 备注
  13. Comment string `form:"comment" json:"comment"`
  14. // 经办人
  15. Agent string `form:"agent" json:"agent"`
  16. // 经办人电话
  17. AgentPhone string `form:"agent_phone" json:"agent_phone"`
  18. // 诚信经营承诺书
  19. Appendix []string `form:"appendix" json:"appendix"`
  20. }
  21. type DeviceTypeAddRequest struct {
  22. base.Header
  23. DeviceTypeAddBody
  24. }
  25. type DeviceTypeAddResponse struct {
  26. base.Result
  27. Data v1.DeviceTypeAddReply `json:"data"`
  28. }
  29. type DeviceTypeTestingAddBody struct {
  30. ProviderId int64 `form:"provider_id" json:"provider_id"`
  31. // 设备类型
  32. DeviceType int32 `form:"device_type" json:"device_type"`
  33. // 备注
  34. Comment string `form:"comment" json:"comment"`
  35. // 经办人
  36. Agent string `form:"agent" json:"agent"`
  37. // 经办人电话
  38. AgentPhone string `form:"agent_phone" json:"agent_phone"`
  39. //
  40. Appendix []string `form:"appendix" json:"appendix"`
  41. }
  42. type DeviceTypeTestingAddRequest struct {
  43. base.Header
  44. DeviceTypeTestingAddBody
  45. }
  46. type DeviceTypeTestingAddResponse struct {
  47. base.Result
  48. Data v1.DeviceTypeTestingAddReply `json:"data"`
  49. }
  50. type DeviceAddBody struct {
  51. ProjectId int64 `json:"project_id" form:"project_id"`
  52. Name string `json:"name" form:"name"`
  53. Sn string `json:"sn" form:"sn"`
  54. Lon float32 `json:"lon" form:"lon"`
  55. Lat float32 `json:"lat" form:"lat"`
  56. ProjectCode string `form:"project_code" json:"project_code"`
  57. ProjectName string `form:"project_name" json:"project_name"`
  58. // 设备型号
  59. DeviceModel string `form:"device_model" json:"device_model"`
  60. // 生产厂商
  61. Manufacturer string `form:"manufacturer" json:"manufacturer"`
  62. // 批次
  63. Batch string `form:"batch" json:"batch"`
  64. // 对接单位
  65. Unit string `form:"unit" json:"unit"`
  66. // 联系人
  67. Person string `form:"person" json:"person"`
  68. // 联系电话
  69. Phone string `form:"phone" json:"phone"`
  70. // 备注
  71. Remark string `form:"remark" json:"remark"`
  72. // url视屏地址 仅扬尘有
  73. Url string `form:"url" json:"url"`
  74. Kind int32 `form:"kind" json:"kind"`
  75. SubKind int32 `form:"sub_kind" json:"sub_kind"`
  76. }
  77. type DeviceAddRequest struct {
  78. base.Header
  79. DeviceAddBody
  80. }
  81. type DeviceAddResponse struct {
  82. base.Result
  83. Data v1.DeviceAddReply `json:"data"`
  84. }
  85. type DeviceDelBody struct {
  86. Id int64 `form:"id"`
  87. Reason string `form:"reason"`
  88. }
  89. type DeviceDelRequest struct {
  90. base.Header
  91. DeviceDelBody
  92. }
  93. type DeviceDelResponse struct {
  94. base.Result
  95. }
  96. type DeviceTypeListQuery struct {
  97. ListType uint32 `form:"list_type" json:"list_type"`
  98. DeviceCode int32 `form:"device_code" json:"device_code"`
  99. }
  100. type DeviceTypeListRequest struct {
  101. base.Header
  102. DeviceTypeListQuery
  103. }
  104. type DeviceTypeListResponse struct {
  105. base.Result
  106. Data []*v1.DeviceTypeItem `json:"data"`
  107. }
  108. type DeviceListQuery struct {
  109. // 审核状态 0 待审核 1 通过 2 未通过
  110. FilterStatus string `form:"filter_status"`
  111. ProjectId int64 `form:"project_id"`
  112. Filter string `form:"filter"`
  113. Page int32 `form:"page"`
  114. }
  115. type DeviceListRequest struct {
  116. base.Header
  117. DeviceListQuery
  118. }
  119. type DeviceListResponse struct {
  120. base.Result
  121. Data v1.DeviceListReply `json:"data"`
  122. }
  123. type DeviceDelJobListQuery struct {
  124. Page int32 `form:"page"`
  125. // 审核状态 0 待审核 1 通过 2 未通过
  126. FilterStatus string `form:"filter_status"`
  127. Filter string `form:"filter"`
  128. }
  129. type DeviceDelJobListRequest struct {
  130. base.Header
  131. DeviceDelJobListQuery
  132. }
  133. type DeviceDelJobListResponse struct {
  134. base.Result
  135. Data v1.DeviceDelJobListReply `json:"data"`
  136. }
  137. type ProjectListRequest struct {
  138. base.Header
  139. }
  140. type ProjectListResponse struct {
  141. base.Result
  142. Data []*v1.ProjectItem `json:"data"`
  143. }
  144. type ChannelAddBody struct {
  145. Sn string `form:"sn"`
  146. ChannelCount int32 `form:"channel_count"`
  147. }
  148. type ChannelAddRequest struct {
  149. base.Header
  150. ChannelAddBody
  151. }
  152. type ChannelAddResponse struct {
  153. base.Result
  154. }
  155. type ChannelListQuery struct {
  156. Sn string `form:"sn"`
  157. ChannelNo string `form:"channel_no"`
  158. Page int32 `form:"page"`
  159. }
  160. type ChannelListRequest struct {
  161. base.Header
  162. ChannelListQuery
  163. }
  164. type ChannelListResponse struct {
  165. base.Result
  166. Data v1.ChannelListReply `json:"data"`
  167. }
  168. type ChannelUpdateBody struct {
  169. Id int64 `form:"id"`
  170. Name string `form:"name"`
  171. }
  172. type ChannelUpdateRequest struct {
  173. base.Header
  174. ChannelUpdateBody
  175. }
  176. type ChannelUpdateResponse struct {
  177. base.Result
  178. }
  179. type VedioAddBody struct {
  180. ProjectId int64 `form:"project_id"`
  181. VedioType int32 `form:"vedio_type"`
  182. Name string `form:"name"`
  183. ChannelCount int32 `form:"channel_count"`
  184. }
  185. type VedioAddRequest struct {
  186. base.Header
  187. VedioAddBody
  188. }
  189. type VedioAddResponse struct {
  190. base.Result
  191. Data v1.VedioAddReply `json:"data"`
  192. }
  193. type VedioListQuery struct {
  194. // 审核状态 0 待审核 1 通过 2 未通过
  195. FilterStatus string `form:"filter_status"`
  196. ProjectId int64 `form:"project_id"`
  197. Filter string `form:"filter"`
  198. Page int32 `form:"page"`
  199. }
  200. type VedioListRequest struct {
  201. base.Header
  202. VedioListQuery
  203. }
  204. type VedioListResponse struct {
  205. base.Result
  206. Data v1.VedioListReply `json:"data"`
  207. }
  208. type DeviceAllTypeListResponse struct {
  209. base.Result
  210. Data v1.DeviceTypeListReply `json:"data"`
  211. }