daily/Schemas/AuthSchemas.py

22 lines
373 B
Python
Raw Normal View History

2023-03-01 16:04:43 +08:00
from enum import unique, Enum
2023-03-06 14:48:41 +08:00
from typing import Optional, List
from pydantic import BaseModel
2023-03-01 16:04:43 +08:00
@unique
class DefaultAuthConfigTypeEnum(Enum):
enum01 = "部门"
enum02 = "职务"
2023-03-06 14:48:41 +08:00
class AuthRuleInfo(BaseModel):
id: int
name: str
category1: Optional[str]
category2: Optional[str]
class AuthRuleList(BaseModel):
item_list: List[AuthRuleInfo]