common.proto 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package pb_v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "property-system-gateway/pb/v1";
  6. message SystemPermissionAddRequest {
  7. // 父code,若没有则填空
  8. string pcode = 1;
  9. // 组件路径
  10. string path = 2;
  11. // 权限名字
  12. string name = 3;
  13. // 小程序组件路径
  14. string applete_path = 4;
  15. // 路由
  16. string router = 5;
  17. // 1 已发布 2 未发布
  18. int32 enable = 6;
  19. }
  20. message SystemPermissionAddReply {
  21. string code = 1;
  22. }
  23. message SystemPermissionUpdateRequest {
  24. // 组件路径
  25. string path = 1;
  26. // 权限名字
  27. string name = 2;
  28. // 小程序组件路径
  29. string applete_path = 3;
  30. // 路由
  31. string router = 4;
  32. string code = 5;
  33. }
  34. message SystemPermissionUpdateReply {
  35. SystemPermissionUpdateRequest origin = 1;
  36. }
  37. message SystemPermissionDelRequest {
  38. string code = 1;
  39. }
  40. message SystemPermissionDelReply {
  41. repeated SystemPermissionUpdateRequest origin = 1;
  42. }
  43. message SystemPermissionListRequest {
  44. }
  45. message SystemPermissionItem {
  46. // 父code,若没有则填空
  47. string pcode = 1;
  48. // 组件路径
  49. string path =2;
  50. // 权限名字
  51. string name = 3;
  52. // 小程序组件路径
  53. string applete_path = 4;
  54. // 路由
  55. string router = 5;
  56. string code = 6;
  57. // 1 已发布 2 未发布
  58. int32 enable = 7;
  59. int64 created_at = 8;
  60. int64 enable_at = 9;
  61. int64 level = 10;
  62. repeated SystemPermissionItem childs = 11;
  63. }
  64. message SystemPermissionListReply {
  65. repeated SystemPermissionItem list = 1;
  66. }
  67. message SystemPermissionNotTreeItem {
  68. // 父code,若没有则填空
  69. string pcode = 1;
  70. // 组件路径
  71. string path = 2;
  72. // 权限名字
  73. string name = 3;
  74. // 小程序组件路径
  75. string applete_path = 4;
  76. // 路由
  77. string router = 5;
  78. string code = 6;
  79. // 1 已发布 2 未发布
  80. int32 enable = 7;
  81. int64 created_at = 8;
  82. int64 enable_at = 9;
  83. int64 level = 10;
  84. }
  85. // 平铺权限列表
  86. message SystemPermissionsNotTreeRequest {
  87. }
  88. message SystemPermissionsNotTreeReply {
  89. repeated SystemPermissionNotTreeItem list = 1;
  90. }
  91. message ProvinceCityAreaRequest {
  92. }
  93. message ProvinceData {
  94. string code = 1;
  95. string name = 2;
  96. }
  97. message CityData {
  98. string code = 1;
  99. string name = 2;
  100. string province_code = 3;
  101. }
  102. message AreaData {
  103. string code = 1;
  104. string name = 2;
  105. string province_code = 3;
  106. string city_code = 4;
  107. }
  108. message ProvinceCityAreaReply {
  109. repeated ProvinceData province_list = 1;
  110. repeated CityData city_list = 2;
  111. repeated AreaData area_list = 3;
  112. }
  113. message StreetCommitteeRequest {
  114. string area_code = 1;
  115. }
  116. message StreetData {
  117. string code = 1;
  118. string name = 2;
  119. }
  120. message CommitteeData {
  121. string code = 1;
  122. string name = 2;
  123. string street_code = 3;
  124. }
  125. message StreetCommitteeReply {
  126. repeated StreetData street_list = 1;
  127. repeated CommitteeData committee_list = 2;
  128. }
  129. message OssObjAddRequest {
  130. repeated string in_list = 1;
  131. repeated string out_list = 2;
  132. }
  133. message OssObjAddReply {
  134. }
  135. message OssObjDelNotExistRequest {
  136. string obj_url = 1;
  137. }
  138. message OssObjDelNotExistReply {
  139. }
  140. message ApplicationListRequest {
  141. int64 page = 1;
  142. int64 page_size = 2;
  143. int32 enable = 3;
  144. int64 package_id = 4;
  145. repeated int64 exclude_ids = 5;
  146. }
  147. message ApplicationItem {
  148. string icon = 1;
  149. string desc = 2;
  150. string name = 3;
  151. string content = 4;
  152. int64 price = 5;
  153. bool enable = 6;
  154. int64 id = 7;
  155. }
  156. message ApplicationListReply {
  157. int64 total = 1;
  158. int64 page = 2;
  159. repeated ApplicationItem list = 3;
  160. }
  161. message PackageItem {
  162. string name = 1;
  163. string desc = 2;
  164. // 单价
  165. int64 price = 3;
  166. int64 house_count = 4;
  167. int64 id = 5;
  168. bool enable = 6;
  169. // 应用名称
  170. repeated string application_names = 7;
  171. }
  172. message PackageListRequest {
  173. int64 page = 1;
  174. int64 page_size = 2;
  175. int32 enable = 3;
  176. }
  177. message PackageListReply {
  178. int64 page = 1;
  179. int64 total = 2;
  180. repeated PackageItem list = 3;
  181. }
  182. message MsgPackageAddRequest {
  183. string name = 1;
  184. string comment = 2;
  185. int64 price = 3;
  186. int64 msg_count = 4;
  187. }
  188. message MsgPackageAddReply {
  189. }
  190. message MsgPackageUpdateRequest {
  191. string name = 1;
  192. string comment = 2;
  193. int64 price = 3;
  194. int64 msg_count = 4;
  195. int64 id = 5;
  196. }
  197. message MsgPackageUpdateReply {
  198. }
  199. message MsgPackageDelRequest {
  200. int64 id = 1;
  201. }
  202. message MsgPackageDelReply {
  203. }
  204. message MsgPackageListRequest {
  205. int64 page = 1;
  206. int64 page_size = 2;
  207. }
  208. message MsgPackageItem {
  209. // 套餐名称
  210. string name = 1;
  211. // 套餐描述
  212. string comment = 2;
  213. // 套餐价格
  214. int64 price = 3;
  215. // 短信条数
  216. int64 msg_count = 4;
  217. int64 id = 5;
  218. }
  219. message MsgPackageListReply {
  220. int64 total = 1;
  221. int64 page = 2;
  222. repeated MsgPackageItem list = 3;
  223. }
  224. message MaterialInfoRequest {
  225. int32 mtype = 1;
  226. }
  227. message MaterialInfoReply {
  228. string pic = 1;
  229. }
  230. message MaterialItem {
  231. int64 id = 1;
  232. int32 mtype = 2;
  233. string pic = 3;
  234. int64 created_at = 4;
  235. int32 enable = 5;
  236. }
  237. message MaterialListRequest {
  238. int64 page = 1;
  239. int64 page_size = 2;
  240. repeated int32 mtypes = 3;
  241. }
  242. message MaterialListReply {
  243. int64 page = 1;
  244. int64 total = 2;
  245. repeated MaterialItem list = 3;
  246. }