project.proto 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "smart-site-management-gateway/pb/v1";
  6. message LoginRequest {
  7. string user = 1;
  8. string password = 2;
  9. int64 project_id = 3;
  10. }
  11. message LoginReply {
  12. int64 uid = 1;
  13. bool project_user = 2;
  14. int64 project_id = 3;
  15. string user_name = 4;
  16. }
  17. message ProjectInfoItem {
  18. string name = 1;
  19. string chinese = 2;
  20. string value = 3;
  21. }
  22. message ProjectChangeRequest {
  23. int64 id = 1;
  24. repeated ProjectInfoItem list = 2;
  25. }
  26. message ProjectChangeReply {
  27. }
  28. message ProjectInfoForChangeRequest {
  29. int64 id = 1;
  30. }
  31. message ProjectInfoForChangeReply {
  32. repeated ProjectInfoItem list = 1;
  33. }
  34. message ProjectChangeInfoListRequest {
  35. int32 page = 1;
  36. int64 id = 2;
  37. }
  38. message ProjectChangeInfoItem {
  39. repeated ProjectInfoItem origin = 1;
  40. repeated ProjectInfoItem dst = 2;
  41. string name = 3;
  42. string safety_record_no = 4;
  43. string apply_time = 5;
  44. string approve_time = 6;
  45. int32 status = 7;
  46. string addr = 8;
  47. }
  48. message ProjectChangeInfoListReply {
  49. int64 total = 1;
  50. int32 page = 2;
  51. int32 page_size = 3;
  52. repeated ProjectChangeInfoItem list = 4;
  53. }
  54. message DeviceListRequest {
  55. int64 provider_id = 1;
  56. // 状态过滤 审核状态 0 待审核 1 项目通过 2 项目未通过
  57. repeated int32 status_filters = 2;
  58. int32 page = 3;
  59. int64 project_id = 4;
  60. string filter = 5;
  61. int32 type_code = 6;
  62. bool is_all = 7;
  63. bool can_del = 8;
  64. int64 page_size = 9;
  65. }
  66. message DeviceItem {
  67. int64 id = 1;
  68. string social_code = 2;
  69. // 设备类型编码
  70. int32 type_code = 3;
  71. string type_name = 4;
  72. // 申请时间
  73. string apply_time = 5;
  74. // 审批时间
  75. string approve_time = 6;
  76. // 0 待审核 1 项目通过 2 项目不通过
  77. int32 status = 7;
  78. string project_name = 8;
  79. // 安检备案号
  80. string safety_record_no = 9;
  81. // 0 离线 1 在线
  82. int32 state = 10;
  83. string sn = 11;
  84. string key = 12;
  85. string provider_name = 13;
  86. string name = 14;
  87. string channel_name = 15;
  88. string channel_no = 16;
  89. }
  90. message DeviceListReply {
  91. int64 total = 1;
  92. int32 page_size = 2;
  93. int32 page = 3;
  94. repeated DeviceItem list = 4;
  95. }
  96. message DeviceApproveRequest {
  97. int64 id = 1;
  98. // true 同意 false 不同意
  99. bool status = 2;
  100. string feedback = 3;
  101. }
  102. message DeviceApproveReply {
  103. }
  104. message ChangePasswdRequest {
  105. int64 uid = 1;
  106. string old = 2;
  107. string new = 3;
  108. }
  109. message ChangePasswdReply {
  110. }
  111. message ProjectInfoRequest{
  112. int64 project_id = 1;
  113. }
  114. message ProjectInfoReply {
  115. // 安监备案号
  116. string safety_record_no = 3;
  117. // 工程编号
  118. string project_no = 4;
  119. // 工程名
  120. string name = 5;
  121. // 工程名简称
  122. string short_name = 6;
  123. // 项目功能
  124. string project_function = 7;
  125. // 项目类型
  126. string project_type = 8;
  127. // 工程造价(单位万)
  128. double price = 9;
  129. // 工程介绍
  130. string desc = 10;
  131. // 项目负责人
  132. string project_leader = 11;
  133. // 建筑面积(单位面积)
  134. double covered_area = 12;
  135. // 项目负责人电话
  136. string phone = 13;
  137. // 总层数
  138. int32 total_level = 14;
  139. // 建筑层数 eg:主楼地上23层,地下2层;裙楼地上32层,地下3层
  140. string building_storey = 15;
  141. // 施工单位
  142. string construction = 16;
  143. // 建设单位
  144. string development = 17;
  145. // 监理单位
  146. string oversee = 18;
  147. // 设计单位
  148. string design = 19;
  149. // 勘察单位
  150. string exploration = 20;
  151. // 工程所在地
  152. string location = 21;
  153. // 经度
  154. double lon = 22;
  155. // 纬度
  156. double lat = 23;
  157. // 项目效果图
  158. string project_effect_pic = 24;
  159. // 项目平面图
  160. string project_plan = 25;
  161. string start_day = 26;
  162. string end_day = 27;
  163. }
  164. message ProjectDeviceStatisticsRequest{
  165. int64 project_id = 1;
  166. }
  167. message ProjectDeviceStatistics{
  168. // 设备类型
  169. string device_type = 1;
  170. // 总数
  171. int32 total = 2;
  172. // 在线数
  173. int32 online = 3;
  174. }
  175. message ProjectDeviceStatisticsReply{
  176. repeated ProjectDeviceStatistics list = 1;
  177. }
  178. message ProjectProgressRequest{
  179. int64 project_id = 1;
  180. }
  181. message ProjectProgress{
  182. // 阶段名
  183. string name = 1;
  184. // 预计开始时间
  185. string expect_start_time = 2;
  186. // 预计结束时间
  187. string expect_end_time = 3;
  188. // 状态 (0 未完工,1 已完成 ,2 进行中)
  189. int32 status = 4;
  190. // 阶段图片
  191. string image = 5;
  192. // 阶段id
  193. int64 id = 6;
  194. // 实际完工时间
  195. string reality_end_time = 7;
  196. string reality_start_time = 8;
  197. }
  198. message ProjectProgressReply{
  199. repeated ProjectProgress list = 1;
  200. // 开工天数
  201. int64 start_days = 2;
  202. // 总天数
  203. int64 total_days = 3;
  204. // 项目开始时间
  205. string start_day = 4;
  206. // 项目结束时间
  207. string end_day = 5;
  208. }
  209. message ProjectProgressAddRequest{
  210. int64 project_id = 1;
  211. // 阶段名
  212. string name = 2;
  213. // 预计开始时间
  214. int64 expect_start_time = 3;
  215. // 预计结束时间
  216. int64 expect_end_time = 4;
  217. }
  218. message ProjectProgressAddReply{
  219. int64 id = 1;
  220. }
  221. message ProjectProgressDelRequest {
  222. int64 id = 1;
  223. }
  224. message ProjectProgressDelReply {
  225. }
  226. message ProjectProgressSetRequest{
  227. // 阶段id
  228. int64 id = 1;
  229. // 阶段图片,非毕传
  230. string image = 2;
  231. int64 start = 3;
  232. int64 end = 4;
  233. }
  234. message ProjectProgressSetReply{
  235. }
  236. message DeviceVideoChannelRequest {
  237. int64 project_id = 1;
  238. string sn = 2;
  239. }
  240. message DeviceVideoChannelReply {
  241. string channel_no = 1;
  242. int64 id = 2;
  243. int32 state = 3;
  244. string name = 4;
  245. }
  246. message ProjectSetPicRequest {
  247. // 0 平面图 1 效果图
  248. int32 pic_type = 1;
  249. repeated string pic_url = 2;
  250. int64 project_id = 3;
  251. }
  252. message ProjectSetPicReply {
  253. }
  254. message ProjectUpdateRequest {
  255. string name = 1;
  256. string short_name = 2;
  257. string location = 3;
  258. int64 project_id = 4;
  259. }
  260. message ProjectUpdateReply {
  261. }
  262. message EmailUpdateRequest {
  263. int64 id = 1;
  264. string email = 2;
  265. }
  266. message EmailUpdateReply {
  267. }
  268. message EmailPrepareRequest {
  269. int64 id = 1;
  270. string password = 2;
  271. string email = 3;
  272. }
  273. message EmailPrepareReply {
  274. }
  275. message PhoneUpdateRequest {
  276. int64 id = 1;
  277. string phone = 2;
  278. }
  279. message PhoneUpdateReply {
  280. }
  281. message UserInfoRequest {
  282. int64 id = 1;
  283. }
  284. message UserInfoReply {
  285. string email = 1;
  286. string phone = 2;
  287. }