package app import ( "ln/nft/global" uuid "github.com/satori/go.uuid" ) type User struct { global.GVA_MODEL UUID uuid.UUID `json:"uuid" gorm:"comment:用户UUID"` // 用户UUID Password string `json:"-" gorm:"comment:用户登录密码"` // 用户登录密码 NickName string `json:"nickName" gorm:"default:App用户;comment:用户昵称"` // 用户昵称 HeaderImg string `json:"headerImg" gorm:"default:https://qmplusimg.henrongyi.top/gva_header.jpg;comment:用户头像"` // 用户头像 AuthorityId uint `json:"authorityId" gorm:"default:666;comment:用户角色ID"` // 用户角色ID Authority Authority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"` Authorities []Authority `json:"authorities" gorm:"many2many:sys_user_authority;"` Phone string `json:"phone" gorm:"comment:用户手机号"` // 用户手机号 Email string `json:"email" gorm:"comment:用户邮箱"` // 用户邮箱 Enable int `json:"enable" gorm:"default:1;comment:用户是否被冻结 1正常 2冻结"` //用户是否被冻结 1正常 2冻结 } func (User) TableName() string { return "sys_users" }