rank.go 1.08 KB
Newer Older
hujiebin's avatar
hujiebin committed
1 2
package cp_cv

hujiebin's avatar
hujiebin committed
3 4 5 6
import (
	"hilo-user/_const/enum/cp_e"
	"hilo-user/cv/user_cv"
)
hujiebin's avatar
hujiebin committed
7

hujiebin's avatar
hujiebin committed
8
type CvCpRank struct {
hujiebin's avatar
hujiebin committed
9 10 11 12 13 14
	CpId    uint64              `json:"cpId"`            // cpId
	User1   *user_cv.CvUserBase `json:"user1"`           // user1
	User2   *user_cv.CvUserBase `json:"user2,omitempty"` // user2
	Score   uint32              `json:"score"`           // 分值
	CpLevel CvCpLevel           `json:"cpLevel"`         // cp等级
	Ranking string              `json:"ranking"`         // 排名
hujiebin's avatar
hujiebin committed
15
}
hujiebin's avatar
hujiebin committed
16 17 18

type CvCpAchievement struct {
	CpId     uint64             `json:"cpId"`     // cpId
hujiebin's avatar
hujiebin committed
19 20
	User1    *user_cv.UserTiny  `json:"user1"`    // user1
	User2    *user_cv.UserTiny  `json:"user2"`    // user2
hujiebin's avatar
hujiebin committed
21 22 23 24 25
	Type     cp_e.CpAchievement `json:"type"`     // 成就类型 1:等级 2:空间访问人数 3:月榜最高 4:周榜最高 5:日榜最高
	TypeDesc string             `json:"typeDesc"` // 成就类型翻译
	Score    uint32             `json:"score"`    // 分值
	TimeUnix int64              `json:"timeUnix"` // 达成成就时间戳
}
hujiebin's avatar
hujiebin committed
26

hujiebin's avatar
hujiebin committed
27
type CpTops struct {
hujiebin's avatar
hujiebin committed
28 29
	Day  []CvCpRank `json:"day"`
	Week []CvCpRank `json:"week"`
hujiebin's avatar
hujiebin committed
30
}