topfans/backend/pkg/proto/ranking/ranking.pb.go
2026-04-07 22:29:48 +08:00

513 lines
17 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v7.34.0
// source: ranking.proto
package ranking
import (
common "github.com/topfans/backend/pkg/proto/common"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 排行榜请求(热度/自制)
type GetRankingRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Dimension string `protobuf:"bytes,1,opt,name=dimension,proto3" json:"dimension,omitempty"` // 统计维度displaying(展示中), month(本月), total(全部)
StarId int64 `protobuf:"varint,2,opt,name=star_id,json=starId,proto3" json:"star_id,omitempty"` // 粉丝身份ID可选不传则使用当前身份
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` // 页码默认1
PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页数量默认10
UserId int64 `protobuf:"varint,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 当前用户ID
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetRankingRequest) Reset() {
*x = GetRankingRequest{}
mi := &file_ranking_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetRankingRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRankingRequest) ProtoMessage() {}
func (x *GetRankingRequest) ProtoReflect() protoreflect.Message {
mi := &file_ranking_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRankingRequest.ProtoReflect.Descriptor instead.
func (*GetRankingRequest) Descriptor() ([]byte, []int) {
return file_ranking_proto_rawDescGZIP(), []int{0}
}
func (x *GetRankingRequest) GetDimension() string {
if x != nil {
return x.Dimension
}
return ""
}
func (x *GetRankingRequest) GetStarId() int64 {
if x != nil {
return x.StarId
}
return 0
}
func (x *GetRankingRequest) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *GetRankingRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *GetRankingRequest) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
// 排行榜项
type RankingItem struct {
state protoimpl.MessageState `protogen:"open.v1"`
Rank int32 `protobuf:"varint,1,opt,name=rank,proto3" json:"rank,omitempty"` // 排名
AssetId int64 `protobuf:"varint,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` // 藏品ID
AssetName string `protobuf:"bytes,3,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"` // 藏品名称
CoverUrl string `protobuf:"bytes,4,opt,name=cover_url,json=coverUrl,proto3" json:"cover_url,omitempty"` // 封面图URL
OwnerUid int64 `protobuf:"varint,5,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` // 持有者ID
OwnerNickname string `protobuf:"bytes,6,opt,name=owner_nickname,json=ownerNickname,proto3" json:"owner_nickname,omitempty"` // 持有者昵称
OwnerAvatar string `protobuf:"bytes,9,opt,name=owner_avatar,json=ownerAvatar,proto3" json:"owner_avatar,omitempty"` // 持有者头像
LikeCount int32 `protobuf:"varint,7,opt,name=like_count,json=likeCount,proto3" json:"like_count,omitempty"` // 点赞数
IsOriginal bool `protobuf:"varint,8,opt,name=is_original,json=isOriginal,proto3" json:"is_original,omitempty"` // 是否自制藏品
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RankingItem) Reset() {
*x = RankingItem{}
mi := &file_ranking_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RankingItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RankingItem) ProtoMessage() {}
func (x *RankingItem) ProtoReflect() protoreflect.Message {
mi := &file_ranking_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RankingItem.ProtoReflect.Descriptor instead.
func (*RankingItem) Descriptor() ([]byte, []int) {
return file_ranking_proto_rawDescGZIP(), []int{1}
}
func (x *RankingItem) GetRank() int32 {
if x != nil {
return x.Rank
}
return 0
}
func (x *RankingItem) GetAssetId() int64 {
if x != nil {
return x.AssetId
}
return 0
}
func (x *RankingItem) GetAssetName() string {
if x != nil {
return x.AssetName
}
return ""
}
func (x *RankingItem) GetCoverUrl() string {
if x != nil {
return x.CoverUrl
}
return ""
}
func (x *RankingItem) GetOwnerUid() int64 {
if x != nil {
return x.OwnerUid
}
return 0
}
func (x *RankingItem) GetOwnerNickname() string {
if x != nil {
return x.OwnerNickname
}
return ""
}
func (x *RankingItem) GetOwnerAvatar() string {
if x != nil {
return x.OwnerAvatar
}
return ""
}
func (x *RankingItem) GetLikeCount() int32 {
if x != nil {
return x.LikeCount
}
return 0
}
func (x *RankingItem) GetIsOriginal() bool {
if x != nil {
return x.IsOriginal
}
return false
}
// 我的排名信息
type MyRanking struct {
state protoimpl.MessageState `protogen:"open.v1"`
Rank int32 `protobuf:"varint,1,opt,name=rank,proto3" json:"rank,omitempty"` // 排名(上榜时返回)
AssetId int64 `protobuf:"varint,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` // 藏品ID
AssetName string `protobuf:"bytes,3,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"` // 藏品名称
CoverUrl string `protobuf:"bytes,4,opt,name=cover_url,json=coverUrl,proto3" json:"cover_url,omitempty"` // 封面图URL
LikeCount int32 `protobuf:"varint,5,opt,name=like_count,json=likeCount,proto3" json:"like_count,omitempty"` // 点赞数
Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` // 状态ranked(上榜), unranked(未上榜)
DiffToRank int32 `protobuf:"varint,7,opt,name=diff_to_rank,json=diffToRank,proto3" json:"diff_to_rank,omitempty"` // 距离上榜的差距(未上榜时返回)
OwnerNickname string `protobuf:"bytes,8,opt,name=owner_nickname,json=ownerNickname,proto3" json:"owner_nickname,omitempty"` // 持有者昵称
OwnerAvatar string `protobuf:"bytes,9,opt,name=owner_avatar,json=ownerAvatar,proto3" json:"owner_avatar,omitempty"` // 持有者头像
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *MyRanking) Reset() {
*x = MyRanking{}
mi := &file_ranking_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *MyRanking) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MyRanking) ProtoMessage() {}
func (x *MyRanking) ProtoReflect() protoreflect.Message {
mi := &file_ranking_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MyRanking.ProtoReflect.Descriptor instead.
func (*MyRanking) Descriptor() ([]byte, []int) {
return file_ranking_proto_rawDescGZIP(), []int{2}
}
func (x *MyRanking) GetRank() int32 {
if x != nil {
return x.Rank
}
return 0
}
func (x *MyRanking) GetAssetId() int64 {
if x != nil {
return x.AssetId
}
return 0
}
func (x *MyRanking) GetAssetName() string {
if x != nil {
return x.AssetName
}
return ""
}
func (x *MyRanking) GetCoverUrl() string {
if x != nil {
return x.CoverUrl
}
return ""
}
func (x *MyRanking) GetLikeCount() int32 {
if x != nil {
return x.LikeCount
}
return 0
}
func (x *MyRanking) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *MyRanking) GetDiffToRank() int32 {
if x != nil {
return x.DiffToRank
}
return 0
}
func (x *MyRanking) GetOwnerNickname() string {
if x != nil {
return x.OwnerNickname
}
return ""
}
func (x *MyRanking) GetOwnerAvatar() string {
if x != nil {
return x.OwnerAvatar
}
return ""
}
// 排行榜响应
type GetRankingResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Base *common.BaseResponse `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
MyRanking *MyRanking `protobuf:"bytes,2,opt,name=my_ranking,json=myRanking,proto3" json:"my_ranking,omitempty"` // 我的排名
Items []*RankingItem `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` // 排行榜列表
Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` // 当前页码
PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页数量
Total int32 `protobuf:"varint,6,opt,name=total,proto3" json:"total,omitempty"` // 总数
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetRankingResponse) Reset() {
*x = GetRankingResponse{}
mi := &file_ranking_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetRankingResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRankingResponse) ProtoMessage() {}
func (x *GetRankingResponse) ProtoReflect() protoreflect.Message {
mi := &file_ranking_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRankingResponse.ProtoReflect.Descriptor instead.
func (*GetRankingResponse) Descriptor() ([]byte, []int) {
return file_ranking_proto_rawDescGZIP(), []int{3}
}
func (x *GetRankingResponse) GetBase() *common.BaseResponse {
if x != nil {
return x.Base
}
return nil
}
func (x *GetRankingResponse) GetMyRanking() *MyRanking {
if x != nil {
return x.MyRanking
}
return nil
}
func (x *GetRankingResponse) GetItems() []*RankingItem {
if x != nil {
return x.Items
}
return nil
}
func (x *GetRankingResponse) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *GetRankingResponse) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *GetRankingResponse) GetTotal() int32 {
if x != nil {
return x.Total
}
return 0
}
var File_ranking_proto protoreflect.FileDescriptor
const file_ranking_proto_rawDesc = "" +
"\n" +
"\rranking.proto\x12\x0ftopfans.ranking\x1a\x12proto/common.proto\x1a\x1cgoogle/api/annotations.proto\"\x94\x01\n" +
"\x11GetRankingRequest\x12\x1c\n" +
"\tdimension\x18\x01 \x01(\tR\tdimension\x12\x17\n" +
"\astar_id\x18\x02 \x01(\x03R\x06starId\x12\x12\n" +
"\x04page\x18\x03 \x01(\x05R\x04page\x12\x1b\n" +
"\tpage_size\x18\x04 \x01(\x05R\bpageSize\x12\x17\n" +
"\auser_id\x18\x05 \x01(\x03R\x06userId\"\x9f\x02\n" +
"\vRankingItem\x12\x12\n" +
"\x04rank\x18\x01 \x01(\x05R\x04rank\x12\x19\n" +
"\basset_id\x18\x02 \x01(\x03R\aassetId\x12\x1d\n" +
"\n" +
"asset_name\x18\x03 \x01(\tR\tassetName\x12\x1b\n" +
"\tcover_url\x18\x04 \x01(\tR\bcoverUrl\x12\x1b\n" +
"\towner_uid\x18\x05 \x01(\x03R\bownerUid\x12%\n" +
"\x0eowner_nickname\x18\x06 \x01(\tR\rownerNickname\x12!\n" +
"\fowner_avatar\x18\t \x01(\tR\vownerAvatar\x12\x1d\n" +
"\n" +
"like_count\x18\a \x01(\x05R\tlikeCount\x12\x1f\n" +
"\vis_original\x18\b \x01(\bR\n" +
"isOriginal\"\x99\x02\n" +
"\tMyRanking\x12\x12\n" +
"\x04rank\x18\x01 \x01(\x05R\x04rank\x12\x19\n" +
"\basset_id\x18\x02 \x01(\x03R\aassetId\x12\x1d\n" +
"\n" +
"asset_name\x18\x03 \x01(\tR\tassetName\x12\x1b\n" +
"\tcover_url\x18\x04 \x01(\tR\bcoverUrl\x12\x1d\n" +
"\n" +
"like_count\x18\x05 \x01(\x05R\tlikeCount\x12\x16\n" +
"\x06status\x18\x06 \x01(\tR\x06status\x12 \n" +
"\fdiff_to_rank\x18\a \x01(\x05R\n" +
"diffToRank\x12%\n" +
"\x0eowner_nickname\x18\b \x01(\tR\rownerNickname\x12!\n" +
"\fowner_avatar\x18\t \x01(\tR\vownerAvatar\"\xfc\x01\n" +
"\x12GetRankingResponse\x120\n" +
"\x04base\x18\x01 \x01(\v2\x1c.topfans.common.BaseResponseR\x04base\x129\n" +
"\n" +
"my_ranking\x18\x02 \x01(\v2\x1a.topfans.ranking.MyRankingR\tmyRanking\x122\n" +
"\x05items\x18\x03 \x03(\v2\x1c.topfans.ranking.RankingItemR\x05items\x12\x12\n" +
"\x04page\x18\x04 \x01(\x05R\x04page\x12\x1b\n" +
"\tpage_size\x18\x05 \x01(\x05R\bpageSize\x12\x14\n" +
"\x05total\x18\x06 \x01(\x05R\x05total2\x8b\x02\n" +
"\x0eRankingService\x12v\n" +
"\rGetHotRanking\x12\".topfans.ranking.GetRankingRequest\x1a#.topfans.ranking.GetRankingResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/api/v1/rankings/hot\x12\x80\x01\n" +
"\x12GetOriginalRanking\x12\".topfans.ranking.GetRankingRequest\x1a#.topfans.ranking.GetRankingResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/api/v1/rankings/originalB6Z4github.com/topfans/backend/pkg/proto/ranking;rankingb\x06proto3"
var (
file_ranking_proto_rawDescOnce sync.Once
file_ranking_proto_rawDescData []byte
)
func file_ranking_proto_rawDescGZIP() []byte {
file_ranking_proto_rawDescOnce.Do(func() {
file_ranking_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ranking_proto_rawDesc), len(file_ranking_proto_rawDesc)))
})
return file_ranking_proto_rawDescData
}
var file_ranking_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_ranking_proto_goTypes = []any{
(*GetRankingRequest)(nil), // 0: topfans.ranking.GetRankingRequest
(*RankingItem)(nil), // 1: topfans.ranking.RankingItem
(*MyRanking)(nil), // 2: topfans.ranking.MyRanking
(*GetRankingResponse)(nil), // 3: topfans.ranking.GetRankingResponse
(*common.BaseResponse)(nil), // 4: topfans.common.BaseResponse
}
var file_ranking_proto_depIdxs = []int32{
4, // 0: topfans.ranking.GetRankingResponse.base:type_name -> topfans.common.BaseResponse
2, // 1: topfans.ranking.GetRankingResponse.my_ranking:type_name -> topfans.ranking.MyRanking
1, // 2: topfans.ranking.GetRankingResponse.items:type_name -> topfans.ranking.RankingItem
0, // 3: topfans.ranking.RankingService.GetHotRanking:input_type -> topfans.ranking.GetRankingRequest
0, // 4: topfans.ranking.RankingService.GetOriginalRanking:input_type -> topfans.ranking.GetRankingRequest
3, // 5: topfans.ranking.RankingService.GetHotRanking:output_type -> topfans.ranking.GetRankingResponse
3, // 6: topfans.ranking.RankingService.GetOriginalRanking:output_type -> topfans.ranking.GetRankingResponse
5, // [5:7] is the sub-list for method output_type
3, // [3:5] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_ranking_proto_init() }
func file_ranking_proto_init() {
if File_ranking_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ranking_proto_rawDesc), len(file_ranking_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_ranking_proto_goTypes,
DependencyIndexes: file_ranking_proto_depIdxs,
MessageInfos: file_ranking_proto_msgTypes,
}.Build()
File_ranking_proto = out.File
file_ranking_proto_goTypes = nil
file_ranking_proto_depIdxs = nil
}