JM-WechatMini/model/app/user.go

27 lines
1.3 KiB
Go
Raw Normal View History

2023-11-02 04:34:46 +08:00
package app
import (
"miniapp/global"
"miniapp/model/common/constant"
2024-01-11 16:03:51 +08:00
"time"
2023-11-02 04:34:46 +08:00
)
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'"`
2024-03-30 22:58:42 +08:00
WechatOpenId string `json:"wechat_open_id" gorm:"type:varchar(255) comment '微信OpenId'"`
2023-11-02 04:34:46 +08:00
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:手术医院"`
2024-03-21 21:08:45 +08:00
SurgeryTime string `json:"surgery_time" gorm:"comment:手术时间"`
2024-01-11 16:03:51 +08:00
LastLoginAt *time.Time `json:"last_login_at" gorm:"comment:'最后登录时间'"`
2023-11-02 04:34:46 +08:00
}
func (User) TableName() string {
return "t_user"
}