game/common/model/user/userResources.go

24 lines
637 B
Go
Raw Normal View History

2025-06-02 01:07:35 +08:00
package user
import (
"gorm.io/gorm"
)
// 玩家账户表
type UserResources struct {
2025-06-04 01:56:38 +08:00
gorm.Model `json:"-"`
2025-06-02 01:07:35 +08:00
accountId uint `gorm:"type:bigint;uniqueIndex;not null"` // 帐号id
Nickname string `gorm:"type:varchar(32);uniqueIndex;not null"` // 昵称
AvatarUrl string `gorm:"type:varchar(255)"` // 头像
AvatarFrame string `gorm:"type:varchar(255)"` // 头像框
VipExp int32 `gorm:"type:int"` // vip经验值
}
func (u UserResources) GetId() uint {
return u.ID
}
2025-06-04 01:56:38 +08:00
func (u UserResources) TableName() string {
return "user_resources"
}