device.proto 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "smart-enterprise-management-gateway/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. int64 cid = 9;
  58. bool all_type = 10;
  59. int32 state = 11;
  60. }
  61. message DeviceItem {
  62. int64 id = 1;
  63. string social_code = 2;
  64. // 设备类型编码
  65. int32 type_code = 3;
  66. string type_name = 4;
  67. // 申请时间
  68. string created_time = 5;
  69. // 审批时间
  70. string approve_time = 6;
  71. // 0 待审核 1 项目通过 2 项目不通过
  72. int32 status = 7;
  73. string project_name = 8;
  74. // 安检备案号
  75. string safety_record_no = 9;
  76. // 0 离线 1 在线
  77. int32 state = 10;
  78. string sn = 11;
  79. string key = 12;
  80. string provider_name = 13;
  81. string name = 14;
  82. string model = 15;
  83. string manufacturer = 16;
  84. string url = 17;
  85. string batch = 18;
  86. string phone = 19;
  87. string person = 20;
  88. string unit = 21;
  89. double lon = 22;
  90. double lat = 23;
  91. // 实名制设备类型
  92. string kind = 24;
  93. // 实名制设备类别
  94. string sub_kind = 25;
  95. }
  96. message DeviceListReply {
  97. int64 total = 1;
  98. int32 page_size = 2;
  99. int32 page = 3;
  100. repeated DeviceItem list = 4;
  101. }
  102. // 开发者审批对接设备
  103. message DockingApproveRequest {
  104. // 供应商设备类型id
  105. int32 id = 1;
  106. // 开发者建议
  107. string comment = 2;
  108. // true 测试通过 false 测试不通过
  109. bool status = 3;
  110. }
  111. message DockingApproveReply {
  112. }
  113. message DeviceDelJobItem {
  114. int64 id = 1;
  115. string social_code = 2;
  116. // 设备类型编码
  117. int32 type_code = 3;
  118. string type_name = 4;
  119. // 申请时间
  120. string apply_time = 5;
  121. // 审批时间
  122. string approve_time = 6;
  123. // 0 待审核 1 通过 2 项目不通过
  124. int32 status = 7;
  125. // 项目名称
  126. string project_name = 8;
  127. // 安检备案号
  128. string safety_record_no = 9;
  129. string provider_name = 10;
  130. string sn = 11;
  131. string reason = 12;
  132. string feedback = 13;
  133. }
  134. message DeviceDelJobListRequest {
  135. int64 provider_id = 1;
  136. // 状态过滤 审核状态 0 待审核 1 通过 2 未通过
  137. repeated int32 status_filters = 2;
  138. int32 page = 3;
  139. int64 project_id = 4;
  140. string filter = 5;
  141. }
  142. message DeviceDelJobListReply {
  143. int32 page_size = 1;
  144. int64 total = 2;
  145. int32 page = 3;
  146. repeated DeviceDelJobItem list = 5;
  147. }
  148. message ChannelListRequest {
  149. int32 page = 1;
  150. string sn = 2;
  151. string channel_no = 3;
  152. }
  153. message ChannelItem {
  154. string name = 1;
  155. int64 id = 2;
  156. string channel_no = 3;
  157. int32 state = 4;
  158. }
  159. message ChannelListReply {
  160. repeated ChannelItem list = 1;
  161. int32 page = 2;
  162. int64 total = 3;
  163. int32 page_size = 4;
  164. }
  165. message DeviceChangeNotifyRequest{
  166. string sn = 1;
  167. int32 device_code = 2;
  168. }
  169. message DeviceChangeNotifyReply{
  170. }
  171. message VedioListRequest {
  172. int64 provider_id = 1;
  173. // 状态过滤 审核状态 0 待审核 1 项目通过 2 项目未通过
  174. repeated int32 status_filters = 2;
  175. int32 page = 3;
  176. int64 project_id = 4;
  177. string filter = 5;
  178. bool is_all = 7;
  179. int64 cid = 8;
  180. int32 state = 9;
  181. }
  182. message VedioItem {
  183. int64 id = 1;
  184. string social_code = 2;
  185. // 设备类型编码
  186. int32 type_code = 3;
  187. string type_name = 4;
  188. // 申请时间
  189. string apply_time = 5;
  190. // 审批时间
  191. string approve_time = 6;
  192. // 0 待审核 1 项目通过 2 项目不通过
  193. int32 status = 7;
  194. string project_name = 8;
  195. // 安检备案号
  196. string safety_record_no = 9;
  197. // 0 离线 1 在线
  198. int32 state = 10;
  199. string sn = 11;
  200. string key = 12;
  201. string provider_name = 13;
  202. string name = 14;
  203. string ip = 15;
  204. int64 port = 16;
  205. string media_transport = 17;
  206. int32 channel_count = 18;
  207. }
  208. message VedioListReply {
  209. repeated VedioItem list = 1;
  210. int32 page = 2;
  211. int64 total = 3;
  212. int32 page_size = 4;
  213. }