34 lines
555 B
Python
34 lines
555 B
Python
"""公共Schema定义"""
|
|
from typing import Optional
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class PaginationParams(BaseModel):
|
|
"""分页参数"""
|
|
page: int = 1
|
|
pageSize: int = 10
|
|
|
|
|
|
class PaginationResult(BaseModel):
|
|
"""分页结果"""
|
|
items: list = []
|
|
total: int = 0
|
|
page: int = 1
|
|
pageSize: int = 10
|
|
totalPages: int = 0
|
|
|
|
|
|
class IdInput(BaseModel):
|
|
"""ID输入"""
|
|
id: str
|
|
|
|
|
|
class StatusInput(BaseModel):
|
|
"""状态输入"""
|
|
is_active: bool = True
|
|
|
|
|
|
class DeleteInput(BaseModel):
|
|
"""删除输入"""
|
|
pass
|