This commit is contained in:
fengchuanhn@gmail.com
2026-05-15 18:52:29 +08:00
commit cccd75767b
29 changed files with 958 additions and 0 deletions

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

@@ -0,0 +1,15 @@
from typing import Generic, TypeVar
from pydantic import BaseModel, ConfigDict
T = TypeVar("T")
class ApiResponse(BaseModel, Generic[T]):
"""与 aiclient 前端约定的统一响应结构。"""
model_config = ConfigDict(from_attributes=True)
ok: bool
message: str = ""
data: T | None = None