api.proto 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. syntax = "proto3";
  2. package account.point;
  3. option go_package = "v1";
  4. message AddPointReply {
  5. int32 status = 1;
  6. }
  7. message AddPointReq {
  8. ModelArgPoint pc = 2;
  9. }
  10. message AllConfigReply {
  11. map<string, int64> data_0 = 1;
  12. }
  13. message AllConfigReq {
  14. }
  15. message CloseReply {
  16. }
  17. message CloseReq {
  18. }
  19. message ConfigReply {
  20. int64 point = 1;
  21. }
  22. message ConfigReq {
  23. int32 change_type = 2;
  24. int64 mid = 3;
  25. double bp = 4;
  26. }
  27. message ConsumePointReply {
  28. int32 status = 1;
  29. }
  30. message ConsumePointReq {
  31. ModelArgPointConsume pc = 2;
  32. }
  33. message ModelArgPoint {
  34. int64 mid = 1;
  35. int64 change_type = 2;
  36. int64 point = 3;
  37. string remark = 4;
  38. string operator = 5;
  39. }
  40. message ModelArgPointAdd {
  41. int64 mid = 1;
  42. int32 change_type = 2;
  43. string relation_id = 3;
  44. double bcoin = 4;
  45. string remark = 5;
  46. string order_id = 6;
  47. }
  48. message ModelArgPointConsume {
  49. int64 mid = 1;
  50. int64 change_type = 2;
  51. string relation_id = 3;
  52. int64 point = 4;
  53. string remark = 5;
  54. }
  55. message ModelOldPointHistory {
  56. int64 id = 1;
  57. int64 mid = 2;
  58. int64 point = 3;
  59. string order_id = 4;
  60. int32 change_type = 5;
  61. int64 change_time = 6;
  62. string relation_id = 7;
  63. int64 point_balance = 8;
  64. string remark = 9;
  65. string operator = 10;
  66. }
  67. message ModelPointHistory {
  68. int64 id = 1;
  69. int64 mid = 2;
  70. int64 point = 3;
  71. string order_id = 4;
  72. int32 change_type = 5;
  73. int64 change_time = 6;
  74. string relation_id = 7;
  75. int64 point_balance = 8;
  76. string remark = 9;
  77. string operator = 10;
  78. }
  79. message ModelPointInfo {
  80. int64 mid = 1;
  81. int64 point_balance = 2;
  82. int64 ver = 3;
  83. }
  84. message OldPointHistoryReply {
  85. repeated ModelOldPointHistory phs = 1;
  86. int32 total = 2;
  87. }
  88. message OldPointHistoryReq {
  89. int64 mid = 2;
  90. int32 pn = 3;
  91. int32 ps = 4;
  92. }
  93. message PingReply {
  94. }
  95. message PingReq {
  96. }
  97. message PointAddByBpReply {
  98. int64 p = 1;
  99. }
  100. message PointAddByBpReq {
  101. ModelArgPointAdd pa = 2;
  102. }
  103. message PointHistoryReply {
  104. repeated ModelPointHistory phs = 1;
  105. int32 total = 2;
  106. int32 ncursor = 3;
  107. }
  108. message PointHistoryReq {
  109. int64 mid = 2;
  110. int32 cursor = 3;
  111. int32 ps = 4;
  112. }
  113. message PointInfoReply {
  114. ModelPointInfo pi = 1;
  115. }
  116. message PointInfoReq {
  117. int64 mid = 2;
  118. }
  119. service Point {
  120. // Config get point config.
  121. rpc Config(ConfigReq) returns(ConfigReply);
  122. // AllConfig all point config
  123. rpc AllConfig(AllConfigReq) returns(AllConfigReply);
  124. // Ping Service
  125. rpc Ping(PingReq) returns(PingReply);
  126. // Close Service
  127. rpc Close(CloseReq) returns(CloseReply);
  128. // PointInfo .
  129. rpc PointInfo(PointInfoReq) returns(PointInfoReply);
  130. // PointHistory .
  131. rpc PointHistory(PointHistoryReq) returns(PointHistoryReply);
  132. // OldPointHistory old point history .
  133. rpc OldPointHistory(OldPointHistoryReq) returns(OldPointHistoryReply);
  134. // PointAddByBp by bp.
  135. rpc PointAddByBp(PointAddByBpReq) returns(PointAddByBpReply);
  136. // ConsumePoint .
  137. rpc ConsumePoint(ConsumePointReq) returns(ConsumePointReply);
  138. // AddPoint .
  139. rpc AddPoint(AddPointReq) returns(AddPointReply);
  140. }