You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/internal/model/web/rank.go

38 lines
970 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package web
import (
"github.com/alimy/mir/v4"
"github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/pkg/convert"
)
// GetRankListResp 构造相应参数包含一个GetHighQualityRankingResp数组
type GetRankListResp struct {
List any `json:"list"`
}
type GetHighQualityRankingResp struct {
UserName string `json:"name"`
NickName string `json:"nickname"`
Avatar string `json:"avatar"`
PostCount int64 `json:"post_count"`
LikesCount int64 `json:"likes"`
ComprehensiveScore int64 `json:"comprehensive_score"`
}
type GetDownloadRankListReq struct {
ListType int `json:"list_type"`
}
type GetDownloadRankListResp struct {
UserName string `json:"name"`
NickName string `json:"nickname"`
Avatar string `json:"avatar"`
Download int64 `json:"download"`
}
func (g *GetDownloadRankListReq) Bind(c *gin.Context) mir.Error {
g.ListType = convert.StrTo(c.Query("list_type")).MustInt()
return nil
}