feat: 添加角色类型常量及用户主角色获取方法
This commit is contained in:
1 parent
c5977ce354
commit
20ad8115da
14 files changed
+123
-64
No files matched your search
@@ -12,7 +12,7 @@ type Role struct {
|
||||
|
||||
func (Role) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("code").Unique().NotEmpty(),
|
||||
field.Int("code").Unique().Positive(),
|
||||
field.String("name").NotEmpty(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user