初始化

This commit is contained in:
lhx
2025-12-12 10:57:31 +08:00
commit f8e85beba1
38 changed files with 2146 additions and 0 deletions

25
app/schemas/common.py Normal file
View File

@@ -0,0 +1,25 @@
from pydantic import BaseModel
from typing import Optional, List, Any, Generic, TypeVar
T = TypeVar('T')
class PageParams(BaseModel):
"""分页参数"""
page: int = 1
page_size: int = 20
class PageResponse(BaseModel, Generic[T]):
"""分页响应"""
total: int
page: int
page_size: int
items: List[T]
class BatchImportResponse(BaseModel):
"""批量导入响应"""
success: bool
total: int
inserted: int
skipped: int
skipped_ids: List[str] = []
message: str