api.proto 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. syntax = "proto3";
  2. // use {app_id}.{version} as package name
  3. package account.coupon;
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. option go_package = "v1";
  6. message CaptchaTokenReq {
  7. string ip = 1;
  8. }
  9. message CaptchaTokenReply {
  10. string token = 1;
  11. string url = 2;
  12. }
  13. message UseCouponCodeReq{
  14. string token =1;
  15. string code = 2;
  16. string verify =3;
  17. string ip =4;
  18. int64 mid = 5;
  19. }
  20. message UseCouponCodeResp{
  21. string coupon_token = 1;
  22. double coupon_amount = 2;
  23. double full_amount = 3;
  24. string platfrom_limit_explain = 4;
  25. int32 product_limit_month = 5;
  26. int32 product_limit_renewal = 6;
  27. }
  28. message UsableAllowanceCouponV2Req{
  29. int64 mid =1;
  30. repeated ModelPriceInfo priceInfo = 2;
  31. }
  32. message ModelPriceInfo {
  33. double price = 1;
  34. int64 plat = 2;
  35. int32 prodLimMonth = 3;
  36. int32 prodLimRenewal = 4;
  37. }
  38. message UsableAllowanceCouponV2Reply{
  39. string coupon_tip = 1;
  40. ModelCouponAllowancePanelInfo coupon_info = 2;
  41. }
  42. message ModelCouponAllowancePanelInfo{
  43. string coupon_token = 1;
  44. double coupon_amount = 2;
  45. int32 state = 3;
  46. string full_limit_explain = 4;
  47. string scope_explain = 5;
  48. double full_amount = 6;
  49. double coupon_discount_price = 7;
  50. int64 start_time = 8;
  51. int64 expire_time = 9;
  52. int32 selected = 10;
  53. string disables_explains = 11;
  54. string order_no = 12;
  55. string name = 13;
  56. int32 usable = 14;
  57. }
  58. service Coupon {
  59. // CaptchaToken captcha token.
  60. rpc CaptchaToken(CaptchaTokenReq) returns(CaptchaTokenReply);
  61. // UseCouponCode use coupon code.
  62. rpc UseCouponCode(UseCouponCodeReq) returns(UseCouponCodeResp);
  63. // UsableAllowanceCouponV2 use allowance coupon v2.
  64. rpc UsableAllowanceCouponV2(UsableAllowanceCouponV2Req) returns(UsableAllowanceCouponV2Reply);
  65. }