game.proto 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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. message GameVo {
  6. int64 id = 1;
  7. string name = 2;
  8. string pkg = 3;
  9. string categories = 4;
  10. string icon = 5;
  11. string internal_icon = 6;
  12. string source_icon = 7;
  13. int64 status = 8;
  14. int64 state = 9;
  15. int64 enableRating = 10;
  16. int64 gameUpdateTime = 11;
  17. int64 gameBoostCount = 12;
  18. string gameBoostCountryCount = 13;
  19. int64 createTime = 14;
  20. int64 updateTime = 15;
  21. }
  22. message GameReq { GameVo vo = 1; }
  23. message GameListReq {
  24. Page page = 1;
  25. repeated string pkgs = 2;
  26. GameVo vo = 3;
  27. }
  28. message GameListRes {
  29. int64 total = 1;
  30. repeated GameVo list = 2;
  31. }
  32. message RelGameRankVo {
  33. int64 id = 1;
  34. int64 gameId = 2;
  35. int64 rankId = 3;
  36. int64 weight = 4;
  37. int64 createTime = 5;
  38. int64 updateTime = 6;
  39. }
  40. message RelGameRankReq { RelGameRankVo vo = 1; }
  41. message RelGameRankListReq {
  42. Page page = 1;
  43. RelGameRankVo vo = 2;
  44. }
  45. message RelGameRankListRes {
  46. int64 total = 1;
  47. repeated RelGameRankVo list = 2;
  48. }
  49. message RelGameVpnGroupVo {
  50. int64 id = 1;
  51. int64 gameId = 2;
  52. string productCode = 3;
  53. int64 vpnGroupId = 4;
  54. int64 status = 5;
  55. int64 createTime = 6;
  56. int64 updateTime = 7;
  57. }
  58. message RelGameVpnGroupReq { RelGameVpnGroupVo vo = 1; }
  59. message RelGameVpnGroupListReq {
  60. repeated int64 gameIds = 1;
  61. RelGameVpnGroupVo vo = 2;
  62. }
  63. message RelGameVpnGroupListRes {
  64. int64 total = 1;
  65. repeated RelGameVpnGroupVo list = 2;
  66. }
  67. message GameRedisHScanByNameReq {
  68. string name = 1;
  69. int64 cursor = 2;
  70. int64 count = 3;
  71. }
  72. message GameRedisHScanByNameResp {
  73. repeated int64 ids = 1;
  74. int64 cursor = 2;
  75. }
  76. message GameCustomerVo {
  77. int64 id = 1;
  78. string name = 2;
  79. string pkg = 3;
  80. string icon = 4;
  81. int64 createTime = 5;
  82. int64 updateTime = 6;
  83. }
  84. message GameCustomerListReq {
  85. Page page = 1;
  86. repeated string pkgs = 2;
  87. GameCustomerVo vo = 3;
  88. }
  89. message GameCustomerListRes {
  90. int64 total = 1;
  91. repeated GameCustomerVo list = 2;
  92. }
  93. message GameCustomerAddResp {
  94. GameCustomerVo vo = 1;
  95. bool ExistBoost = 2;
  96. }
  97. message GameCategoryVo {
  98. int64 id = 1;
  99. string code = 2;
  100. string name = 3;
  101. string described = 4;
  102. int64 createTime = 5;
  103. int64 updateTime = 6;
  104. }
  105. message GameCategoryReq { GameCategoryVo vo = 1; }
  106. message GameCategoryListReq {
  107. Page page = 1;
  108. GameCategoryVo vo = 3;
  109. }
  110. message GameCategoryListRes {
  111. int64 total = 1;
  112. repeated GameCategoryVo list = 2;
  113. }
  114. // 定义一个GameRank的属性字段
  115. message GameRankOption { bool showRanking = 1; }
  116. service GoGameClient {
  117. // 加速器游戏管理
  118. rpc GameAdd(GameVo) returns (GameVo);
  119. rpc GameUpdate(GameVo) returns (Empty);
  120. rpc GameDel(Ids) returns (Empty);
  121. rpc GameGet(GameReq) returns (GameVo);
  122. rpc GameList(GameListReq) returns (GameListRes);
  123. rpc GameAll(Request) returns (GameListRes);
  124. rpc GameRedisHScanByName(GameRedisHScanByNameReq)
  125. returns (GameRedisHScanByNameResp);
  126. // 游戏榜单关联关系
  127. rpc RelGameRankAdd(RelGameRankVo) returns (RelGameRankVo);
  128. rpc RelGameRankUpdate(RelGameRankVo) returns (Empty);
  129. rpc RelGameRankDel(Ids) returns (Empty);
  130. rpc RelGameRankGet(RelGameRankReq) returns (RelGameRankVo);
  131. rpc RelGameRankList(RelGameRankListReq) returns (RelGameRankListRes);
  132. // 游戏地域关联关系
  133. rpc RelGameVpnGroupAdd(RelGameVpnGroupVo) returns (RelGameVpnGroupVo);
  134. rpc RelGameVpnGroupUpdate(RelGameVpnGroupVo) returns (Empty);
  135. rpc RelGameVpnGroupDel(Ids) returns (Empty);
  136. rpc RelGameVpnGroupGet(RelGameVpnGroupReq) returns (RelGameVpnGroupVo);
  137. rpc RelGameVpnGroupList(RelGameVpnGroupListReq)
  138. returns (RelGameVpnGroupListRes);
  139. // 用户提交游戏
  140. rpc GameCustomerList(GameCustomerListReq) returns (GameCustomerListRes);
  141. rpc GameCustomerAdd(GameCustomerVo) returns (GameCustomerAddResp);
  142. rpc GameCustomerDel(Ids) returns (Empty);
  143. rpc GameCategoryAdd(GameCategoryVo) returns (GameCategoryVo);
  144. rpc GameCategoryUpdate(GameCategoryVo) returns (Empty);
  145. rpc GameCategoryDel(Ids) returns (Empty);
  146. rpc GameCategoryGet(GameCategoryReq) returns (GameCategoryVo);
  147. rpc GameCategoryList(GameCategoryListReq) returns (GameCategoryListRes);
  148. rpc GameCategoryAll(Request) returns (GameCategoryListRes);
  149. }