usermod/Schemas/UserManageSchemas.py

37 lines
741 B
Python

from datetime import datetime
from typing import Union, Any
from pydantic import BaseModel
class UserChangeInfo(BaseModel):
id: str
name: Union[str, None]
avatar: Union[str, None]
role: Union[str, None]
department: Union[str, None]
post: Union[str, None]
auth_data: Union[str, None]
class UserChangeInfoByKey(BaseModel):
id: str
key: str
value: Any
class UserListQueryParams(BaseModel):
id: str
name: Union[str, None]
role: Union[str, None]
department: Union[str, None]
post: Union[str, None]
email: Union[str, None]
page_size: int
page: int
# create_time: Union[datetime, None]
# update_time: Union[datetime, None]
class UserId(BaseModel):
id: str