35 lines
1.5 KiB
Go
35 lines
1.5 KiB
Go
package model
|
|
|
|
// UserIdentity 用户身份管理数据模型
|
|
type UserIdentity struct {
|
|
Model
|
|
UID uint64 `gorm:"column:uid;index:idx_user_manage_uid;type:int;default:0;comment:用户表UUID" json:"-"`
|
|
Name string `gorm:"column:name;type:varchar(20);default:'';comment:真实姓名" json:"name"`
|
|
Email string `gorm:"column:email;type:varchar(50);default:'';comment:邮箱" json:"email"`
|
|
Job string `gorm:"column:job;type:varchar(50);default:'';comment:职务" json:"job"`
|
|
FixedPhone string `gorm:"column:fixed_phone;type:varchar(20);default:'';comment:固定电话" json:"fixed_phone"`
|
|
Address string `gorm:"column:address;type:varchar(255);default:'';comment:详细地址" json:"address"`
|
|
Identity int `gorm:"column:identity;type:tinyint(3);default:0;comment:身份信息" json:"-"`
|
|
IsSelected UserIdentitySelected `gorm:"column:is_selected;type:tinyint(1);default:0;comment:最后一次选中的身份信息" json:"-"`
|
|
ModelDeleted
|
|
ModelAt
|
|
}
|
|
|
|
// UserIdentitySelected 身份选中状态
|
|
type UserIdentitySelected int
|
|
|
|
const (
|
|
// UserIdentitySelectedForNo 未选中
|
|
UserIdentitySelectedForNo UserIdentitySelected = iota
|
|
// UserIdentitySelectedForYes 已选中
|
|
UserIdentitySelectedForYes
|
|
)
|
|
|
|
func (m *UserIdentity) TableName() string {
|
|
return m.NewTableName("user_identity")
|
|
}
|
|
|
|
func NewUserIdentity() *UserIdentity {
|
|
return &UserIdentity{}
|
|
}
|