Files
cas_tt_cloud_backend/app/common/model/sys_user_tenant.go
2021-09-28 11:47:19 +08:00

41 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
type SysUserTenant struct {
Model
ModelTenant
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
Department string `gorm:"column:department;type:varchar(100);default:null;comment:部门信息" json:"department"`
Role string `gorm:"column:role;type:varchar(100);default:null;comment:角色信息" json:"role"`
Identity SysUserTenantIdentity `gorm:"column:identity;type:tinyint(1);default:0;comment:用户身份1管理员2用户" json:"-"`
Status SysUserTenantStatus `gorm:"column:status;type:tinyint(1);default:1;comment:状态(1启用2禁用)" json:"-"`
ModelDeleted
ModelAt
}
type SysUserTenantIdentity int
const (
// SysUserTenantIdentityForSystemAdmin 管理员
SysUserTenantIdentityForSystemAdmin SysUserTenantIdentity = iota + 1
// SysUserTenantIdentityForSystemUser 用户
SysUserTenantIdentityForSystemUser
)
// SysUserTenantStatus 状态
type SysUserTenantStatus int
const (
// SysUserTenantStatusForEnable 启用
SysUserTenantStatusForEnable SysUserTenantStatus = iota + 1
// SysUserTenantStatusForDisable 禁用
SysUserTenantStatusForDisable
)
func (m *SysUserTenant) TableName() string {
return m.NewTableName("sys_user_tenant")
}
func NewSysUserTenant() *SysUserTenant {
return &SysUserTenant{}
}