device.proto 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "smart-government-management/pb/v1";
  6. message DeviceAllTypeListRequest {
  7. }
  8. message DeviceAllTypeItem {
  9. int64 id = 1;
  10. int32 type_code = 4;
  11. string type_name = 5;
  12. }
  13. message DeviceAllTypeListReply {
  14. repeated DeviceAllTypeItem list = 1;
  15. }
  16. message DeviceTypeListRequest {
  17. string filter = 1;
  18. repeated int32 filter_status = 2;
  19. int32 page = 3;
  20. }
  21. message DeviceTypeItem {
  22. int64 id = 1;
  23. string provider_name = 2;
  24. string social_code = 3;
  25. // 设备类型编码
  26. int32 type_code = 4;
  27. string type_name = 5;
  28. // 申请时间
  29. string apply_time = 6;
  30. // 开发者建议
  31. string comment = 7;
  32. // 开发者审批时间
  33. string develop_approve_time = 8;
  34. // 0 待审核 1 对接测试通过 2 对接测试未通过 3 政府审核通过 4 政府审核未通过
  35. int32 status = 9;
  36. // 政府审批时间
  37. string approve_time = 10;
  38. // 政府审批回复
  39. string feedback = 11;
  40. }
  41. message DeviceTypeListReply {
  42. int64 total = 1;
  43. int32 page_size = 2;
  44. int32 page = 3;
  45. repeated DeviceTypeItem list = 4;
  46. }
  47. message DeviceListRequest {
  48. int64 provider_id = 1;
  49. // 状态过滤 审核状态 0 待审核 1 项目通过 2 项目未通过
  50. repeated int32 status_filters = 2;
  51. int32 page = 3;
  52. int64 project_id = 4;
  53. string filter = 5;
  54. int32 type_code = 6;
  55. bool is_all = 7;
  56. bool can_del = 8;
  57. }
  58. message DeviceItem {
  59. int64 id = 1;
  60. string social_code = 2;
  61. // 设备类型编码
  62. int32 type_code = 3;
  63. string type_name = 4;
  64. // 申请时间
  65. string apply_time = 5;
  66. // 审批时间
  67. string approve_time = 6;
  68. // 0 待审核 1 项目通过 2 项目不通过
  69. int32 status = 7;
  70. string project_name = 8;
  71. // 安检备案号
  72. string safety_record_no = 9;
  73. // 0 离线 1 在线
  74. int32 state = 10;
  75. string sn = 11;
  76. string key = 12;
  77. string provider_name = 13;
  78. string name = 14;
  79. double lon = 15;
  80. double lat = 16;
  81. }
  82. message DeviceListReply {
  83. int64 total = 1;
  84. int32 page_size = 2;
  85. int32 page = 3;
  86. repeated DeviceItem list = 4;
  87. }
  88. // 开发者审批对接设备
  89. message DockingApproveRequest {
  90. // 供应商设备类型id
  91. int32 id = 1;
  92. // 开发者建议
  93. string comment = 2;
  94. // true 测试通过 false 测试不通过
  95. bool status = 3;
  96. }
  97. message DockingApproveReply {
  98. }
  99. message DeviceDelJobItem {
  100. int64 id = 1;
  101. string social_code = 2;
  102. // 设备类型编码
  103. int32 type_code = 3;
  104. string type_name = 4;
  105. // 申请时间
  106. string apply_time = 5;
  107. // 审批时间
  108. string approve_time = 6;
  109. // 0 待审核 1 通过 2 项目不通过
  110. int32 status = 7;
  111. // 项目名称
  112. string project_name = 8;
  113. // 安检备案号
  114. string safety_record_no = 9;
  115. string provider_name = 10;
  116. string sn = 11;
  117. string reason = 12;
  118. string feedback = 13;
  119. string name = 14;
  120. }
  121. message DeviceDelJobListRequest {
  122. int64 provider_id = 1;
  123. // 状态过滤 审核状态 0 待审核 1 通过 2 未通过
  124. repeated int32 status_filters = 2;
  125. int32 page = 3;
  126. int64 project_id = 4;
  127. string filter = 5;
  128. }
  129. message DeviceDelJobListReply {
  130. int32 page_size = 1;
  131. int64 total = 2;
  132. int32 page = 3;
  133. repeated DeviceDelJobItem list = 5;
  134. }
  135. message ChannelListRequest {
  136. int32 page = 1;
  137. string sn = 2;
  138. string channel_no = 3;
  139. }
  140. message ChannelItem {
  141. string name = 1;
  142. int64 id = 2;
  143. string channel_no = 3;
  144. int32 state = 4;
  145. }
  146. message ChannelListReply {
  147. repeated ChannelItem list = 1;
  148. int32 page = 2;
  149. int64 total = 3;
  150. int32 page_size = 4;
  151. }
  152. message DeviceChangeNotifyRequest{
  153. string sn = 1;
  154. int32 device_code = 2;
  155. }
  156. message DeviceChangeNotifyReply{
  157. }
  158. message VedioListRequest {
  159. int64 provider_id = 1;
  160. // 状态过滤 审核状态 0 待审核 1 项目通过 2 项目未通过
  161. repeated int32 status_filters = 2;
  162. int32 page = 3;
  163. int64 project_id = 4;
  164. string filter = 5;
  165. bool is_all = 7;
  166. }
  167. message VedioItem {
  168. int64 id = 1;
  169. string social_code = 2;
  170. // 设备类型编码
  171. int32 type_code = 3;
  172. string type_name = 4;
  173. // 申请时间
  174. string apply_time = 5;
  175. // 审批时间
  176. string approve_time = 6;
  177. // 0 待审核 1 项目通过 2 项目不通过
  178. int32 status = 7;
  179. string project_name = 8;
  180. // 安检备案号
  181. string safety_record_no = 9;
  182. // 0 离线 1 在线
  183. int32 state = 10;
  184. string sn = 11;
  185. string key = 12;
  186. string provider_name = 13;
  187. string name = 14;
  188. string ip = 15;
  189. int64 port = 16;
  190. string media_transport = 17;
  191. int32 channel_count = 18;
  192. }
  193. message VedioListReply {
  194. repeated VedioItem list = 1;
  195. int32 page = 2;
  196. int64 total = 3;
  197. int32 page_size = 4;
  198. }
  199. message DeviceStatisticRequest {
  200. }
  201. message DeviceStatisticReply {
  202. int64 total = 1;
  203. int64 increase = 2;
  204. int64 online = 3;
  205. int64 offline = 4;
  206. }
  207. message DeviceTypeStatisticRequest {
  208. }
  209. message DeviceTypeStatisticItem {
  210. string device_type = 1;
  211. int64 total = 2;
  212. int64 online = 3;
  213. int32 device_code = 4;
  214. }
  215. message DeviceTypeStatisticReply {
  216. repeated DeviceTypeStatisticItem list = 1;
  217. }