FansMedal.proto 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. syntax = "proto3";
  2. package fans_medal.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. service FansMedal {
  6. /** 获取已佩戴的勋章
  7. *
  8. */
  9. rpc get_weared_medal (FansMedalGetWearedMedalReq) returns (FansMedalGetWearedMedalResp);
  10. /** 用户卡
  11. * 基于某房间|主播的 用户卡片信息
  12. */
  13. rpc targetsWithMedal (FansMedalTargetsWithMedalReq) returns (FansMedalTargetsWithMedalResp);
  14. }
  15. message FansMedalGetWearedMedalReq {
  16. //
  17. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  18. //
  19. int64 source = 2 [(gogoproto.jsontag) = "source"];
  20. //
  21. bool need_rank = 3 [(gogoproto.jsontag) = "need_rank"];
  22. //
  23. bool need_today_intimacy = 4 [(gogoproto.jsontag) = "need_today_intimacy"];
  24. //
  25. bool ignore_userinfo = 5 [(gogoproto.jsontag) = "ignore_userinfo"];
  26. }
  27. message FansMedalGetWearedMedalResp {
  28. //
  29. int64 code = 1 [(gogoproto.jsontag) = "code"];
  30. //
  31. string msg = 2 [(gogoproto.jsontag) = "msg"];
  32. //
  33. Data data = 3 [(gogoproto.jsontag) = "data"];
  34. message List {
  35. // 用户uid
  36. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  37. // up主uid
  38. int64 target_id = 2 [(gogoproto.jsontag) = "target_id"];
  39. // 勋章id
  40. int64 medal_id = 3 [(gogoproto.jsontag) = "medal_id"];
  41. // 勋章总经验值
  42. int64 score = 4 [(gogoproto.jsontag) = "score"];
  43. // 勋章等级
  44. int64 level = 5 [(gogoproto.jsontag) = "level"];
  45. // 当前等级亲密度
  46. int64 intimacy = 6 [(gogoproto.jsontag) = "intimacy"];
  47. // 当前等级升级所需
  48. int64 next_intimacy = 7 [(gogoproto.jsontag) = "next_intimacy"];
  49. // 佩戴状态 0:未佩戴 1:佩戴中
  50. int64 status = 8 [(gogoproto.jsontag) = "status"];
  51. // 来源 1直播 2:投币 3:充电
  52. int64 source = 9 [(gogoproto.jsontag) = "source"];
  53. // 领取渠道 1直播 2:主站
  54. int64 receive_channel = 10 [(gogoproto.jsontag) = "receive_channel"];
  55. // 是否已经领取
  56. int64 is_receive = 11 [(gogoproto.jsontag) = "is_receive"];
  57. // 主站佩戴状态 0:未佩戴 1:佩戴中
  58. int64 master_status = 12 [(gogoproto.jsontag) = "master_status"];
  59. // 领取时间
  60. string receive_time = 13 [(gogoproto.jsontag) = "receive_time"];
  61. // 今日亲密度上限
  62. int64 today_intimacy = 14 [(gogoproto.jsontag) = "today_intimacy"];
  63. // 最后佩戴的时间戳
  64. int64 last_wear_time = 15 [(gogoproto.jsontag) = "last_wear_time"];
  65. // 勋章名称
  66. string medal_name = 16 [(gogoproto.jsontag) = "medal_name"];
  67. // 用户uid
  68. int64 master_available = 17 [(gogoproto.jsontag) = "master_available"];
  69. // up主昵称
  70. string target_name = 18 [(gogoproto.jsontag) = "target_name"];
  71. // up主头像
  72. string target_face = 19 [(gogoproto.jsontag) = "target_face"];
  73. // 排名
  74. string rank = 20 [(gogoproto.jsontag) = "rank"];
  75. // 勋章颜色 不同等级颜色不同
  76. int64 medal_color = 21 [(gogoproto.jsontag) = "medal_color"];
  77. // 今天增加亲密度
  78. int64 today_feed = 22 [(gogoproto.jsontag) = "today_feed"];
  79. // 大航海类型 1 总督 2 提督 3 舰长
  80. int64 guard_type = 23 [(gogoproto.jsontag) = "guard_type"];
  81. // 今日亲密度上限
  82. int64 day_limit = 24 [(gogoproto.jsontag) = "day_limit"];
  83. }
  84. message Data {
  85. //
  86. int64 max = 1 [(gogoproto.jsontag) = "max"];
  87. //
  88. int64 cnt = 2 [(gogoproto.jsontag) = "cnt"];
  89. //
  90. repeated List list = 3 [(gogoproto.jsontag) = "list"];
  91. }
  92. }
  93. message FansMedalTargetsWithMedalReq {
  94. // 用户id
  95. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  96. // 主播id
  97. repeated int64 target_ids = 2 [(gogoproto.jsontag) = "target_ids"];
  98. }
  99. message FansMedalTargetsWithMedalResp {
  100. //
  101. int64 code = 1 [(gogoproto.jsontag) = "code"];
  102. //
  103. string msg = 2 [(gogoproto.jsontag) = "msg"];
  104. //
  105. string message = 3 [(gogoproto.jsontag) = "message"];
  106. //
  107. repeated int64 data = 4 [(gogoproto.jsontag) = "data"];
  108. }