fonchain-artistinfo/cmd/model/user.go

57 lines
3.0 KiB
Go

package model
// User 用户模型
type User struct {
Model
MgmtAccId int64 `gorm:"column:mgmt_acc_id;not null;uniqueIndex:mgmt_acc_mgmt_artist_idx;comment:账号id"`
MgmtArtistId int64 `gorm:"column:mgmt_artist_id;not null;uniqueIndex:mgmt_acc_mgmt_artist_idx;comment:艺术家id"`
MgmtArtistUid string `gorm:"column:mgmt_artist_uid;type:varchar(256);comment:艺术家uid"`
TelNum string `gorm:"column:tel_num;type:varchar(20);not null;电话号码"`
InviteCode string `gorm:"column:invited_code;type:varchar(16);default:'';comment:个人邀请码"`
InvitedBy *Invite `gorm:"foreignKey:InvitedId"` //邀请者的相关信息
Account string `gorm:"column:account;varchar(191);comment:账号"`
CertificateNum string `gorm:"column:certificate_num;type:varchar(16);comment:中美协会证书编号"`
CertificateImg string `gorm:"column:certificate_img;type:varchar(512);comment:中美协会证书url"`
Photo string `gorm:"column:photo;type:varchar(255);comment:个人近照"`
// 实名认证
IsRealName int64 `gorm:"column:is_real_name;default:0;是否实名认证:0未认证 1已认证"`
RealNameId int64 `gorm:"column:real_name_id;comment:实名认证id"`
RealNameInfo *RealName `gorm:"foreignKey:RealNameId;references:ID"`
// 法大大认证
FddState int64 `gorm:"column:fdd_state;not null;comment:法大大认证状态0未认证 2已认证"`
CustomerId string `gorm:"column:costumer_id;type:varchar(2048);not null;comment:法大大客户id"`
OpenId string `gorm:"openId"`
//用户状态
IsRead int64 `gorm:"column:is_read;not null;comment:条款阅读状态"`
IsLock bool `gorm:"column:is_lock;not null;comment:画家锁定状态"`
LatestLockTime string `json:"latestLockTime" gorm:"column:latest_lock_time;comment:最新锁定时间"`
//前端参数,提交实名认证后生成
Htmltype string `gorm:"html_type" json:"htmltype"`
Envtype string `gorm:"env_type" json:"envtype"`
//IsFdd int64 `gorm:"column:is_fdd;not null;comment:"`
//Account string `gorm:"type:varchar(256) not null"`
//Name string `gorm:"type:varchar(20) not null"`
//MnemonicWords string `gorm:"type:varchar(256) not null"`
//PenName string `gorm:"type:varchar(20) not null"`
//StageName string `gorm:"type:varchar(20) not null"`
//JoinAssoTime string `gorm:"type:varchar(64) not null"`
//Key string `gorm:"type:varchar(16) not null"`
//RealNameID int32 `gorm:"not null"`
//IDNum string `gorm:"type:varchar(18) not null"`
//Sex int32 `gorm:"not null"`
//OpenId string `gorm:"type:varchar(2048) not null"`
//Age int32 `gorm:"not null"`
//Introduct string `gorm:"type:varchar(2048) not null"`
//ConAddress string `gorm:"type:varchar(2048) not null"`
//Photo string `gorm:"type:varchar(2048) not null"`
//Video string `gorm:"type:varchar(256) not null"`
//WxAccount string `gorm:"type:varchar(256) not null"`
}
func (u User) TableName() string {
return "sys_user"
}