plan.proto 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. syntax = "proto3";
  2. package gorpc;
  3. option go_package = "code.clickto.dev/nomo-server/go-service-pb/client";
  4. import "pb/common.proto";
  5. // ServiceTypes
  6. message ServiceTypesVo {
  7. int64 id = 1; // ID
  8. string productCode = 2; // 产品标识
  9. string code = 3; // 权益类型标识
  10. string name = 4; // 权益类型名称
  11. int64 sort = 5; // 排序
  12. Status status = 6; // 状态 1启用 2禁用
  13. string remark = 7; // 备注
  14. int64 createTime = 8; // 创建时间
  15. int64 createAt = 9; // 创建者ID
  16. int64 updateTime = 10; // 更新时间
  17. int64 updateAt = 11; // 更新者ID
  18. }
  19. message ServiceTypesWithValueVo {
  20. ServiceTypesVo vo = 1;
  21. int64 value = 2;
  22. }
  23. message ServiceTypesGetReq { ServiceTypesVo vo = 1; }
  24. message ServiceTypesGetResp { ServiceTypesVo vo = 1; }
  25. message ServiceTypesAddReq { ServiceTypesVo vo = 1; }
  26. message ServiceTypesAddResp { ServiceTypesVo vo = 1; }
  27. message ServiceTypesUpdateReq { ServiceTypesVo vo = 1; }
  28. message ServiceTypesUpdateResp { ServiceTypesVo vo = 1; }
  29. message ServiceTypesDelReq { repeated int64 ids = 1; }
  30. message ServiceTypesListReq {
  31. Page page = 1;
  32. ServiceTypesVo vo = 2;
  33. repeated string productCodes = 3;
  34. repeated int64 excludeIds = 4;
  35. }
  36. message ServiceTypesListResp {
  37. int64 total = 1;
  38. repeated ServiceTypesVo list = 2;
  39. }
  40. // end ServiceTypes
  41. // ServiceBox
  42. message ServiceBoxVo {
  43. int64 id = 1; // ID
  44. string productCode = 2; // 产品标识
  45. string code = 3; // 权益包标识
  46. string name = 4; // 权益包名称
  47. int64 sort = 5; // 排序
  48. Status status = 6; // 状态 1启用 2禁用
  49. string remark = 7; // 备注
  50. int64 createTime = 8; // 创建时间
  51. int64 createAt = 9; // 创建者ID
  52. int64 updateTime = 10; // 更新时间
  53. int64 updateAt = 11; // 更新者ID
  54. }
  55. message ServiceBoxWithDetailsVo {
  56. ServiceBoxVo serviceBox = 1;
  57. repeated ServiceTypesWithValueVo serviceTypes = 2;
  58. }
  59. message ServiceBoxWithDurationVo {
  60. ServiceBoxVo serviceBox = 1;
  61. int64 licenseDurationDay = 2;
  62. int64 licenseDurationMinutes = 3;
  63. BoolInt isMaster = 4;
  64. int64 bindId = 5;
  65. }
  66. message ServiceBoxGetReq { ServiceBoxVo vo = 1; }
  67. message ServiceBoxGetResp { ServiceBoxVo vo = 1; }
  68. message ServiceBoxGetWithDetailsReq {
  69. ServiceBoxVo vo = 1;
  70. }
  71. message ServiceBoxGetWithDetailsResp {
  72. ServiceBoxVo serviceBox = 1;
  73. repeated ServiceTypesWithValueVo serviceTypes = 2;
  74. }
  75. message ServiceBoxAddReq { ServiceBoxVo vo = 1; }
  76. message ServiceBoxAddResp { ServiceBoxVo vo = 1; }
  77. message ServiceBoxAddWithDetailsReq {
  78. ServiceBoxVo serviceBox = 1;
  79. repeated ServiceTypesWithValueVo serviceTypes = 2;
  80. }
  81. message ServiceBoxAddWithDetailsResp {
  82. ServiceBoxVo serviceBox = 1;
  83. repeated ServiceTypesWithValueVo serviceTypes = 2;
  84. }
  85. message ServiceBoxUpdateReq { ServiceBoxVo vo = 1; }
  86. message ServiceBoxUpdateResp { ServiceBoxVo vo = 1; }
  87. message ServiceBoxUpdateWithDetailsReq {
  88. ServiceBoxVo serviceBox = 1;
  89. repeated ServiceTypesWithValueVo serviceTypes = 2;
  90. }
  91. message ServiceBoxUpdateWithDetailsResp {
  92. ServiceBoxVo serviceBox = 1;
  93. repeated ServiceTypesWithValueVo serviceTypes = 2;
  94. }
  95. message ServiceBoxDelReq { repeated int64 ids = 1; }
  96. message ServiceBoxListReq {
  97. Page page = 1;
  98. ServiceBoxVo vo = 2;
  99. repeated string productCodes = 3;
  100. repeated int64 excludeIds = 4;
  101. }
  102. message ServiceBoxListResp {
  103. int64 total = 1;
  104. repeated ServiceBoxVo list = 2;
  105. }
  106. // end ServiceBox
  107. // ServiceBoxTypes
  108. message ServiceBoxTypesVo {
  109. int64 id = 1; // ID
  110. int64 serviceBoxId = 2; // 权益包ID
  111. int64 serviceTypeId = 3; // 权益类型ID
  112. int64 serviceValue = 4; // 权益值 根据不同的 serviceTypeId,这里的值的含义不同
  113. int64 createTime = 5; // 创建时间
  114. int64 createAt = 6; // 创建者ID
  115. int64 updateTime = 7; // 更新时间
  116. int64 updateAt = 8; // 更新者ID
  117. }
  118. message ServiceBoxTypesGetReq { ServiceBoxTypesVo vo = 1; }
  119. message ServiceBoxTypesGetResp { ServiceBoxTypesVo vo = 1; }
  120. message ServiceBoxTypesAddReq { ServiceBoxTypesVo vo = 1; }
  121. message ServiceBoxTypesAddResp { ServiceBoxTypesVo vo = 1; }
  122. message ServiceBoxTypesUpdateReq { ServiceBoxTypesVo vo = 1; }
  123. message ServiceBoxTypesUpdateResp { ServiceBoxTypesVo vo = 1; }
  124. message ServiceBoxTypesDelReq { repeated int64 ids = 1; }
  125. message ServiceBoxTypesListReq {
  126. Page page = 1;
  127. ServiceBoxTypesVo vo = 2;
  128. repeated int64 serviceBoxIds = 3;
  129. repeated int64 serviceTypeIds = 4;
  130. repeated int64 excludeIds = 5;
  131. int64 boxStatus = 6;
  132. }
  133. message ServiceBoxTypesListResp {
  134. int64 total = 1;
  135. repeated ServiceBoxTypesVo list = 2;
  136. }
  137. // end ServiceBoxTypes
  138. // SubscribePeriodType 订阅周期类型
  139. enum SubscribePeriodType {
  140. SubscribePeriodTypeUnknown = 0;
  141. SubscribePeriodTypeDay = 1;
  142. SubscribePeriodTypeWeek = 2;
  143. SubscribePeriodTypeMonth = 3;
  144. SubscribePeriodTypeYear = 4;
  145. }
  146. // ServicePlan
  147. message ServicePlanVo {
  148. int64 id = 1; // ID
  149. string productCode = 2; // 产品标识
  150. string code = 3; // 套餐code
  151. string name = 4; // 套餐名称
  152. string title = 5; // 标题(默认值,对外显示)
  153. string subTitle = 6; // 副标题(默认值,对外显示)
  154. string introduce = 7; // 简介(默认值,对外显示)
  155. string tag = 8; // 标签内容(默认值,对外显示)
  156. float orgPrice = 9; // 原价(默认值)
  157. float price = 10; // 现价(默认值)
  158. int64 currency = 11; // 价格货币类型(默认值)
  159. BoolInt recommend = 12; // 是否推荐套餐(默认值) 1推荐 2不推荐
  160. BoolInt isDefault = 13; // 是否默认套餐(默认值) 1默认 2不默认
  161. BoolInt subscribeType = 14; // 订阅类型 1订阅类型 2非订阅类型
  162. SubscribePeriodType subscribePeriodType = 15; // 订阅周期类型 1Day 2Week 3Month 4Year(仅当订阅类型为1时有效)
  163. int64 subscribePeriodValue = 16; // 订阅周期值(仅当订阅类型为1时有效)
  164. int64 priority = 17; // 套餐使用优先级
  165. int64 mergeRule = 18; // 套餐合并规则(规则一样的套餐包含的权益可以合并到一起)
  166. int64 sort = 19; // 排序
  167. Status status = 20; // 状态 1启用 2禁用
  168. string remark = 21; // 备注
  169. int64 createTime = 22; // 创建时间
  170. int64 createAt = 23; // 创建者ID
  171. int64 updateTime = 24; // 更新时间
  172. int64 updateAt = 25; // 更新者ID
  173. int64 tagType = 26; // 标签类型(与客户端约定)
  174. }
  175. message ServicePlanWithBoxesVo {
  176. ServicePlanVo servicePlan = 1;
  177. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  178. }
  179. message ServicePlanGetReq { ServicePlanVo vo = 1; }
  180. message ServicePlanGetResp { ServicePlanVo vo = 1; }
  181. message ServicePlanGetWithBoxesReq { ServicePlanVo vo = 1; }
  182. message ServicePlanGetWithBoxesResp {
  183. ServicePlanVo servicePlan = 1;
  184. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  185. }
  186. message ServicePlanAddReq { ServicePlanVo vo = 1; }
  187. message ServicePlanAddResp { ServicePlanVo vo = 1; }
  188. message ServicePlanAddWithBoxesReq {
  189. ServicePlanVo servicePlan = 1;
  190. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  191. }
  192. message ServicePlanAddWithBoxesResp {
  193. ServicePlanVo servicePlan = 1;
  194. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  195. }
  196. message ServicePlanUpdateReq { ServicePlanVo vo = 1; }
  197. message ServicePlanUpdateResp { ServicePlanVo vo = 1; }
  198. message ServicePlanUpdateWithBoxesReq {
  199. ServicePlanVo servicePlan = 1;
  200. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  201. }
  202. message ServicePlanUpdateWithBoxesResp {
  203. ServicePlanVo servicePlan = 1;
  204. repeated ServiceBoxWithDurationVo serviceBoxes = 2;
  205. }
  206. message ServicePlanDelReq { repeated int64 ids = 1; }
  207. message ServicePlanListReq {
  208. Page page = 1;
  209. ServicePlanVo vo = 2;
  210. repeated string productCodes = 3;
  211. repeated int64 excludeIds = 4;
  212. }
  213. message ServicePlanListResp {
  214. int64 total = 1;
  215. repeated ServicePlanVo list = 2;
  216. }
  217. message ServicePlanListWithBoxesReq {
  218. Page page = 1;
  219. ServicePlanVo vo = 2;
  220. repeated string productCodes = 3;
  221. repeated int64 excludeIds = 4;
  222. }
  223. message ServicePlanListWithBoxesResp {
  224. int64 total = 1;
  225. repeated ServicePlanWithBoxesVo list = 2;
  226. }
  227. // end ServicePlan
  228. // ServicePlanBoxes
  229. message ServicePlanBoxesVo {
  230. int64 id = 1; // ID
  231. int64 servicePlanId = 2; // 套餐ID
  232. int64 serviceBoxId = 3; // 权益包ID
  233. int64 licenseDurationDay = 4; // 权益包持续天数
  234. int64 licenseDurationMinutes = 5; // 权益包额外持续分钟数
  235. BoolInt isMaster = 6; // 是否主权益包 1是 2否
  236. int64 createTime = 7; // 创建时间
  237. int64 createAt = 8; // 创建者ID
  238. int64 updateTime = 9; // 更新时间
  239. int64 updateAt = 10; // 更新者ID
  240. }
  241. message ServicePlanBoxesGetReq { ServicePlanBoxesVo vo = 1; }
  242. message ServicePlanBoxesGetResp { ServicePlanBoxesVo vo = 1; }
  243. message ServicePlanBoxesAddReq { ServicePlanBoxesVo vo = 1; }
  244. message ServicePlanBoxesAddResp { ServicePlanBoxesVo vo = 1; }
  245. message ServicePlanBoxesUpdateReq { ServicePlanBoxesVo vo = 1; }
  246. message ServicePlanBoxesUpdateResp { ServicePlanBoxesVo vo = 1; }
  247. message ServicePlanBoxesDelReq { repeated int64 ids = 1; }
  248. message ServicePlanBoxesListReq {
  249. Page page = 1;
  250. ServicePlanBoxesVo vo = 2;
  251. repeated int64 servicePlanIds = 3;
  252. repeated int64 serviceBoxIds = 4;
  253. repeated int64 excludeIds = 5;
  254. int64 planStatus = 6;
  255. }
  256. message ServicePlanBoxesListResp {
  257. int64 total = 1;
  258. repeated ServicePlanBoxesVo list = 2;
  259. }
  260. // end ServicePlanBoxes
  261. // ServicePlanChannel
  262. message ServicePlanChannelVo {
  263. int64 id = 1; // ID
  264. string productCode = 2; // 产品标识
  265. string channel = 3; // 渠道标识
  266. string channelItemId = 4; // 套餐唯一ID或商店SKUID
  267. int64 servicePlanId = 5; // 套餐ID
  268. string title = 6; // 自定义标题(对外显示)
  269. string subTitle = 7; // 自定义副标题(对外显示)
  270. string introduce = 8; // 自定义简介(对外显示)
  271. string tag = 9; // 自定义标签内容(对外显示)
  272. float orgPrice = 10; // 在该渠道下的原价
  273. float price = 11; // 在该渠道下的现价
  274. int64 currency = 12; // 价格货币类型
  275. BoolInt recommend = 13; // 是否推荐商品(默认值) 1推荐 2不推荐
  276. BoolInt isDefault = 14; // 是否默认商品(默认值) 1默认 2不默认
  277. string displayPolicyConfig = 15; // 显示策略
  278. int64 sort = 16; // 排序
  279. Status status = 17; // 状态 1启用 2禁用
  280. string remark = 18; // 备注
  281. int64 createTime = 19; // 创建时间
  282. int64 createAt = 20; // 创建者ID
  283. int64 updateTime = 21; // 更新时间
  284. int64 updateAt = 22; // 更新者ID
  285. int64 tagType = 23; // 标签类型(与客户端约定)
  286. }
  287. message ServicePlanChannelGetReq { ServicePlanChannelVo vo = 1; }
  288. message ServicePlanChannelGetResp { ServicePlanChannelVo vo = 1; }
  289. message ServicePlanChannelAddReq { ServicePlanChannelVo vo = 1; }
  290. message ServicePlanChannelAddResp { ServicePlanChannelVo vo = 1; }
  291. message ServicePlanChannelUpdateReq { ServicePlanChannelVo vo = 1; }
  292. message ServicePlanChannelUpdateResp { ServicePlanChannelVo vo = 1; }
  293. message ServicePlanChannelDelReq { repeated int64 ids = 1; }
  294. message ServicePlanChannelListReq {
  295. Page page = 1;
  296. ServicePlanChannelVo vo = 2;
  297. repeated string productCodes = 3;
  298. repeated string channels = 4;
  299. repeated string channelItemIds = 5;
  300. repeated int64 servicePlanIds = 6;
  301. repeated int64 excludeIds = 7;
  302. }
  303. message ServicePlanChannelListResp {
  304. int64 total = 1;
  305. repeated ServicePlanChannelVo list = 2;
  306. }
  307. // end ServicePlanChannel
  308. service GoPlanClient {
  309. /** ServiceTypes Model */
  310. // ServiceTypesAdd
  311. rpc ServiceTypesAdd(ServiceTypesAddReq) returns (ServiceTypesAddResp);
  312. rpc ServiceTypesUpdate(ServiceTypesUpdateReq) returns (ServiceTypesUpdateResp);
  313. rpc ServiceTypesDel(ServiceTypesDelReq) returns (Empty);
  314. rpc ServiceTypesGet(ServiceTypesGetReq) returns (ServiceTypesGetResp);
  315. rpc ServiceTypesList(ServiceTypesListReq) returns (ServiceTypesListResp);
  316. /** ServiceBox Model */
  317. // ServiceBoxAdd
  318. rpc ServiceBoxAdd(ServiceBoxAddReq) returns (ServiceBoxAddResp);
  319. rpc ServiceBoxAddWithDetails(ServiceBoxAddWithDetailsReq) returns (ServiceBoxAddWithDetailsResp);
  320. rpc ServiceBoxUpdate(ServiceBoxUpdateReq) returns (ServiceBoxUpdateResp);
  321. rpc ServiceBoxUpdateWithDetails(ServiceBoxUpdateWithDetailsReq) returns (ServiceBoxUpdateWithDetailsResp);
  322. rpc ServiceBoxDel(ServiceBoxDelReq) returns (Empty);
  323. rpc ServiceBoxGet(ServiceBoxGetReq) returns (ServiceBoxGetResp);
  324. rpc ServiceBoxGetWithDetails(ServiceBoxGetWithDetailsReq) returns (ServiceBoxGetWithDetailsResp);
  325. rpc ServiceBoxList(ServiceBoxListReq) returns (ServiceBoxListResp);
  326. /** ServiceBoxTypes Model */
  327. // ServiceBoxTypesAdd
  328. rpc ServiceBoxTypesAdd(ServiceBoxTypesAddReq) returns (ServiceBoxTypesAddResp);
  329. rpc ServiceBoxTypesUpdate(ServiceBoxTypesUpdateReq) returns (ServiceBoxTypesUpdateResp);
  330. rpc ServiceBoxTypesDel(ServiceBoxTypesDelReq) returns (Empty);
  331. rpc ServiceBoxTypesGet(ServiceBoxTypesGetReq) returns (ServiceBoxTypesGetResp);
  332. rpc ServiceBoxTypesList(ServiceBoxTypesListReq) returns (ServiceBoxTypesListResp);
  333. /** ServicePlan Model */
  334. // ServicePlanAdd
  335. rpc ServicePlanAdd(ServicePlanAddReq) returns (ServicePlanAddResp);
  336. rpc ServicePlanAddWithBoxes(ServicePlanAddWithBoxesReq) returns (ServicePlanAddWithBoxesResp);
  337. rpc ServicePlanUpdate(ServicePlanUpdateReq) returns (ServicePlanUpdateResp);
  338. rpc ServicePlanUpdateWithBoxes(ServicePlanUpdateWithBoxesReq) returns (ServicePlanUpdateWithBoxesResp);
  339. rpc ServicePlanDel(ServicePlanDelReq) returns (Empty);
  340. rpc ServicePlanGet(ServicePlanGetReq) returns (ServicePlanGetResp);
  341. rpc ServicePlanGetWithBoxes(ServicePlanGetWithBoxesReq) returns (ServicePlanGetWithBoxesResp);
  342. rpc ServicePlanList(ServicePlanListReq) returns (ServicePlanListResp);
  343. /** ServicePlanBoxes Model */
  344. // ServicePlanBoxesAdd
  345. rpc ServicePlanBoxesAdd(ServicePlanBoxesAddReq) returns (ServicePlanBoxesAddResp);
  346. rpc ServicePlanBoxesUpdate(ServicePlanBoxesUpdateReq) returns (ServicePlanBoxesUpdateResp);
  347. rpc ServicePlanBoxesDel(ServicePlanBoxesDelReq) returns (Empty);
  348. rpc ServicePlanBoxesGet(ServicePlanBoxesGetReq) returns (ServicePlanBoxesGetResp);
  349. rpc ServicePlanBoxesList(ServicePlanBoxesListReq) returns (ServicePlanBoxesListResp);
  350. /** ServicePlanChannel Model */
  351. // ServicePlanChannelAdd
  352. rpc ServicePlanChannelAdd(ServicePlanChannelAddReq) returns (ServicePlanChannelAddResp);
  353. rpc ServicePlanChannelUpdate(ServicePlanChannelUpdateReq) returns (ServicePlanChannelUpdateResp);
  354. rpc ServicePlanChannelDel(ServicePlanChannelDelReq) returns (Empty);
  355. rpc ServicePlanChannelGet(ServicePlanChannelGetReq) returns (ServicePlanChannelGetResp);
  356. rpc ServicePlanChannelList(ServicePlanChannelListReq) returns (ServicePlanChannelListResp);
  357. }