48 lines
1.6 KiB
Go
48 lines
1.6 KiB
Go
package model
|
|
|
|
type UserTenant struct {
|
|
Model
|
|
ModelTenant
|
|
UID uint64 `gorm:"column:uid;index:idx_tenant_user_uuid;type:int;default:0;comment:用户表UUID" json:"-"`
|
|
Avatar string `gorm:"column:avatar;type:varchar(255);default:null;comment:头像" json:"avatar"`
|
|
Name string `gorm:"column:name;type:varchar(20);default:null;comment:真实姓名" json:"name"`
|
|
Email string `gorm:"column:email;type:varchar(50);default:null;comment:邮箱" json:"email"`
|
|
Identity int `gorm:"column:identity;type:tinyint(3);default:0;comment:身份信息" json:"-"`
|
|
Area
|
|
Selected UserTenantSelected `gorm:"column:selected;type:tinyint(1);default:0;comment:最后一次选中的身份状态,用于下次登陆展示" json:"-"`
|
|
Other string `gorm:"column:other;type:varchar(255);default:null;comment:其他信息" json:"-"`
|
|
Status UserTenantStatus `gorm:"column:status;type:tinyint(0);default:0;comment:状态" json:"-"`
|
|
ModelDeleted
|
|
ModelAt
|
|
}
|
|
|
|
type UserTenantSelected int
|
|
|
|
const (
|
|
// UserTenantSelectedForNo 未选中
|
|
UserTenantSelectedForNo UserTenantSelected = iota
|
|
// UserTenantSelectedForYes 已选中
|
|
UserTenantSelectedForYes
|
|
)
|
|
|
|
type UserTenantStatus int
|
|
|
|
const (
|
|
// UserTenantStatusForInit 初始化
|
|
UserTenantStatusForInit UserTenantStatus = iota
|
|
// UserTenantStatusForExamining 审核中
|
|
UserTenantStatusForExamining
|
|
// UserTenantStatusForExamineRefuse 审核拒绝
|
|
UserTenantStatusForExamineRefuse
|
|
// UserTenantStatusForExaminePass 审核通过
|
|
UserTenantStatusForExaminePass
|
|
)
|
|
|
|
func (m *UserTenant) TableName() string {
|
|
return m.NewTableName("user_tenant")
|
|
}
|
|
|
|
func NewUserTenant() *UserTenant {
|
|
return &UserTenant{}
|
|
}
|