goProject/trunk/center/usercenter/internal/wxuser2/user.go

37 lines
999 B
Go
Raw Normal View History

2025-01-23 16:12:49 +08:00
package wxuser2
2025-01-06 16:21:36 +08:00
import (
2025-01-23 16:12:49 +08:00
"common/cache"
2025-01-06 16:21:36 +08:00
"common/connection"
)
func init() {
//注册数据库
2025-01-23 16:12:49 +08:00
connection.RegisterDBModel(&WXUserInfo{})
2025-01-06 16:21:36 +08:00
}
2025-01-23 16:12:49 +08:00
type WXUserInfo struct {
Openid string `gorm:"column:openid;comment:用户微信标识;autoIncrementIncrement" json:"openid"`
2025-01-06 16:21:36 +08:00
//账号
Account string `gorm:"column:account;comment:账号" json:"account"`
Name string `gorm:"column:name;comment:用户名称" json:"name"`
Password string `gorm:"column:password;comment:用户密码" json:"password"`
//性别
Sex int32 `gorm:"column:sex;comment:性别" json:"sex"`
//生日
Birthday string `gorm:"column:birthday;comment:生日" json:"birthday"`
//手机
Phone int64 `gorm:"column:phone;comment:手机" json:"phone"`
//邮箱
Email string `gorm:"column:email;comment:邮箱" json:"email"`
//备注
Describe string `gorm:"column:describe;comment:备注" json:"describe"`
2025-01-23 16:12:49 +08:00
//玩家的缓存对象
Cache *cache.Cache `gorm:"-"`
2025-01-06 16:21:36 +08:00
}
2025-01-23 16:12:49 +08:00
func (WXUserInfo) TableName() string {
2025-01-06 16:21:36 +08:00
return "user"
}