User.proto 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. syntax = "proto3";
  2. package user.v3;
  3. option go_package = "v3";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. service User {
  6. /** uid获取房间信息
  7. *
  8. */
  9. rpc getMultiple (UserGetMultipleReq) returns (UserGetMultipleResp);
  10. /** uid获取房间信息
  11. *
  12. */
  13. rpc getUserLevelInfo (UserGetUserLevelInfoReq) returns (UserGetUserLevelInfoResp);
  14. }
  15. message UserGetMultipleReq {
  16. // 用户id
  17. repeated int64 uids = 1 [(gogoproto.jsontag) = "uids"];
  18. // 属性
  19. repeated string attributes = 2 [(gogoproto.jsontag) = "attributes"];
  20. }
  21. message UserGetMultipleResp {
  22. // code
  23. int64 code = 1 [(gogoproto.jsontag) = "code"];
  24. // msg
  25. string msg = 2 [(gogoproto.jsontag) = "msg"];
  26. //
  27. map<int64, UserInfo> data = 3 [(gogoproto.jsontag) = "data"];
  28. message Official_verify {
  29. //
  30. int64 type = 1 [(gogoproto.jsontag) = "type"];
  31. //
  32. string desc = 2 [(gogoproto.jsontag) = "desc"];
  33. //
  34. int64 role = 3 [(gogoproto.jsontag) = "role"];
  35. }
  36. message Info {
  37. // uid
  38. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  39. // 昵称
  40. string uname = 2 [(gogoproto.jsontag) = "uname"];
  41. // 头像
  42. string face = 3 [(gogoproto.jsontag) = "face"];
  43. // 等级
  44. int64 rank = 4 [(gogoproto.jsontag) = "rank"];
  45. // 用户id
  46. int64 platform_user_level = 5 [(gogoproto.jsontag) = "platform_user_level"];
  47. // 人气值
  48. int64 mobile_verify = 6 [(gogoproto.jsontag) = "mobile_verify"];
  49. // 认证
  50. Official_verify official_verify = 7 [(gogoproto.jsontag) = "official_verify"];
  51. // 类型
  52. int64 vip_type = 8 [(gogoproto.jsontag) = "vip_type"];
  53. // 年龄
  54. int64 gender = 9 [(gogoproto.jsontag) = "gender"];
  55. }
  56. message Master_level {
  57. //
  58. int64 level = 1 [(gogoproto.jsontag) = "level"];
  59. //
  60. repeated int64 current = 2 [(gogoproto.jsontag) = "current"];
  61. //
  62. repeated int64 next = 3 [(gogoproto.jsontag) = "next"];
  63. //
  64. int64 color = 4 [(gogoproto.jsontag) = "color"];
  65. }
  66. message Exp {
  67. //
  68. int64 cost = 1 [(gogoproto.jsontag) = "cost"];
  69. //
  70. int64 rcost = 2 [(gogoproto.jsontag) = "rcost"];
  71. //
  72. int64 user_level = 3 [(gogoproto.jsontag) = "user_level"];
  73. //
  74. Master_level master_level = 4 [(gogoproto.jsontag) = "master_level"];
  75. //
  76. int64 color = 5 [(gogoproto.jsontag) = "color"];
  77. //
  78. int64 ul_cost = 6 [(gogoproto.jsontag) = "ul_cost"];
  79. //
  80. int64 unext = 7 [(gogoproto.jsontag) = "unext"];
  81. //
  82. int64 rnext = 8 [(gogoproto.jsontag) = "rnext"];
  83. }
  84. message UserInfo {
  85. // 直播间标题
  86. Info info = 1 [(gogoproto.jsontag) = "info"];
  87. // 直播间标题
  88. Exp exp = 2 [(gogoproto.jsontag) = "exp"];
  89. }
  90. }
  91. message UserGetUserLevelInfoReq {
  92. // 用户id
  93. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  94. }
  95. message UserGetUserLevelInfoResp {
  96. // code
  97. int64 code = 1 [(gogoproto.jsontag) = "code"];
  98. // msg
  99. string msg = 2 [(gogoproto.jsontag) = "msg"];
  100. //
  101. Data data = 3 [(gogoproto.jsontag) = "data"];
  102. message Data {
  103. //
  104. int64 level = 1 [(gogoproto.jsontag) = "level"];
  105. //
  106. int64 exp = 2 [(gogoproto.jsontag) = "exp"];
  107. //
  108. int64 color = 3 [(gogoproto.jsontag) = "color"];
  109. }
  110. }