Update
This commit is contained in:
parent
805bb9e4b0
commit
887a3fb975
@ -24,7 +24,7 @@ class User(BaseModel, TimestampMixin):
|
||||
|
||||
class Role(BaseModel, TimestampMixin):
|
||||
name = fields.CharField(max_length=20, unique=True, description="角色名称", index=True)
|
||||
desc = fields.CharField(max_length=500, null=True, blank=True, description="角色描述")
|
||||
desc = fields.CharField(max_length=500, null=True, description="角色描述")
|
||||
menus = fields.ManyToManyField("models.Menu", related_name="role_menus")
|
||||
apis = fields.ManyToManyField("models.Api", related_name="role_apis")
|
||||
|
||||
@ -44,16 +44,16 @@ class Api(BaseModel, TimestampMixin):
|
||||
|
||||
class Menu(BaseModel, TimestampMixin):
|
||||
name = fields.CharField(max_length=20, description="菜单名称", index=True)
|
||||
remark = fields.JSONField(null=True, description="保留字段", blank=True)
|
||||
menu_type = fields.CharEnumField(MenuType, null=True, blank=True, description="菜单类型")
|
||||
icon = fields.CharField(max_length=100, null=True, blank=True, description="菜单图标")
|
||||
remark = fields.JSONField(null=True, description="保留字段")
|
||||
menu_type = fields.CharEnumField(MenuType, null=True, description="菜单类型")
|
||||
icon = fields.CharField(max_length=100, null=True, description="菜单图标")
|
||||
path = fields.CharField(max_length=100, description="菜单路径", index=True)
|
||||
order = fields.IntField(default=0, description="排序", index=True)
|
||||
parent_id = fields.IntField(default=0, max_length=10, description="父菜单ID", index=True)
|
||||
is_hidden = fields.BooleanField(default=False, description="是否隐藏")
|
||||
component = fields.CharField(max_length=100, description="组件")
|
||||
keepalive = fields.BooleanField(default=True, description="存活")
|
||||
redirect = fields.CharField(max_length=100, null=True, blank=True, description="重定向")
|
||||
redirect = fields.CharField(max_length=100, null=True, description="重定向")
|
||||
|
||||
class Meta:
|
||||
table = "menu"
|
||||
@ -61,7 +61,7 @@ class Menu(BaseModel, TimestampMixin):
|
||||
|
||||
class Dept(BaseModel, TimestampMixin):
|
||||
name = fields.CharField(max_length=20, unique=True, description="部门名称", index=True)
|
||||
desc = fields.CharField(max_length=500, null=True, blank=True, description="备注")
|
||||
desc = fields.CharField(max_length=500, null=True, description="备注")
|
||||
is_deleted = fields.BooleanField(default=False, description="软删除标记", index=True)
|
||||
order = fields.IntField(default=0, description="排序", index=True)
|
||||
parent_id = fields.IntField(default=0, max_length=10, description="父部门ID", index=True)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user