device.proto 5.3 KB

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