feat: user api

This commit is contained in:
zy7y
2022-09-12 15:11:12 +08:00
parent 28013b0e8e
commit 7db1277dd9
30 changed files with 513 additions and 304 deletions

View File

@@ -1,4 +1,3 @@
from core.enums import MenuType
from core.table import Table, fields
@@ -10,7 +9,7 @@ class MenuModel(Table):
name = fields.CharField(max_length=20, description="名称", null=True)
meta = fields.JSONField(description="元数据信息", null=True)
path = fields.CharField(max_length=128, description="菜单url", null=True)
type = fields.IntEnumField(MenuType, description="菜单类型")
type = fields.SmallIntField(description="菜单类型 0目录 1组件 2按钮")
component = fields.CharField(max_length=128, description="组件地址", null=True)
pid = fields.IntField(description="父id", null=True)
identifier = fields.CharField(max_length=30, description="权限标识 user:add", null=True)

View File

@@ -1,4 +1,3 @@
from core.enums import UserType
from core.table import Table, fields
@@ -16,4 +15,3 @@ class UserModel(Table):
table_description = "用户表"
# 索引
unique_together = ("username",)