You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.3 KiB
Go

11 months ago
package app
import (
"miniapp/global"
"miniapp/model/common/constant"
8 months ago
"time"
11 months ago
)
type User struct {
global.GVA_MODEL
Phone string `json:"phone" gorm:"index:deleted;type:varchar(255) not null comment '手机号'"`
WechatUnionId *string `json:"wechat_union_id" gorm:"type:varchar(255) comment '微信UnionId'"`
WechatOpenId *string `json:"wechat_open_id" gorm:"type:varchar(255) comment '微信OpenId'"`
Nickname string `json:"nickname" gorm:"type:varchar(255) comment '昵称'"`
Avatar string `json:"avatar" gorm:"type:varchar(255) comment '头像'"`
Status constant.UserStatus `json:"status" gorm:"type:enum('NORMAL','DISABLE'); default:'NORMAL'; not null; comment:'状态 NORMAL-正常DISABLE-禁用'"`
IsSurgery int `json:"isSurgery" gorm:"default:0;comment:是否已经手术 0未手术 1已手术"`
IsInfo int `json:"isInfo" gorm:"default:0;comment:是否已经填写信息 0未填写 1已填写"`
HospitalId int `json:"hospital_id" gorm:"comment:手术医院"`
8 months ago
SurgeryTime time.Time `json:"surgery_time" gorm:"comment:手术时间"`
LastLoginAt *time.Time `json:"last_login_at" gorm:"comment:'最后登录时间'"`
11 months ago
}
func (User) TableName() string {
return "t_user"
}