aozhiwei 17cb4ac144 1
2024-04-05 21:01:47 +08:00

69 lines
1.2 KiB
Go

package cache
import (
"cs"
"github.com/golang/protobuf/proto"
)
type userProfile struct {
accountId string
name string
avatarUrl string
head string
star int32
totalKills int32
totalWinTimes int32
rank int32
lastLoginTime int32
}
func (this *userProfile) GetAccountId() string {
return this.accountId
}
func (this *userProfile) GetUserName() string {
return this.name
}
func (this *userProfile) GetAvatar() string {
return this.avatarUrl
}
func (this *userProfile) GetAvatarHead() string {
return this.head
}
func (this *userProfile) GetStar() int32 {
return this.star
}
func (this *userProfile)GetTotalKills() int32 {
return this.totalKills
}
func (this *userProfile) GetTotalWinTimes() int32 {
return this.totalWinTimes
}
func (this *userProfile) GetRank() int32 {
return this.rank
}
func (this *userProfile) GetOnlineStatus() int32 {
return 0
}
func (this *userProfile) GetLastLoginTime() int32 {
return this.lastLoginTime
}
func (this *userProfile) FillMFUser(pbUser *cs.MFUser) {
pbUser.AccountId = proto.String(this.accountId)
pbUser.Username = proto.String(this.name)
}
func newUserProfile() *userProfile {
p := new(userProfile)
return p
}