api.proto 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. // - http://git.bilibili.co/platform/go-common/tree/master/app/tool/protoc-gen-bm
  2. // +bili:type=service
  3. syntax = "proto3";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. package tv.service.v1;
  6. option go_package = "api";
  7. // do not generate getXXX() method
  8. option (gogoproto.goproto_getters_all) = false;
  9. message UserInfoReq {
  10. int64 mid = 1;
  11. }
  12. // +bili:deepcopy-gen=true
  13. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.UserInfo
  14. message UserInfoReply {
  15. int64 mid = 1 [(gogoproto.jsontag) = "mid"];
  16. int32 vip_type = 2 [(gogoproto.jsontag) = "vip_type", (gogoproto.casttype) = "int8"];
  17. int32 pay_type = 3 [(gogoproto.jsontag) = "pay_type", (gogoproto.casttype) = "int8"];
  18. string pay_channel_id = 4 [(gogoproto.jsontag) = "pay_channel_id"];
  19. int32 status = 5 [(gogoproto.jsontag) = "status", (gogoproto.casttype) = "int8"];
  20. int64 overdue_time = 6 [(gogoproto.jsontag) = "overdue_time", (gogoproto.casttype) = "go-common/library/time.Time"];
  21. }
  22. message ChangeHistoryReq {
  23. int32 id = 1;
  24. }
  25. // +bili:deepcopy-gen=true
  26. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.UserChangeHistory
  27. message ChangeHistoryReply {
  28. int32 id = 1 [(gogoproto.jsontag) = "id"];
  29. int64 mid = 2 [(gogoproto.jsontag) = "mid"];
  30. int32 change_type = 3 [(gogoproto.jsontag) = "change_type", (gogoproto.casttype) = "int8"];
  31. int32 change_time = 4 [(gogoproto.jsontag) = "change_time", (gogoproto.casttype) = "go-common/library/time.Time"];
  32. string order_no = 5 [(gogoproto.jsontag) = "order_no"];
  33. int32 days = 6 [(gogoproto.jsontag) = "days"];
  34. string operator_id = 7 [(gogoproto.jsontag) = "operator_id"];
  35. int32 ctime = 8 [(gogoproto.jsontag) = "ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
  36. int32 mtime = 9 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
  37. }
  38. message ChangeHistorysReq {
  39. int64 mid = 1;
  40. int32 from = 2;
  41. int32 to = 3;
  42. int32 pn = 4;
  43. int32 ps = 5;
  44. }
  45. message ChangeHistorysReply {
  46. int32 total = 1 [(gogoproto.jsontag) = "total"];
  47. repeated ChangeHistoryReply historys = 2 [(gogoproto.jsontag) = "historys"];
  48. }
  49. message PanelInfoReq {
  50. int64 mid = 1;
  51. }
  52. // +bili:deepcopy-gen=true
  53. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.PanelPriceConfig
  54. message PanelPriceConfig {
  55. int32 id = 1 [(gogoproto.jsontag) = "id"];
  56. int32 pid = 2 [(gogoproto.jsontag) = "pid"];
  57. int32 platform = 3 [(gogoproto.jsontag) = "platform", (gogoproto.casttype) = "int8"];
  58. string product_name = 4 [(gogoproto.jsontag) = "product_name"];
  59. string product_id = 5 [(gogoproto.jsontag) = "product_id"];
  60. int32 suit_type = 6 [(gogoproto.jsontag) = "suit_type", (gogoproto.casttype) = "int8"];
  61. int32 month = 7 [(gogoproto.jsontag) = "month"];
  62. int32 sub_type = 8 [(gogoproto.jsontag) = "sub_type", (gogoproto.casttype) = "int8"];
  63. int32 price = 9 [(gogoproto.jsontag) = "price"];
  64. int32 selected = 10 [(gogoproto.jsontag) = "selected", (gogoproto.casttype) = "int8"];
  65. string remark = 11 [(gogoproto.jsontag) = "remark"];
  66. int32 status = 12 [(gogoproto.jsontag) = "status", (gogoproto.casttype) = "int8"];
  67. string superscript = 13 [(gogoproto.jsontag) = "superscript"];
  68. int32 origin_price = 14 [(gogoproto.jsontag) = "origin_price"];
  69. int32 max_num = 15 [(gogoproto.jsontag) = "max_num"];
  70. }
  71. message PanelPriceConfigs {
  72. repeated PanelPriceConfig price_configs = 1 [(gogoproto.jsontag) = "price_configs"];
  73. }
  74. message PanelInfoReply {
  75. map<string, PanelPriceConfigs> price_configs = 1 [(gogoproto.jsontag) = "price_configs"];
  76. }
  77. message GuestPanelInfoReq {
  78. }
  79. message GuestPanelInfoReply {
  80. map<string, PanelPriceConfigs> price_configs = 1;
  81. }
  82. message PayOrderReq {
  83. string order_no = 1;
  84. }
  85. // +bili:deepcopy-gen=true
  86. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.PayOrder
  87. message PayOrderReply {
  88. int32 id = 1 [(gogoproto.jsontag) = "id"];
  89. string order_no = 2 [(gogoproto.jsontag) = "order_no"];
  90. int32 platform = 3 [(gogoproto.jsontag) = "platform", (gogoproto.casttype) = "int8"];
  91. int32 order_type = 4 [(gogoproto.jsontag) = "order_type", (gogoproto.casttype) = "int8"];
  92. int64 mid = 5 [(gogoproto.jsontag) = "mid"];
  93. int32 buy_months = 6 [(gogoproto.jsontag) = "buy_months", (gogoproto.casttype) = "int8"];
  94. string product_id = 7 [(gogoproto.jsontag) = "product_id"];
  95. int32 money = 8 [(gogoproto.jsontag) = "money"];
  96. int32 quantity = 9 [(gogoproto.jsontag) = "quantity"];
  97. int32 status = 10 [(gogoproto.jsontag) = "status", (gogoproto.casttype) = "int8"];
  98. string third_trade_no = 11 [(gogoproto.jsontag) = "third_trade_no"];
  99. int32 payment_money = 12 [(gogoproto.jsontag) = "payment_money"];
  100. string payment_type = 13 [(gogoproto.jsontag) = "payment_type"];
  101. int32 payment_time = 14 [(gogoproto.jsontag) = "payment_time", (gogoproto.casttype) = "go-common/library/time.Time"];
  102. int32 ctime = 15 [(gogoproto.jsontag) = "ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
  103. int32 mtime = 16 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time"];
  104. }
  105. message CreateQrReq {
  106. int64 mid = 1;
  107. int32 pid = 2;
  108. int32 buy_num = 4;
  109. string guid = 5;
  110. string app_channel = 6;
  111. }
  112. // +bili:deepcopy-gen=true
  113. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.QR
  114. message CreateQrReply {
  115. int32 expire_at = 1 [(gogoproto.jsontag) = "expire_at", (gogoproto.casttype) = "go-common/library/time.Time"];
  116. string url = 2 [(gogoproto.jsontag) = "url"];
  117. string token = 3 [(gogoproto.jsontag) = "token"];
  118. }
  119. message CreateGuestQrReq {
  120. int32 pid = 1;
  121. int32 buy_num = 2;
  122. string guid = 3;
  123. string app_channel = 4;
  124. }
  125. // +bili:deepcopy-gen=true
  126. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.QR
  127. message CreateGuestQrReply {
  128. int32 expire_at = 1 [(gogoproto.jsontag) = "expire_at", (gogoproto.casttype) = "go-common/library/time.Time"];
  129. string url = 2 [(gogoproto.jsontag) = "url"];
  130. string token = 3 [(gogoproto.jsontag) = "token"];
  131. }
  132. // +bili:deepcopy-gen=true
  133. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.YstPayCallbackReq
  134. message PayCallbackReq {
  135. string seq_no = 1;
  136. string trace_no = 2;
  137. string trade_state = 3;
  138. string contract_id = 4;
  139. string sign = 5;
  140. }
  141. // +bili:deepcopy-gen=true
  142. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.YstPayCallbackReply
  143. message PayCallbackReply {
  144. string trace_no = 1 [(gogoproto.jsontag) = "traceno"];
  145. string result = 2 [(gogoproto.jsontag) = "result"];
  146. string msg = 3 [(gogoproto.jsontag) = "msg"];
  147. }
  148. message CreateOrderReq {
  149. string token = 1;
  150. int32 platform = 2 [(gogoproto.casttype) = "int8"];
  151. string payment_type = 3;
  152. string client_ip = 4;
  153. }
  154. // +bili:deepcopy-gen=true
  155. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.PayInfo
  156. message CreateOrderReply {
  157. string order_no = 1 [(gogoproto.jsontag) = "order_no"];
  158. string payment_type = 2 [(gogoproto.jsontag) = "payment_type"];
  159. string code_url = 3 [(gogoproto.jsontag) = "code_url"];
  160. int32 payment_money = 4 [(gogoproto.jsontag) = "payment_money"];
  161. }
  162. message CreateGuestOrderReq {
  163. int64 mid = 1;
  164. string token = 2;
  165. int32 platform = 3 [(gogoproto.casttype) = "int8"];
  166. string payment_type = 4;
  167. string client_ip = 5;
  168. }
  169. message CreateGuestOrderReply {
  170. string order_no = 1 [(gogoproto.jsontag) = "order_no"];
  171. string payment_type = 2 [(gogoproto.jsontag) = "payment_type"];
  172. string code_url = 3 [(gogoproto.jsontag) = "code_url"];
  173. int32 payment_money = 4 [(gogoproto.jsontag) = "payment_money"];
  174. }
  175. message RenewVipReq {
  176. int64 mid = 1;
  177. }
  178. message RenewVipReply {
  179. }
  180. // +bili:deepcopy-gen=true
  181. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.WxContractCallbackReq
  182. message WxContractCallbackReq {
  183. string contract_id = 1;
  184. string contract_code = 2;
  185. string change_type = 3;
  186. string contract_termination_mode = 4;
  187. string sign = 5;
  188. }
  189. // +bili:deepcopy-gen=true
  190. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.WxContractCallbackReply
  191. message WxContractCallbackReply {
  192. string contract_id = 1 [(gogoproto.jsontag) = "contract_id"];
  193. string result = 2 [(gogoproto.jsontag) = "result"];
  194. string msg = 3 [(gogoproto.jsontag) = "msg"];
  195. }
  196. message TokenInfoReq {
  197. repeated string token = 1;
  198. }
  199. // +bili:deepcopy-gen=true
  200. // +bili:deepcopy-gen:structs=go-common/app/service/main/tv/internal/model.TokenInfo
  201. message TokenInfo {
  202. string order_no = 1 [(gogoproto.jsontag) = "order_no"];
  203. int32 status = 2 [(gogoproto.jsontag) = "status", (gogoproto.casttype) = "int8"];
  204. int64 mid = 3 [(gogoproto.jsontag) = "mid"];
  205. string token = 4 [(gogoproto.jsontag) = "token"];
  206. }
  207. message TokenInfoReply {
  208. repeated TokenInfo tokens = 1 [(gogoproto.jsontag) = "tokens"];
  209. }
  210. message YstUserInfoReq {
  211. int64 mid = 1;
  212. string sign = 2;
  213. }
  214. message YstUserInfoReply {
  215. int64 mid = 1 [(gogoproto.jsontag) = "mid"];
  216. int32 vip_type = 2 [(gogoproto.jsontag) = "vip_type", (gogoproto.casttype) = "int8"];
  217. int32 pay_type = 3 [(gogoproto.jsontag) = "pay_type", (gogoproto.casttype) = "int8"];
  218. string pay_channel_id = 4 [(gogoproto.jsontag) = "pay_channel_id"];
  219. int32 status = 5 [(gogoproto.jsontag) = "status", (gogoproto.casttype) = "int8"];
  220. int64 overdue_time = 6 [(gogoproto.jsontag) = "overdue_time", (gogoproto.casttype) = "go-common/library/time.Time"];
  221. string result = 7 [(gogoproto.jsontag) = "result"];
  222. string msg = 8 [(gogoproto.jsontag) = "msg"];
  223. }
  224. service TVService {
  225. // 查询会员信息
  226. rpc UserInfo (UserInfoReq) returns (UserInfoReply);
  227. rpc ChangeHistory (ChangeHistoryReq) returns (ChangeHistoryReply);
  228. rpc ChangeHistorys (ChangeHistorysReq) returns (ChangeHistorysReply);
  229. rpc PanelInfo (PanelInfoReq) returns (PanelInfoReply);
  230. rpc GuestPanelInfo (GuestPanelInfoReq) returns (GuestPanelInfoReply);
  231. rpc PayOrder (PayOrderReq) returns (PayOrderReply);
  232. rpc CreateQr (CreateQrReq) returns (CreateQrReply);
  233. rpc CreateGuestQr (CreateGuestQrReq) returns (CreateGuestQrReply);
  234. rpc TokenInfo (TokenInfoReq) returns (TokenInfoReply);
  235. rpc CreateOrder (CreateOrderReq) returns (CreateOrderReply);
  236. rpc CreateGuestOrder (CreateGuestOrderReq) returns (CreateGuestOrderReply);
  237. rpc RenewVip (RenewVipReq) returns (RenewVipReply);
  238. rpc YstUserInfo (YstUserInfoReq) returns (YstUserInfoReply);
  239. rpc PayCallback (PayCallbackReq) returns (PayCallbackReply);
  240. rpc WxContractCallback (WxContractCallbackReq) returns (WxContractCallbackReply);
  241. }