device.proto 5.0 KB

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