feat(auth): 完成租户用户角色资源核心模块
This commit is contained in:
@@ -19,7 +19,9 @@ type User struct {
|
||||
Bio string `gorm:"type:text" json:"bio"`
|
||||
|
||||
// 角色和权限
|
||||
Role string `gorm:"size:20;default:'user'" json:"role"` // super_admin, admin, agent, user
|
||||
Role string `gorm:"size:20;default:'user'" json:"role"` // super_admin, admin, agent, user (legacy)
|
||||
RoleID *uint `json:"role_id,omitempty"` // 关联的角色 ID (新的 RBAC)
|
||||
Roles []Role `gorm:"many2many:user_roles;" json:"roles,omitempty"` // 用户关联的角色(多对多)
|
||||
Status string `gorm:"size:20;default:'active'" json:"status"` // active, inactive, banned
|
||||
IsVerified bool `gorm:"default:false" json:"is_verified"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user