device.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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 DeviceDockingBody struct {
  9. DeviceType int32 `form:"device_type" json:"device_type"`
  10. }
  11. type DeviceDockingRequest struct {
  12. base.Header
  13. DeviceDockingBody
  14. }
  15. type DeviceDockingResponse struct {
  16. base.Result
  17. Data v1.DeviceDockingReply `json:"data"`
  18. }
  19. type DeviceAddBody struct {
  20. ProjectId int64 `json:"project_id" form:"project_id"`
  21. Name string `json:"name" form:"name"`
  22. Sn string `json:"sn" form:"sn"`
  23. Addr string `json:"addr" form:"addr"`
  24. Type int32 `json:"type" form:"type"`
  25. Lon float32 `json:"lon" form:"lon"`
  26. Lat float32 `json:"lat" form:"lat"`
  27. XCoord float32 `json:"x_coord" form:"x_coord"`
  28. YCoord float32 `json:"y_coord" form:"y_coord"`
  29. CameraCount int32 `json:"camera_count" form:"camera_count"`
  30. }
  31. type DeviceAddRequest struct {
  32. base.Header
  33. DeviceAddBody
  34. }
  35. type DeviceAddResponse struct {
  36. base.Result
  37. Data v1.DeviceAddReply `json:"data"`
  38. }
  39. type DeviceDelBody struct {
  40. Id int64 `form:"id"`
  41. Reason string `form:"reason"`
  42. }
  43. type DeviceDelRequest struct {
  44. base.Header
  45. DeviceDelBody
  46. }
  47. type DeviceDelResponse struct {
  48. base.Result
  49. }
  50. type DeviceTypeListQuery struct {
  51. IsAll bool `form:"is_all"`
  52. // 0 待对接测试 1 测试通过 2对接测试未通过 3. 审核通过 3 审核未通过
  53. StatusFilters string `form:"status_filters"`
  54. IncludeVedio bool `form:"include_vedio"`
  55. }
  56. type DeviceTypeListRequest struct {
  57. base.Header
  58. DeviceTypeListQuery
  59. }
  60. type DeviceTypeListResponse struct {
  61. base.Result
  62. Data []*v1.DeviceTypeItem `json:"data"`
  63. }
  64. type DeviceListQuery struct {
  65. // 审核状态 0 待审核 1 通过 2 未通过 3 待拆机 4 拆机审核未通过
  66. FilterStatus string `form:"filter_status"`
  67. ProjectId int64 `form:"project_id"`
  68. Filter string `form:"filter"`
  69. Page int32 `form:"page"`
  70. TypeCode int `form:"type_code"`
  71. CanDel bool `form:"can_del"`
  72. }
  73. type DeviceListRequest struct {
  74. base.Header
  75. DeviceListQuery
  76. }
  77. type DeviceListResponse struct {
  78. base.Result
  79. Data v1.DeviceListReply `json:"data"`
  80. }
  81. type DeviceDelJobListQuery struct {
  82. Page int32 `form:"page"`
  83. // 审核状态 0 待审核 1 通过 2 未通过
  84. FilterStatus string `form:"filter_status"`
  85. Filter string `form:"filter"`
  86. }
  87. type DeviceDelJobListRequest struct {
  88. base.Header
  89. DeviceDelJobListQuery
  90. }
  91. type DeviceDelJobListResponse struct {
  92. base.Result
  93. Data v1.DeviceDelJobListReply `json:"data"`
  94. }
  95. type ProjectListRequest struct {
  96. base.Header
  97. }
  98. type ProjectListResponse struct {
  99. base.Result
  100. Data []*v1.ProjectItem `json:"data"`
  101. }
  102. type ChannelAddBody struct {
  103. Sn string `form:"sn"`
  104. ChannelCount int32 `form:"channel_count"`
  105. }
  106. type ChannelAddRequest struct {
  107. base.Header
  108. ChannelAddBody
  109. }
  110. type ChannelAddResponse struct {
  111. base.Result
  112. }
  113. type ChannelListQuery struct {
  114. Sn string `form:"sn"`
  115. ChannelNo string `form:"channel_no"`
  116. Page int32 `form:"page"`
  117. }
  118. type ChannelListRequest struct {
  119. base.Header
  120. ChannelListQuery
  121. }
  122. type ChannelListResponse struct {
  123. base.Result
  124. Data v1.ChannelListReply `json:"data"`
  125. }
  126. type ChannelUpdateBody struct {
  127. Id int64 `form:"id"`
  128. Name string `form:"name"`
  129. }
  130. type ChannelUpdateRequest struct {
  131. base.Header
  132. ChannelUpdateBody
  133. }
  134. type ChannelUpdateResponse struct {
  135. base.Result
  136. }
  137. type VedioAddBody struct {
  138. ProjectId int64 `form:"project_id"`
  139. VedioType int32 `form:"vedio_type"`
  140. Name string `form:"name"`
  141. ChannelCount int32 `form:"channel_count"`
  142. }
  143. type VedioAddRequest struct {
  144. base.Header
  145. VedioAddBody
  146. }
  147. type VedioAddResponse struct {
  148. base.Result
  149. Data v1.VedioAddReply `json:"data"`
  150. }
  151. type VedioListQuery struct {
  152. // 审核状态 0 待审核 1 通过 2 未通过
  153. FilterStatus string `form:"filter_status"`
  154. ProjectId int64 `form:"project_id"`
  155. Filter string `form:"filter"`
  156. Page int32 `form:"page"`
  157. }
  158. type VedioListRequest struct {
  159. base.Header
  160. VedioListQuery
  161. }
  162. type VedioListResponse struct {
  163. base.Result
  164. Data v1.VedioListReply `json:"data"`
  165. }
  166. type DeviceAllTypeListResponse struct {
  167. base.Result
  168. Data v1.DeviceTypeListReply `json:"data"`
  169. }