api.proto 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. syntax = "proto3";
  2. package live.xlottery.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. service Capsule {
  6. rpc get_detail(CapsuleGetDetailReq) returns (CapsuleGetDetailResp);
  7. rpc open_capsule(CapsuleOpenCapsuleReq) returns (CapsuleOpenCapsuleResp);
  8. rpc get_coin_list(GetCoinListReq) returns (GetCoinListResp);
  9. rpc update_coin_config(UpdateCoinConfigReq) returns (UpdateCoinConfigResp);
  10. rpc update_coin_status(UpdateCoinStatusReq) returns (UpdateCoinStatusResp);
  11. rpc delete_coin(DeleteCoinReq) returns (DeleteCoinResp);
  12. rpc get_pool_list(GetPoolListReq) returns (GetPoolListResp);
  13. rpc update_pool(UpdatePoolReq) returns (UpdatePoolResp);
  14. rpc delete_pool(DeletePoolReq) returns (DeletePoolResp);
  15. rpc update_pool_status(UpdatePoolStatusReq) returns (UpdatePoolStatusResp);
  16. rpc get_pool_prize(GetPoolPrizeReq) returns (GetPoolPrizeResp);
  17. rpc get_prize_type (GetPrizeTypeReq) returns (GetPrizeTypeResp);
  18. rpc get_prize_expire (GetPrizeExpireReq) returns (GetPrizeExpireResp);
  19. rpc update_pool_prize(UpdatePoolPrizeReq) returns (UpdatePoolPrizeResp);
  20. rpc delete_pool_prize(DeletePoolPrizeReq) returns (DeletePoolPrizeResp);
  21. rpc get_capsule_info (CapsuleGetCapsuleInfoReq) returns (CapsuleGetCapsuleInfoResp);
  22. rpc open_capsule_by_type (CapsuleOpenCapsuleByTypeReq) returns (CapsuleOpenCapsuleByTypeResp);
  23. rpc get_coupon_list (CapsuleGetCouponListReq) returns (CapsuleGetCouponListResp);
  24. }
  25. message CapsuleGetDetailReq {
  26. // 用户uid
  27. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  28. // 来源 h5 web room
  29. string from = 2 [(gogoproto.jsontag) = "from"];
  30. }
  31. message Usage {
  32. // 用法描述
  33. string text = 1 [(gogoproto.jsontag) = "text"];
  34. // 跳转链接
  35. string url = 2 [(gogoproto.jsontag) = "url"];
  36. }
  37. message Progress {
  38. // 当前进度
  39. int64 now = 1 [(gogoproto.jsontag) = "now"];
  40. // 最大进度
  41. int64 max = 2 [(gogoproto.jsontag) = "max"];
  42. }
  43. message CapsuleGetDetailResp {
  44. // 普通扭蛋信息
  45. CapsuleInfo normal = 1 [(gogoproto.jsontag) = "normal"];
  46. // 梦幻扭蛋信息,若梦幻扭蛋status=false,则无coin、change、process、gift、list字段
  47. CapsuleInfo colorful = 2 [(gogoproto.jsontag) = "colorful"];
  48. message Gift {
  49. // 礼物名称
  50. string name = 2 [(gogoproto.jsontag) = "name"];
  51. // 礼物图片
  52. string image = 3 [(gogoproto.jsontag) = "image"];
  53. // 用法
  54. Usage usage = 4 [(gogoproto.jsontag) = "usage"];
  55. // web礼物图片
  56. string web_image = 5 [(gogoproto.jsontag) = "web_image"];
  57. // mobile礼物图片
  58. string mobile_image = 6 [(gogoproto.jsontag) = "mobile_image"];
  59. }
  60. message List {
  61. // 数量
  62. int64 num = 1 [(gogoproto.jsontag) = "num"];
  63. // 礼物名称
  64. string gift = 2 [(gogoproto.jsontag) = "gift"];
  65. // 时间
  66. string date = 3 [(gogoproto.jsontag) = "date"];
  67. // 用户名
  68. string name = 4 [(gogoproto.jsontag) = "name"];
  69. }
  70. message CapsuleInfo {
  71. //
  72. bool status = 1 [(gogoproto.jsontag) = "status"];
  73. // 扭蛋数量
  74. int64 coin = 2 [(gogoproto.jsontag) = "coin"];
  75. // 变化值
  76. int64 change = 3 [(gogoproto.jsontag) = "change"];
  77. // 进度
  78. Progress progress = 4 [(gogoproto.jsontag) = "progress"];
  79. // 规则
  80. string rule = 5 [(gogoproto.jsontag) = "rule"];
  81. // 奖品列表
  82. repeated Gift gift = 6 [(gogoproto.jsontag) = "gift"];
  83. // 历史获奖列表
  84. repeated List list = 7 [(gogoproto.jsontag) = "list"];
  85. }
  86. }
  87. message CapsuleOpenCapsuleReq {
  88. // 用户uid
  89. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  90. // 扭蛋类型
  91. string type = 2 [(gogoproto.jsontag) = "type"];
  92. // 扭的个数
  93. int64 count = 3 [(gogoproto.jsontag) = "count"];
  94. string platform = 4 [(gogoproto.jsontag) = "platform"];
  95. }
  96. message CapsuleOpenCapsuleResp {
  97. // 扭蛋币扣除状态
  98. bool status = 1 [(gogoproto.jsontag) = "status"];
  99. // 奖品文案
  100. repeated string text = 2 [(gogoproto.jsontag) = "text"];
  101. // 是否包含实物奖品
  102. bool isEntity = 3 [(gogoproto.jsontag) = "isEntity"];
  103. // 用户扭蛋币拥有状态
  104. Info info = 4 [(gogoproto.jsontag) = "info"];
  105. // 头衔? 恒为空字符串, 忽略之
  106. string showTitle = 5 [(gogoproto.jsontag) = "showTitle"];
  107. // 奖品列表
  108. repeated Award awards = 6 [(gogoproto.jsontag) = "awards"];
  109. message CapsuleInfo {
  110. // 拥有的币
  111. int64 coin = 1 [(gogoproto.jsontag) = "coin"];
  112. // 变化值
  113. int64 change = 2 [(gogoproto.jsontag) = "change"];
  114. // 进度
  115. Progress progress = 3 [(gogoproto.jsontag) = "progress"];
  116. }
  117. message Info {
  118. // 普通扭蛋币
  119. CapsuleInfo normal = 1 [(gogoproto.jsontag) = "normal"];
  120. // 梦幻扭蛋币
  121. CapsuleInfo colorful = 2 [(gogoproto.jsontag) = "colorful"];
  122. }
  123. message Award {
  124. // 奖品名字
  125. string name = 2 [(gogoproto.jsontag) = "name"];
  126. // 奖品数量
  127. int64 num = 3 [(gogoproto.jsontag) = "num"];
  128. // 奖品 X 数量
  129. string text = 4 [(gogoproto.jsontag) = "text"];
  130. // 奖品图片
  131. string img = 5 [(gogoproto.jsontag) = "img"];
  132. // 奖品用法说明
  133. Usage usage = 6 [(gogoproto.jsontag) = "usage"];
  134. // web礼物图片
  135. string web_image = 7 [(gogoproto.jsontag) = "web_image"];
  136. // mobile礼物图片
  137. string mobile_image = 8 [(gogoproto.jsontag) = "mobile_image"];
  138. }
  139. }
  140. message CapsuleGetCapsuleInfoReq {
  141. // 用户uid
  142. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  143. // 类型
  144. string type = 2 [(gogoproto.jsontag) = "type"];
  145. // 来源 h5 web room
  146. string from = 3 [(gogoproto.jsontag) = "from"];
  147. }
  148. message CapsuleGetCapsuleInfoResp {
  149. message GiftList {
  150. // 礼物id
  151. int64 id = 1 [(gogoproto.jsontag) = "id"];
  152. // 礼物名称
  153. string name = 2 [(gogoproto.jsontag) = "name"];
  154. // 礼物数量
  155. int64 num = 3 [(gogoproto.jsontag) = "num"];
  156. // 权重
  157. int64 weight = 4 [(gogoproto.jsontag) = "weight"];
  158. // 礼物图片
  159. string web_url = 5 [(gogoproto.jsontag) = "web_url"];
  160. // 礼物图片
  161. string mobile_url = 6 [(gogoproto.jsontag) = "mobile_url"];
  162. // 用法
  163. Usage usage = 7 [(gogoproto.jsontag) = "usage"];
  164. // 奖品类型 2 头衔
  165. int64 type = 8 [(gogoproto.jsontag) = "type"];
  166. // 过期时间
  167. string expire = 9 [(gogoproto.jsontag) = "expire"];
  168. }
  169. message GiftFilter {
  170. // 礼物id
  171. int64 id = 1 [(gogoproto.jsontag) = "id"];
  172. // 礼物名称
  173. string name = 2 [(gogoproto.jsontag) = "name"];
  174. // 礼物图片
  175. string web_url = 3 [(gogoproto.jsontag) = "web_url"];
  176. // 礼物图片
  177. string mobile_url = 4 [(gogoproto.jsontag) = "mobile_url"];
  178. // 用法
  179. Usage usage = 5 [(gogoproto.jsontag) = "usage"];
  180. }
  181. // 扭蛋数量
  182. int64 coin = 1 [(gogoproto.jsontag) = "coin"];
  183. // 规则
  184. string rule = 2 [(gogoproto.jsontag) = "rule"];
  185. // 奖品列表,包含数量
  186. repeated GiftList gift_list = 3 [(gogoproto.jsontag) = "gift_list"];
  187. // 奖品列表,不包含数量,同一类别只有一条
  188. repeated GiftFilter gift_filter = 4 [(gogoproto.jsontag) = "gift_filter"];
  189. }
  190. message CapsuleOpenCapsuleByTypeReq {
  191. // 用户uid
  192. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  193. // 扭蛋类型,week:周星
  194. string type = 2 [(gogoproto.jsontag) = "type"];
  195. // 扭的个数 1 10 100
  196. int64 count = 3 [(gogoproto.jsontag) = "count"];
  197. // 平台
  198. string platform = 4 [(gogoproto.jsontag) = "platform"];
  199. }
  200. message CapsuleOpenCapsuleByTypeResp {
  201. message CapsuleInfo {
  202. // 拥有的币
  203. int64 coin = 1 [(gogoproto.jsontag) = "coin"];
  204. }
  205. message Award {
  206. // 奖品id
  207. int64 id = 1 [(gogoproto.jsontag) = "id"];
  208. // 奖品名字
  209. string name = 2 [(gogoproto.jsontag) = "name"];
  210. // 奖品数量
  211. int64 num = 3 [(gogoproto.jsontag) = "num"];
  212. // 奖品 X 数量
  213. string text = 4 [(gogoproto.jsontag) = "text"];
  214. // 礼物图片
  215. string web_url = 5 [(gogoproto.jsontag) = "web_url"];
  216. // 礼物图片
  217. string mobile_url = 6 [(gogoproto.jsontag) = "mobile_url"];
  218. // 奖品用法说明
  219. Usage usage = 7 [(gogoproto.jsontag) = "usage"];
  220. // 奖品权重
  221. int64 weight = 8 [(gogoproto.jsontag) = "weight"];
  222. // 奖品类型 2 头衔
  223. int64 type = 9 [(gogoproto.jsontag) = "type"];
  224. // 过期时间
  225. string expire = 10 [(gogoproto.jsontag) = "expire"];
  226. }
  227. // 扭蛋币扣除状态
  228. bool status = 1 [(gogoproto.jsontag) = "status"];
  229. // 是否包含实物奖品
  230. bool isEntity = 2 [(gogoproto.jsontag) = "isEntity"];
  231. // 用户扭蛋币拥有状态
  232. CapsuleInfo info = 3 [(gogoproto.jsontag) = "info"];
  233. // 奖品列表
  234. repeated Award awards = 4 [(gogoproto.jsontag) = "awards"];
  235. // 奖品列表
  236. repeated string text = 5 [(gogoproto.jsontag) = "text"];
  237. }
  238. message GetCoinListReq{
  239. int64 page = 1 [(gogoproto.jsontag) = "page", (gogoproto.moretags) = 'form:"page" validate:"required"']; //页码,从1开始
  240. int64 page_size = 2 [(gogoproto.jsontag) = "page_size", (gogoproto.moretags) = 'form:"page_size" validate:"required"'];//页面的大小
  241. }
  242. message GetCoinListResp{
  243. int64 total = 1 [(gogoproto.jsontag) = "total"]; //
  244. int64 total_page = 2 [(gogoproto.jsontag) = "total_page"];
  245. repeated List list = 3 [(gogoproto.jsontag) = "list"];
  246. message List{
  247. int64 id = 1 [(gogoproto.jsontag) = "id"];//扭蛋ID
  248. string title = 2 [(gogoproto.jsontag) = "title"];//名称 普通扭蛋, 梦幻扭蛋
  249. int64 change_num = 3 [(gogoproto.jsontag) = "change_num"];//转化数量
  250. int64 start_time = 4 [(gogoproto.jsontag) = "start_time"];//开始时间
  251. int64 end_time = 5 [(gogoproto.jsontag) = "end_time"];//结束时间
  252. int64 status = 6 [(gogoproto.jsontag) = "status"]; //状态 0为下线,1为上线
  253. int64 gift_type = 7 [(gogoproto.jsontag) = "gift_type"];//获得方式 1为所有瓜子道具,2为所有金瓜子道具,3为指定道具ID
  254. string gift_config = 8 [(gogoproto.jsontag) = "gift_config"];// 道具的ID
  255. repeated AreaIds area_ids = 9 [(gogoproto.jsontag) = "area_ids"];//活动分区
  256. message AreaIds{
  257. int64 parent_id = 1 [(gogoproto.jsontag) = "parent_id"];// 父分区ID
  258. int64 is_all = 2 [(gogoproto.jsontag) = "is_all"];// 是否全选
  259. repeated int64 list = 3 [(gogoproto.jsontag) = "list"];// 子分区ID
  260. }
  261. }
  262. }
  263. message UpdateCoinConfigReq{
  264. int64 id = 1 [(gogoproto.jsontag) = "id",(gogoproto.moretags) = 'form:"id"'];//扭蛋ID
  265. string title = 2 [(gogoproto.jsontag) = "title", (gogoproto.moretags) = 'form:"title" validate:"required"'];//名称 普通扭蛋, 梦幻扭蛋
  266. int64 change_num = 3 [(gogoproto.jsontag) = "change_num", (gogoproto.moretags) = 'form:"change_num" validate:"required"'];//转化数量
  267. int64 start_time = 4 [(gogoproto.jsontag) = "start_time", (gogoproto.moretags) = 'form:"start_time" validate:"required"'];//开始时间
  268. int64 end_time = 5 [(gogoproto.jsontag) = "end_time", (gogoproto.moretags) = 'form:"end_time" validate:"required"'];//结束时间
  269. int64 status = 6 [(gogoproto.jsontag) = "status", (gogoproto.moretags) = 'form:"status" validate:"required"']; //状态 0为下线,1为上线
  270. int64 gift_type = 7 [(gogoproto.jsontag) = "gift_type", (gogoproto.moretags) = 'form:"gift_type" validate:"required"'];//获得方式 1为所有瓜子道具,2为所有金瓜子道具,3为指定道具ID
  271. repeated int64 gift_ids = 8 [(gogoproto.jsontag) = "gift_ids", (gogoproto.moretags) = 'form:"gift_ids"'];// 道具的ID
  272. repeated AreaIds area_ids = 9 [(gogoproto.jsontag) = "area_ids", (gogoproto.moretags) = 'form:"area_ids" validate:"required"'];//活动分区
  273. message AreaIds{
  274. int64 parent_id = 1 [(gogoproto.jsontag) = "parent_id", (gogoproto.moretags) = 'form:"parent_id" validate:"required"'];// 父分区ID
  275. int64 is_all = 2 [(gogoproto.jsontag) = "is_all", (gogoproto.moretags) = 'form:"is_all"'];// 是否全选
  276. repeated int64 list = 3 [(gogoproto.jsontag) = "list", (gogoproto.moretags) = 'form:"list" validate:"required"'];// 子分区ID
  277. }
  278. }
  279. message UpdateCoinConfigResp{
  280. bool status = 1 [(gogoproto.jsontag) = "status"];
  281. }
  282. message UpdateCoinStatusReq{
  283. int64 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = 'form:"id" validate:"required"']; //扭蛋币id
  284. int64 status = 2 [(gogoproto.jsontag) = "status", (gogoproto.moretags) = 'form:"status"'];//状态 0为下线,1为上线
  285. }
  286. message UpdateCoinStatusResp{
  287. bool status = 1 [(gogoproto.jsontag) = "status"];
  288. }
  289. message DeleteCoinReq{
  290. int64 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = 'form:"id" validate:"required"'];//扭蛋币id
  291. }
  292. message DeleteCoinResp{
  293. bool status = 1 [(gogoproto.jsontag) = "status"];
  294. }
  295. message GetPoolListReq{
  296. int64 page = 1 [(gogoproto.jsontag) = "page", (gogoproto.moretags) = 'form:"page" validate:"required"'];//页码
  297. int64 page_size = 2 [(gogoproto.jsontag) = "page_size", (gogoproto.moretags) = 'form:"page_size" validate:"required"'];//页面的大小
  298. }
  299. message GetPoolListResp{
  300. int64 total = 1 [(gogoproto.jsontag) = "total"];
  301. int64 total_page = 2 [(gogoproto.jsontag) = "total_page"];
  302. repeated List list = 3 [(gogoproto.jsontag) = "list"];
  303. message List{
  304. int64 id = 1 [(gogoproto.jsontag) = "id"];// 奖池id
  305. int64 coin_id = 2 [(gogoproto.jsontag) = "coin_id"];// 扭蛋名称
  306. string title = 3 [(gogoproto.jsontag) = "title"];//奖池名称
  307. string coin_title = 8 [(gogoproto.jsontag) = "coin_title"];//扭蛋币名称
  308. int64 start_time = 4 [(gogoproto.jsontag) = "start_time"];//开始时间
  309. int64 end_time = 5 [(gogoproto.jsontag) = "end_time"];//结束时间
  310. int64 status = 6 [(gogoproto.jsontag) = "status"];//状态 0为下线,1为上线
  311. string rule = 7 [(gogoproto.jsontag) = "rule"];//描述
  312. }
  313. }
  314. message UpdatePoolReq{
  315. int64 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = 'form:"id"'];// 奖池id
  316. int64 coin_id = 2 [(gogoproto.jsontag) = "coin_id", (gogoproto.moretags) = 'form:"coin_id" validate:"required"'];// 扭蛋名称
  317. string title = 3 [(gogoproto.jsontag) = "title", (gogoproto.moretags) = 'form:"title" validate:"required"'];//奖池名称
  318. int64 start_time = 4 [(gogoproto.jsontag) = "start_time", (gogoproto.moretags) = 'form:"start_time" validate:"required"'];//开始时间
  319. int64 end_time = 5 [(gogoproto.jsontag) = "end_time", (gogoproto.moretags) = 'form:"end_time" validate:"required"'];//结束时间
  320. string rule = 6 [(gogoproto.jsontag) = "rule", (gogoproto.moretags) = 'form:"rule" validate:"required"'];//描述
  321. }
  322. message UpdatePoolResp{
  323. bool status = 1 [(gogoproto.jsontag) = "status"];
  324. }
  325. message DeletePoolReq{
  326. int64 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = 'form:"id" validate:"required"'];//奖池id
  327. }
  328. message DeletePoolResp{
  329. bool status = 1 [(gogoproto.jsontag) = "status"];
  330. }
  331. message UpdatePoolStatusReq{
  332. int64 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = 'form:"id" validate:"required"'];//奖池id
  333. int64 status = 2 [(gogoproto.jsontag) = "status", (gogoproto.moretags) = 'form:"status"'];//状态 0为未上线,1为上线
  334. }
  335. message UpdatePoolStatusResp{
  336. bool status = 1 [(gogoproto.jsontag) = "status"];
  337. }
  338. message GetPoolPrizeReq{
  339. int64 pool_id = 1 [(gogoproto.jsontag) = "pool_id", (gogoproto.moretags) = 'form:"pool_id" validate:"required"'];//奖池id
  340. }
  341. message GetPoolPrizeResp{
  342. repeated List list = 1 [(gogoproto.jsontag) = "list"];
  343. message List{
  344. int64 id = 1 [(gogoproto.jsontag) = "id"]; //奖励id
  345. int64 pool_id = 2 [(gogoproto.jsontag) = "pool_id"]; //奖池id
  346. int64 type = 3 [(gogoproto.jsontag) = "type"]; //奖品类型 1为道具,2为头衔,3为经验原石,4为经验曜石,5为贤者之石,6为小号小电视,7为舰长守护,8为提督守护,9为总督守护
  347. int64 num = 4 [(gogoproto.jsontag) = "num"]; //数量
  348. int64 object_id = 5 [(gogoproto.jsontag) = "object_id"]; //奖品真实id
  349. string web_url = 6 [(gogoproto.jsontag) = "web_url"]; //web端图片
  350. string mobile_url = 7 [(gogoproto.jsontag) = "mobile_url"]; //移动端图片
  351. string description = 8 [(gogoproto.jsontag) = "description"]; //奖励描述
  352. string jump_url = 9 [(gogoproto.jsontag) = "jump_url"]; //跳转地址
  353. int64 pro_type = 10 [(gogoproto.jsontag) = "pro_type"]; //概率类型 1为普通,2为固定每天,3为固定每周
  354. string chance = 11 [(gogoproto.jsontag) = "chance"]; //概率,3位小数,''为另一种概率模式
  355. int64 loop = 12 [(gogoproto.jsontag) = "loop"]; //循环的数量 0为另一种概率模式
  356. int64 limit = 13 [(gogoproto.jsontag) = "limit"]; //限制数量 0为另一种概率模式
  357. string name = 14 [(gogoproto.jsontag) = "name"]; // 奖励名称
  358. int64 weight = 15 [(gogoproto.jsontag) = "weight"];
  359. repeated int64 white_uids = 16 [(gogoproto.jsontag) = "white_uids"];
  360. int64 expire = 17 [(gogoproto.jsontag) = "expire"];
  361. }
  362. }
  363. message UpdatePoolPrizeReq{
  364. int64 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = 'form:"id"'];//奖励id
  365. int64 pool_id = 2 [(gogoproto.jsontag) = "pool_id", (gogoproto.moretags) = 'form:"pool_id"'];//奖池id
  366. int64 type = 3 [(gogoproto.jsontag) = "type", (gogoproto.moretags) = 'form:"type" validate:"required"'];//奖品类型 1为道具,2为头衔,3为经验原石,4为经验曜石,5为贤者之石,6为小号小电视,7为舰长守护,8为提督守护,9为总督守护
  367. int64 num = 4 [(gogoproto.jsontag) = "num", (gogoproto.moretags) = 'form:"num" validate:"required"'];//数量
  368. int64 object_id = 5 [(gogoproto.jsontag) = "object_id", (gogoproto.moretags) = 'form:"object_id"'];//奖品真实id
  369. int64 expire = 6 [(gogoproto.jsontag) = "expire", (gogoproto.moretags) = 'form:"expire"'];//过期时间
  370. string web_url = 7 [(gogoproto.jsontag) = "web_url", (gogoproto.moretags) = 'form:"web_url" validate:"required"'];//web端图片
  371. string mobile_url = 8 [(gogoproto.jsontag) = "mobile_url", (gogoproto.moretags) = 'form:"mobile_url" validate:"required"'];//移动端图片
  372. string description = 9 [(gogoproto.jsontag) = "description", (gogoproto.moretags) = 'form:"description" validate:"required"'];//奖励描述
  373. string jump_url = 10 [(gogoproto.jsontag) = "jump_url", (gogoproto.moretags) = 'form:"jump_url"'];//跳转地址
  374. int64 pro_type = 11 [(gogoproto.jsontag) = "pro_type", (gogoproto.moretags) = 'form:"pro_type" validate:"required"'];//概率类型 1为普通,2为固定每天,3为固定每周
  375. int64 chance = 12 [(gogoproto.jsontag) = "chance", (gogoproto.moretags) = 'form:"chance"'];//概率,3位小数,''为另一种概率模式
  376. int64 loop = 13 [(gogoproto.jsontag) = "loop", (gogoproto.moretags) = 'form:"loop"'];//循环的数量 0为另一种概率模式
  377. int64 limit = 14 [(gogoproto.jsontag) = "limit", (gogoproto.moretags) = 'form:"limit"'];//限制数量 0为另一种概率模式
  378. int64 weight = 15 [(gogoproto.jsontag) = "weight"];
  379. repeated int64 white_uids = 16 [(gogoproto.jsontag) = "white_uids"];
  380. }
  381. message UpdatePoolPrizeResp{
  382. bool status = 1 [(gogoproto.jsontag) = "status"];
  383. int64 prize_id = 2 [(gogoproto.jsontag) = "prize_id"];
  384. }
  385. message DeletePoolPrizeReq{
  386. int64 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = 'form:"id" validate:"required"'];//奖励id
  387. }
  388. message DeletePoolPrizeResp{
  389. bool status = 1 [(gogoproto.jsontag) = "status"];
  390. }
  391. message GetPrizeTypeReq {
  392. }
  393. message GetPrizeTypeResp {
  394. repeated List list = 3 [(gogoproto.jsontag) = "list"];
  395. message List {
  396. //
  397. int64 type = 1 [(gogoproto.jsontag) = "type"];
  398. //
  399. string name = 2 [(gogoproto.jsontag) = "name"];
  400. }
  401. }
  402. message GetPrizeExpireReq {
  403. }
  404. message GetPrizeExpireResp {
  405. repeated List list = 3 [(gogoproto.jsontag) = "list"];
  406. message List {
  407. //
  408. int64 expire = 1 [(gogoproto.jsontag) = "expire"];
  409. //
  410. string name = 2 [(gogoproto.jsontag) = "name"];
  411. }
  412. }
  413. // 节奏风暴 服务
  414. service Storm {
  415. // 开启节奏风暴
  416. rpc Start(StartStormReq)returns(StartStormResp);
  417. //节奏风暴是否能开启
  418. rpc CanStart(StartStormReq)returns(CanStartStormResp);
  419. //加入节奏风暴
  420. rpc Join (JoinStormReq)returns(JoinStormResp);
  421. //检查是否加入节奏风暴
  422. rpc Check (CheckStormReq)returns(CheckStormResp);
  423. }
  424. message StartStormReq {
  425. // 用户id
  426. int64 uid = 1;
  427. // 主播id
  428. int64 ruid = 2;
  429. //房间号
  430. int64 roomid = 3;
  431. //是否开启敏感词过滤
  432. bool useShield = 4;
  433. //道具数量
  434. int64 num = 5;
  435. //节奏内容id
  436. int64 beatid = 6;
  437. //
  438. int64 skipExternalCheck= 7;
  439. }
  440. message StartStormResp {
  441. // 错误码
  442. int32 code = 1;
  443. // 错误信息
  444. string msg = 2;
  445. StartData start = 3;
  446. }
  447. message StartData {
  448. //倒计时,秒
  449. int32 time = 1;
  450. //抽奖标识
  451. int64 id = 2;
  452. }
  453. message CanStartStormResp {
  454. // 错误码
  455. int32 code = 1;
  456. // 错误信息
  457. string msg = 2;
  458. //是否能开启节奏风暴
  459. bool ret_status = 3;
  460. }
  461. message JoinStormReq {
  462. //抽奖id
  463. int64 id = 1 [(gogoproto.moretags) = 'form:"id"'];
  464. //房间id
  465. int64 roomid = 2 [(gogoproto.moretags) = 'form:"roomid" '];
  466. //弹幕颜色
  467. string color = 3 [(gogoproto.moretags) = 'form:"color"'];
  468. //userid
  469. int64 mid = 4 [(gogoproto.moretags) = 'form:"mid"'];
  470. //平台 web,ios,android
  471. string platform = 5 [(gogoproto.moretags) = 'form:"platform"'];
  472. //验证码标识
  473. string captcha_token = 6 [(gogoproto.moretags) = 'form:"captcha_token"'];
  474. //验证码明文
  475. string captcha_phrase = 7 [(gogoproto.moretags) = 'form:"captcha_phrase"'];
  476. }
  477. message JoinStormResp {
  478. // 错误码
  479. int32 code = 1;
  480. // 错误信息
  481. string msg = 2;
  482. // 加入成功返回数据
  483. JoinData join = 3;
  484. }
  485. message JoinData {
  486. //礼物id
  487. int64 gift_id = 1 [(gogoproto.jsontag) = "gift_id"];
  488. //标题
  489. string title = 2 [(gogoproto.jsontag) = "title"];
  490. //礼物web内容
  491. string content = 3 [(gogoproto.jsontag) = "content"];
  492. //礼物移动端内容
  493. string mobile_content = 4 [(gogoproto.jsontag) = "mobile_content"];
  494. //礼物图片
  495. string gift_img = 5 [(gogoproto.jsontag) = "gift_img"];
  496. //礼物数量
  497. int64 gift_num = 6 [(gogoproto.jsontag) = "gift_num"];
  498. //礼物名字
  499. string gift_name = 7 [(gogoproto.jsontag) = "gift_name"];
  500. }
  501. message CheckStormReq {
  502. //房间号
  503. int64 roomid = 1 [(gogoproto.moretags) = 'form:"roomid" validate:"required"'];
  504. //用户id
  505. int64 uid = 2 [(gogoproto.moretags) = 'form:"uid" '];
  506. }
  507. message CheckStormResp {
  508. // 错误码
  509. int32 code = 1;
  510. // 错误信息
  511. string msg = 2;
  512. CheckData check = 3;
  513. }
  514. message CheckData {
  515. //用户id
  516. int64 id = 1 [(gogoproto.jsontag) = "id"];
  517. //房间号
  518. int64 roomid = 2 [(gogoproto.jsontag) = "roomid"];
  519. //数量
  520. int64 num = 3 [(gogoproto.jsontag) = "num"];
  521. //发送数量
  522. string send_num = 4 [(gogoproto.jsontag) = "send_num"];
  523. //结束时间戳
  524. int64 time = 5 [(gogoproto.jsontag) = "time"];
  525. //内容
  526. string content = 6 [(gogoproto.jsontag) = "content"];
  527. //是否已经加入
  528. int32 hasJoin = 7 [(gogoproto.jsontag) = "hasJoin"]; //是否加入
  529. //图片链接
  530. string storm_gif = 8 [(gogoproto.jsontag) = "storm_gif"];
  531. }
  532. message CapsuleGetCouponListReq {
  533. //
  534. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  535. }
  536. message CapsuleGetCouponListResp {
  537. message List {
  538. //
  539. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  540. // 中奖时间
  541. string award_time = 2 [(gogoproto.jsontag) = "award_time"];
  542. // 奖品名称
  543. string award_name = 3 [(gogoproto.jsontag) = "award_name"];
  544. // 券码
  545. string award_code = 4 [(gogoproto.jsontag) = "award_code"];
  546. // 0 重试 1 成功
  547. int64 status = 5 [(gogoproto.jsontag) = "status"];
  548. // 上次重试时间
  549. string retry_time = 6 [(gogoproto.jsontag) = "retry_time"];
  550. }
  551. repeated List list = 1 [(gogoproto.jsontag) = "list"];
  552. }