device.proto 5.3 KB

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