device.proto 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "smart-supplier-management/pb/v1";
  6. message DeviceTypeAddRequest {
  7. int64 provider_id = 1;
  8. // 设备类型
  9. int32 device_code = 2;
  10. // 备注
  11. string comment = 3;
  12. // 经办人
  13. string agent = 4;
  14. // 经办人电话
  15. string agent_phone = 5;
  16. // 诚信经营承诺书
  17. repeated string appendix = 6;
  18. }
  19. message DeviceTypeAddReply {
  20. }
  21. message DeviceTypeTestingAddRequest {
  22. int64 provider_id = 1;
  23. // 设备类型
  24. int32 device_code = 2;
  25. // 备注
  26. string comment = 3;
  27. // 经办人
  28. string agent = 4;
  29. // 经办人电话
  30. string agent_phone = 5;
  31. // 附件
  32. repeated string appendix = 6;
  33. }
  34. message DeviceTypeTestingAddReply {
  35. }
  36. message DeviceAddRequest {
  37. int64 project_id = 1;
  38. string name = 2;
  39. string sn = 3;
  40. string addr = 4;
  41. int32 type = 5;
  42. double lon = 6;
  43. double lat = 7;
  44. double x_coord = 8;
  45. double y_coord = 9;
  46. int64 provider_id = 10;
  47. string project_code = 11;
  48. string project_name = 12;
  49. // 设备型号
  50. string device_model = 13;
  51. // 生产厂商
  52. string manufacturer = 14;
  53. // 批次
  54. string batch = 15;
  55. string sim = 16;
  56. // 对接单位
  57. string unit = 17;
  58. // 联系人
  59. string person = 18;
  60. // 联系电话
  61. string phone = 19;
  62. // 备注
  63. string remark = 20;
  64. // url视屏地址
  65. string url = 21;
  66. // 实名制设备类型
  67. int32 kind = 22;
  68. // 实名制设备类别
  69. int32 sub_kind = 23;
  70. }
  71. message DeviceAddReply {
  72. int64 device_id = 1;
  73. }
  74. message VedioAddRequest {
  75. int64 project_id = 1;
  76. string name = 2;
  77. int64 provider_id = 3;
  78. int32 channel_count = 4;
  79. int32 vedio_type = 5;
  80. }
  81. message VedioAddReply {
  82. int64 vedio_id = 5;
  83. }
  84. message ChannelAddRequest {
  85. string sn = 1;
  86. int32 channel_count = 2;
  87. }
  88. message ChannelAddReply {
  89. int64 project_id = 1;
  90. }
  91. message ChannelUpdateRequest {
  92. int64 id = 1;
  93. string name = 2;
  94. }
  95. message ChannelUpdateReply {
  96. int64 project_id = 1;
  97. }
  98. message ChannelListRequest {
  99. int32 page = 1;
  100. string sn = 2;
  101. string channel_no = 3;
  102. }
  103. message ChannelItem {
  104. string name = 1;
  105. int64 id = 2;
  106. string channel_no = 3;
  107. int32 state = 4;
  108. }
  109. message ChannelListReply {
  110. repeated ChannelItem list = 1;
  111. int32 page = 2;
  112. int64 total = 3;
  113. int32 page_size = 4;
  114. }
  115. message DeviceDelRequest {
  116. int64 device_id = 1;
  117. string reason = 2;
  118. uint32 device_code = 3;
  119. }
  120. message DeviceDelReply {
  121. int64 project_id = 1;
  122. }
  123. message DeviceTypeListRequest {
  124. int64 provider_id = 1;
  125. repeated int32 status_filters = 2;
  126. bool include_vedio = 3;
  127. // 0. 已对接的设备类型 1 设备类型申报 2 设备类型对接 3.可申请的设备类型 4 可对接的设备类型
  128. uint32 list_type = 4;
  129. int32 device_code = 5;
  130. }
  131. message DeviceTypeItem {
  132. int32 type_code = 1;
  133. string type_name = 2;
  134. string created_time = 3;
  135. int32 status = 4;
  136. string feedback = 5;
  137. string appendix = 6;
  138. string agent = 7;
  139. string agent_phone = 8;
  140. string approve_time = 9;
  141. string comment = 10;
  142. bool need_appendix = 11;
  143. string reviewer = 12;
  144. }
  145. message DeviceTypeListReply {
  146. repeated DeviceTypeItem list = 1;
  147. }
  148. message DeviceListRequest {
  149. int64 provider_id = 1;
  150. // 状态过滤 审核状态 0 待审核 1 项目通过 2 项目未通过
  151. repeated int32 status_filters = 2;
  152. int32 page = 3;
  153. int64 project_id = 4;
  154. string filter = 5;
  155. int32 type_code = 6;
  156. bool is_all = 7;
  157. bool can_del = 8;
  158. bool all_type = 9;
  159. }
  160. message DeviceItem {
  161. int64 id = 1;
  162. string social_code = 2;
  163. // 设备类型编码
  164. int32 type_code = 3;
  165. string type_name = 4;
  166. // 申请时间
  167. string created_time = 5;
  168. // 审批时间
  169. string approve_time = 6;
  170. // 0 待审核 1 项目通过 2 项目不通过
  171. int32 status = 7;
  172. string project_name = 8;
  173. // 安检备案号
  174. string safety_record_no = 9;
  175. // 0 离线 1 在线
  176. int32 state = 10;
  177. string sn = 11;
  178. string key = 12;
  179. string provider_name = 13;
  180. string name = 14;
  181. string model = 15;
  182. string manufacturer = 16;
  183. string url = 17;
  184. string batch = 18;
  185. string phone = 19;
  186. string person = 20;
  187. string unit = 21;
  188. double lon = 22;
  189. double lat = 23;
  190. string kind = 24;
  191. string sub_kind = 25;
  192. string remark = 26;
  193. }
  194. message DeviceListReply {
  195. repeated DeviceItem list = 1;
  196. int32 page = 2;
  197. int64 total = 3;
  198. int32 page_size = 4;
  199. }
  200. message VedioListRequest {
  201. int64 provider_id = 1;
  202. // 状态过滤 审核状态 0 待审核 1 项目通过 2 项目未通过
  203. repeated int32 status_filters = 2;
  204. int32 page = 3;
  205. int64 project_id = 4;
  206. string filter = 5;
  207. bool is_all = 7;
  208. }
  209. message VedioItem {
  210. int64 id = 1;
  211. string social_code = 2;
  212. // 设备类型编码
  213. int32 type_code = 3;
  214. string type_name = 4;
  215. // 申请时间
  216. string apply_time = 5;
  217. // 审批时间
  218. string approve_time = 6;
  219. // 0 待审核 1 项目通过 2 项目不通过
  220. int32 status = 7;
  221. string project_name = 8;
  222. // 安检备案号
  223. string safety_record_no = 9;
  224. // 0 离线 1 在线
  225. int32 state = 10;
  226. string sn = 11;
  227. string key = 12;
  228. string provider_name = 13;
  229. string name = 14;
  230. string ip = 15;
  231. int64 port = 16;
  232. string media_transport = 17;
  233. int32 channel_count = 18;
  234. }
  235. message VedioListReply {
  236. repeated VedioItem list = 1;
  237. int32 page = 2;
  238. int64 total = 3;
  239. int32 page_size = 4;
  240. }
  241. message ProjectItem {
  242. int64 id = 1;
  243. string name = 2;
  244. string short_name = 3;
  245. string project_no = 4;
  246. string safety_record_no = 5;
  247. }
  248. message ProjectListRequest {
  249. }
  250. message ProjectListReply {
  251. repeated ProjectItem list = 1;
  252. }
  253. message DeviceDelJobItem {
  254. int64 id = 1;
  255. string social_code = 2;
  256. // 设备类型编码
  257. int32 type_code = 3;
  258. string type_name = 4;
  259. // 申请时间
  260. string apply_time = 5;
  261. // 审批时间
  262. string approve_time = 6;
  263. // 0 待审核 1 通过 2 项目不通过
  264. int32 status = 7;
  265. // 项目名称
  266. string project_name = 8;
  267. // 安检备案号
  268. string safety_record_no = 9;
  269. string provider_name = 10;
  270. string sn = 11;
  271. string reason = 12;
  272. string feedback = 13;
  273. string device_name = 14;
  274. string reviewer = 15;
  275. }
  276. message DeviceDelJobListRequest {
  277. int64 provider_id = 1;
  278. // 状态过滤 审核状态 0 待审核 1 通过 2 未通过
  279. repeated int32 status_filters = 2;
  280. int32 page = 3;
  281. int64 project_id = 4;
  282. string filter = 5;
  283. }
  284. message DeviceDelJobListReply {
  285. int32 page_size = 1;
  286. int64 total = 2;
  287. int32 page = 3;
  288. repeated DeviceDelJobItem list = 5;
  289. }