game/common/model/user/userResources.go

17 lines
355 B
Go
Raw Normal View History

2025-06-02 01:07:35 +08:00
package user
// 玩家账户表
type UserResources struct {
2025-06-06 00:09:10 +08:00
UID int64 `gorm:"uniqueIndex" json:"id"`
Gold int64 `gorm:"default:0" json:"gold"` // 金币
Diamond int64 `gorm:"default:0" json:"diamond"` // 钻石
2025-06-02 01:07:35 +08:00
}
2025-06-06 00:09:10 +08:00
func (u UserResources) GetId() int64 {
return u.UID
2025-06-02 01:07:35 +08:00
}
2025-06-04 01:56:38 +08:00
func (u UserResources) TableName() string {
return "user_resources"
}