system.proto 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-applete-gateway/pb/v1";
  6. message SystemGroupPermissionData {
  7. // 父code,若没有则填空
  8. string pcode = 1;
  9. // 组件路径
  10. string path = 2;
  11. // 权限名字
  12. string name = 3;
  13. // 路由
  14. string router = 4;
  15. string code = 5;
  16. string applete_path = 6;
  17. }
  18. message LoginRequest {
  19. string username = 1;
  20. string password = 2;
  21. // 是否来源于员工小程序
  22. bool applete = 3;
  23. }
  24. message LoginReply {
  25. int64 uid = 1;
  26. string user_name = 2;
  27. int64 cid = 3;
  28. int64 garden_id = 4;
  29. int64 group_id = 5;
  30. bool is_super_group = 6;
  31. string garden_name = 7;
  32. string user_permission_time = 8;
  33. string global_permission_time = 9;
  34. repeated SystemGroupPermissionData permissions = 10;
  35. }
  36. message LoginByPhoneRequest {
  37. string phone = 1;
  38. string password = 2;
  39. // 是否来源于员工小程序
  40. bool applete = 3;
  41. }
  42. message LoginByPhoneReply {
  43. repeated LoginReply list = 1;
  44. }
  45. message CheckPhoneRequest {
  46. string phone = 1;
  47. }
  48. message CheckPhoneReply {
  49. }
  50. message UserAddRequest {
  51. string user_name = 1;
  52. string password = 2;
  53. string email = 3;
  54. string phone = 4;
  55. int64 group_id = 5;
  56. bool enable = 6;
  57. int64 garden_id = 7;
  58. int64 cid = 8;
  59. string garden_name = 9;
  60. bool by_company = 10;
  61. int64 uid = 11;
  62. string real_name = 12;
  63. int64 department_id = 13;
  64. int32 base_permission = 14;
  65. }
  66. message UserAddReply {
  67. int64 id = 1;
  68. }
  69. message UserUpdateRequest {
  70. string user_name = 1;
  71. string password = 2;
  72. string email = 3;
  73. string phone = 4;
  74. bool enable = 5;
  75. int64 id = 6;
  76. int64 garden_id = 7;
  77. int64 cid = 8;
  78. string garden_name = 9;
  79. int64 group_id = 10;
  80. bool by_company = 11;
  81. int64 uid = 12;
  82. string real_name = 13;
  83. int64 department_id = 14;
  84. int32 base_permission = 15;
  85. }
  86. message UserUpdateReply {
  87. UserUpdateRequest origin = 1;
  88. }
  89. message UserDelRequest {
  90. int64 id = 1;
  91. int64 cid = 2;
  92. bool by_company = 3;
  93. int64 uid = 4;
  94. int64 garden_id = 5;
  95. }
  96. message UserDelReply {
  97. UserUpdateRequest origin = 1;
  98. }
  99. message UserListRequest {
  100. int64 cid = 1;
  101. int64 garden_id = 2;
  102. int64 page = 3;
  103. int64 page_size = 4;
  104. string garden_name = 5;
  105. string user_name = 6;
  106. bool by_company = 7;
  107. int64 group_id = 8;
  108. string phone = 9;
  109. repeated int64 ids = 10;
  110. }
  111. message UserItem {
  112. string user_name = 1;
  113. string password = 2;
  114. string email = 3;
  115. string phone = 4;
  116. bool super = 5;
  117. bool enable = 6;
  118. int64 id = 7;
  119. int64 garden_id = 8;
  120. int64 cid = 9;
  121. string garden_name = 10;
  122. string created_at = 11;
  123. int64 group_id = 12;
  124. string group_name = 13;
  125. string department_name = 14;
  126. string real_name = 15;
  127. int32 base_permission = 16;
  128. }
  129. message UserListReply {
  130. int64 total = 1;
  131. int64 page = 2;
  132. repeated UserItem list = 3;
  133. }
  134. message SuperGroupRequest {
  135. int64 cid = 1;
  136. int64 garden_id = 2;
  137. }
  138. message SuperGroupReply {
  139. int64 id = 1;
  140. }
  141. message UserGardenChangeRequest {
  142. int64 garden_id = 1;
  143. string garden_name = 2;
  144. }
  145. message UserGardenChangeReply {
  146. }
  147. message GroupAddRequest {
  148. int64 garden_id = 1;
  149. int64 cid = 2;
  150. repeated string permission_codes = 3;
  151. bool is_super = 4;
  152. string group_name = 5;
  153. string group_desc = 6;
  154. }
  155. message GroupAddReply {
  156. int64 id = 1;
  157. }
  158. message GroupUpdateRequest {
  159. int64 id = 1;
  160. string group_name = 2;
  161. repeated string permission_codes = 3;
  162. int64 garden_id = 4;
  163. int64 cid = 5;
  164. string group_desc = 6;
  165. }
  166. message GroupUpdateReply {
  167. GroupUpdateRequest origin = 1;
  168. }
  169. message GroupDelRequest {
  170. int64 id = 1;
  171. int64 garden_id = 2;
  172. int64 cid = 3;
  173. }
  174. message GroupDelReply {
  175. GroupUpdateRequest origin = 1;
  176. }
  177. message GroupItem {
  178. int64 id = 1;
  179. string group_name = 2;
  180. string group_desc = 3;
  181. int64 user_count = 4;
  182. }
  183. message GroupListRequest {
  184. int64 garden_id = 1;
  185. int64 cid = 2;
  186. }
  187. message GroupListReply {
  188. repeated GroupItem list = 1;
  189. }
  190. message GroupInfoRequest {
  191. int64 id = 1;
  192. }
  193. message SystemGroupPermissionItem {
  194. // 父code,若没有则填空
  195. string pcode = 1;
  196. // 小程序组件路径
  197. string applete_path = 2;
  198. // 权限名字
  199. string name = 3;
  200. // 是否拥有该权限
  201. bool selected = 4;
  202. // 路由
  203. string router = 5;
  204. string code = 6;
  205. // 组件路径
  206. string path = 7;
  207. repeated SystemGroupPermissionItem childs = 8;
  208. }
  209. message GroupInfoReply {
  210. repeated SystemGroupPermissionItem list = 1;
  211. }
  212. message ResetPasswordRequest {
  213. string phone = 1;
  214. int64 uid = 2;
  215. uint32 vcode = 3;
  216. string password = 5;
  217. }
  218. message ResetPasswordData {
  219. // 用户id
  220. int64 uid = 1;
  221. // 用户名
  222. string username = 2;
  223. // 小区名
  224. string garden_name = 3;
  225. }
  226. message ResetPasswordReply {
  227. repeated ResetPasswordData list = 1;
  228. }
  229. message ChangePasswordRequest {
  230. int64 uid = 1;
  231. string old_password = 2;
  232. string new_password = 3;
  233. bool by_company = 4;
  234. }
  235. message ChangePasswordReply {
  236. }
  237. message DepartmentAddRequest {
  238. int64 garden_id = 1;
  239. int64 cid = 2;
  240. string department_name = 3;
  241. string desc = 4;
  242. }
  243. message DepartmentAddReply {
  244. int64 id = 1;
  245. }
  246. message DepartmentUpdateRequest {
  247. int64 garden_id = 1;
  248. string department_name = 2;
  249. string desc = 3;
  250. int64 id = 4;
  251. }
  252. message DepartmentUpdateReply {
  253. DepartmentUpdateRequest origin = 1;
  254. }
  255. message DepartmentDelRequest {
  256. int64 garden_id = 1;
  257. int64 id = 2;
  258. }
  259. message DepartmentDelReply {
  260. DepartmentUpdateRequest origin = 1;
  261. }
  262. message DepartmentItem {
  263. int64 id = 1;
  264. string department_name = 2;
  265. string desc = 3;
  266. string created_at = 4;
  267. }
  268. message DepartmentListRequest {
  269. int64 page = 1;
  270. int64 page_size = 2;
  271. int64 garden_id = 3;
  272. }
  273. message DepartmentListReply {
  274. int64 page = 1;
  275. int64 total = 2;
  276. repeated DepartmentItem list = 3;
  277. }
  278. message CompanyEnterGardenRequest {
  279. int64 garden_id = 1;
  280. int64 cid = 2;
  281. }
  282. message CompanyEnterGardenReply {
  283. string garden_name = 1;
  284. repeated SystemGroupPermissionData permissions = 2;
  285. }
  286. message GardenInfosRequest {
  287. repeated int64 ids = 1;
  288. }
  289. message GardenItem {
  290. // 物业公司id
  291. int64 cid = 1;
  292. // 省
  293. string province = 2;
  294. string province_code = 3;
  295. // 市
  296. string city = 4;
  297. string city_code = 5;
  298. // 区
  299. string area = 6;
  300. string area_code = 7;
  301. // 街道
  302. string street = 8;
  303. string street_code = 9;
  304. // 社区
  305. string committee = 10;
  306. string committee_code = 11;
  307. // 小区名字
  308. string garden_name = 12;
  309. // 小区地址
  310. string garden_addr = 13;
  311. // 物业联系人
  312. string property_person = 14;
  313. // 物业联系人手机号
  314. string property_phone = 15;
  315. int64 id = 16;
  316. string garden_pic = 17;
  317. string garden_desc = 18;
  318. bool in_use = 19;
  319. // 经度
  320. double lnt = 20;
  321. // 纬度
  322. double lat = 21;
  323. repeated string appendix = 22;
  324. int32 status = 23;
  325. string feedback = 24;
  326. }
  327. message GardenInfosReply {
  328. repeated GardenItem list = 1;
  329. }
  330. message GardenAddRequest {
  331. // 物业公司id
  332. int64 cid = 1;
  333. // 省
  334. string province = 2;
  335. string province_code = 3;
  336. // 市
  337. string city = 4;
  338. string city_code = 5;
  339. // 区
  340. string area = 6;
  341. string area_code = 7;
  342. // 街道
  343. string street = 8;
  344. string street_code = 9;
  345. // 社区
  346. string committee = 10;
  347. string committee_code = 11;
  348. // 小区名字
  349. string garden_name = 12;
  350. // 小区地址
  351. string garden_addr = 13;
  352. // 物业联系人
  353. string property_person = 14;
  354. // 物业联系人手机号
  355. string property_phone = 15;
  356. // 免费小区个数
  357. int32 free_garden_count = 16;
  358. string garden_pic = 17;
  359. string garden_desc = 18;
  360. // 经度
  361. double lnt = 19;
  362. // 纬度
  363. double lat = 20;
  364. repeated string appendix = 21;
  365. }
  366. message GardenAddReply {
  367. int64 id = 1;
  368. }
  369. message GardenListRequest {
  370. int64 page = 1;
  371. int64 page_size = 2;
  372. int64 cid = 3;
  373. string committee_code = 4;
  374. bool need_appendix = 5;
  375. bool not_approved = 6;
  376. }
  377. message GardenListReply {
  378. int64 page = 1;
  379. int64 total = 2;
  380. repeated GardenItem list = 3;
  381. }
  382. message GardenUpdateRequest {
  383. // id
  384. int64 id = 1;
  385. // 省
  386. string province = 2;
  387. string province_code = 3;
  388. // 市
  389. string city = 4;
  390. string city_code = 5;
  391. // 区
  392. string area = 6;
  393. string area_code = 7;
  394. // 街道
  395. string street = 8;
  396. string street_code = 9;
  397. // 社区
  398. string committee = 10;
  399. string committee_code = 11;
  400. // 小区名字
  401. string garden_name = 12;
  402. // 小区地址
  403. string garden_addr = 13;
  404. // 物业联系人
  405. string property_person = 14;
  406. // 物业联系人手机号
  407. string property_phone = 15;
  408. int64 cid = 16;
  409. string garden_pic = 17;
  410. string garden_desc = 18;
  411. // 经度
  412. double lnt = 19;
  413. // 纬度
  414. double lat = 20;
  415. }
  416. message GardenUpdateReply {
  417. GardenUpdateRequest origin = 1;
  418. }
  419. message GardenKeyInfoChangeRequest {
  420. int64 id = 1;
  421. int64 cid = 2;
  422. string province = 3;
  423. string province_code = 4;
  424. // 市
  425. string city = 5;
  426. string city_code = 6;
  427. // 区
  428. string area = 7;
  429. string area_code = 8;
  430. // 街道
  431. string street = 9;
  432. string street_code = 10;
  433. // 社区
  434. string committee = 11;
  435. string committee_code = 12;
  436. string garden_name = 13;
  437. }
  438. message GardenKeyInfoChangeReply {
  439. }
  440. message GardenKeyInfoChangeListRequest {
  441. int64 cid = 1;
  442. int64 garden_id = 2;
  443. int32 status = 3;
  444. int64 page = 4;
  445. int64 page_size = 5;
  446. }
  447. message GardenKeyInfoData {
  448. int32 status = 1;
  449. string garden_name = 2;
  450. string garden_detail = 3;
  451. int64 cid = 4;
  452. int64 garden_id = 5;
  453. int64 id = 6;
  454. string feedback = 7;
  455. repeated GardenKeyInfoItem list = 8;
  456. }
  457. message GardenKeyInfoItem {
  458. string field_name = 1;
  459. string field_value_src = 2;
  460. string field_value_dst = 3;
  461. }
  462. message GardenKeyInfoChangeListReply {
  463. int64 page = 1;
  464. int64 total = 2;
  465. repeated GardenKeyInfoData list = 3;
  466. }
  467. message GardenKeyInfoApproveRequest {
  468. int64 id = 1;
  469. string feedback = 2;
  470. bool status = 3;
  471. }
  472. message GardenKeyInfoApproveReply {
  473. }
  474. message GardenApproveRequest {
  475. int64 id = 1;
  476. string feedback = 2;
  477. bool status = 3;
  478. int64 cid = 4;
  479. }
  480. message GardenApproveReply {
  481. }
  482. message GardenDelRequest {
  483. int64 id = 1;
  484. int64 cid = 2;
  485. }
  486. message GardenDelReply {
  487. GardenUpdateRequest origin = 1;
  488. }
  489. message GardenChangeCompanyRequest {
  490. int64 garden_id = 1;
  491. int64 cid = 2;
  492. }
  493. message GardenChangeCompanyReply {
  494. GardenChangeCompanyRequest origin = 1;
  495. }