request.proto 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. syntax = "proto3";
  2. package archive.service.up.v1;
  3. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  4. option go_package = "v1";
  5. // NoArgReq 没有请求参数
  6. message NoArgReq {}
  7. // UpArcsReq 单个up主的稿件列表信息请求参数
  8. message UpArcsReq {
  9. // mid 用户id 必传
  10. int64 mid = 1
  11. [(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
  12. // pn 第几页 非必传
  13. int32 pn = 2 [(gogoproto.moretags) = "form:\"pn\" default:\"1\""];
  14. // ps 分页大小 非必传
  15. int32 ps = 3 [(gogoproto.moretags) = "form:\"ps\" default:\"20\""];
  16. }
  17. // UpsArcsReq 多个up主的稿件列表信息请求参数
  18. message UpsArcsReq {
  19. // mids 多个用户id 必传 最大100个
  20. repeated int64 mids = 1
  21. [(gogoproto.moretags) =
  22. "form:\"mids,split\" validate:\"min=1,max=100,required\""];
  23. // pn 第几页 非必传
  24. int32 pn = 2 [(gogoproto.moretags) = "form:\"pn\" default:\"1\""];
  25. // ps 分页大小 非必传
  26. int32 ps = 3 [(gogoproto.moretags) = "form:\"ps\" default:\"20\""];
  27. }
  28. // UpCountReq 单个up主的稿件计数的请求参数
  29. message UpCountReq {
  30. // mid 用户id 必传
  31. int64 mid = 1
  32. [(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
  33. }
  34. // UpsCountReq 多个up主的稿件计数的请求参数
  35. message UpsCountReq {
  36. // mids 多个用户id 必传 最大100个
  37. repeated int64 mids = 1
  38. [(gogoproto.moretags) =
  39. "form:\"mids,split\" validate:\"min=1,max=100,required\""];
  40. }
  41. // UpCacheReq up主的cache更新的请求参数
  42. message UpCacheReq {
  43. // mid 用户id 必传
  44. int64 mid = 1 [(gogoproto.moretags) = "form:\"mid\" validate:\"required\""];
  45. // aid 稿件id 必传
  46. int64 aid = 2 [(gogoproto.moretags) = "form:\"aid\" validate:\"required\""];
  47. }
  48. // UpListByLastIDReq 获取up主活跃度信息通过最后id获取
  49. message UpListByLastIDReq {
  50. // LastID 获取的数据最后id
  51. int64 last_id = 1 [
  52. (gogoproto.customname) = "LastID",
  53. (gogoproto.moretags) = "form:\"last_id\" validate:\"min=0\""
  54. ];
  55. // 获取数量 最大1000个
  56. int32 ps = 2 [
  57. (gogoproto.casttype) = "int",
  58. (gogoproto.moretags) =
  59. "form:\"ps\" validate:\"min=1,max=1000\" default:\"100\""
  60. ];
  61. }
  62. // UpSpecialReq up主特殊用户属性请求参数
  63. message UpSpecialReq {
  64. // mid 用户id 必传
  65. int64 mid = 1
  66. [(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
  67. }
  68. // UpsSpecialReq 多个up主特殊用户属性请求参数
  69. message UpsSpecialReq {
  70. // mids 多个用户id 必传 最大100个
  71. repeated int64 mids = 1
  72. [(gogoproto.moretags) =
  73. "form:\"mids,split\" validate:\"min=1,max=100,required\""];
  74. }
  75. // UpGroupMidsReq 获取某个分组下的所有用户的请求参数
  76. message UpGroupMidsReq {
  77. // GroupID 分组ID
  78. int64 group_id = 1 [
  79. (gogoproto.customname) = "GroupID",
  80. (gogoproto.moretags) = "form:\"group_id\" validate:\"min=1,required\""
  81. ];
  82. // pn 第几页 非必传
  83. int32 pn = 2 [
  84. (gogoproto.casttype) = "int",
  85. (gogoproto.moretags) =
  86. "form:\"pn\" validate:\"min=1,max=100\" default:\"1\""
  87. ];
  88. // ps 分页大小 非必传
  89. int32 ps = 3 [
  90. (gogoproto.casttype) = "int",
  91. (gogoproto.moretags) =
  92. "form:\"ps\" validate:\"min=1,max=10000\" default:\"1000\""
  93. ];
  94. }
  95. // UpAttrReq 获取up主身份属性的请求参数
  96. message UpAttrReq {
  97. // mid 用户id 必传
  98. int64 mid = 1
  99. [(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
  100. // from 0 - 稿件作者(至少有一个通过稿件); 1 - 移动投稿作者(至少有一个稿件);
  101. // 2 - live(直播up主); 3 - live(直播白名单)
  102. int32 from = 2 [
  103. (gogoproto.moretags) = "form:\"from\" validate:\"min=0,max=1\"",
  104. (gogoproto.casttype) = "uint8"
  105. ];
  106. }
  107. // UpStatReq 获取up计数的请求参数
  108. message UpStatReq {
  109. // mid 用户id 必传
  110. int64 mid = 1
  111. [(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
  112. // date 获取计数时间范围
  113. int64 date = 2 [
  114. (gogoproto.moretags) = "form:\"date\"",
  115. (gogoproto.casttype) = "go-common/library/time.Time"
  116. ];
  117. }
  118. // UpSwitchReq 获取up主关注弹窗开关的请求参数
  119. message UpSwitchReq {
  120. // mid 用户id 必传
  121. int64 mid = 1
  122. [(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
  123. // from 业务来源 0-播放器关注开关 1-up主荣誉周报是否退订
  124. int32 from = 2
  125. [(gogoproto.moretags) = "form:\"from\"", (gogoproto.casttype) = "uint8"];
  126. // state 开关状态 0-关闭 1-打开
  127. int32 state = 3 [
  128. (gogoproto.moretags) = "form:\"state\" validate:\"min=0,max=1\"",
  129. (gogoproto.casttype) = "uint8"
  130. ];
  131. }
  132. // HighAllyUpReq 高能联盟up主请求参数
  133. message HighAllyUpsReq {
  134. // mids 用户id数组 必传
  135. repeated int64 mids = 1 [(gogoproto.moretags) = "form:\"mids\" validate:\"required\""];
  136. }