Step 12:后端轻量优化(API 稳定性 & 前端友好)

This commit is contained in:
Cheng Zhou
2025-12-16 20:03:05 +08:00
parent a54d7faf19
commit 5eab324c50
44 changed files with 161 additions and 14 deletions
+16
View File
@@ -0,0 +1,16 @@
from typing import Generic, TypeVar
from pydantic import BaseModel
from pydantic.generics import GenericModel
T = TypeVar("T")
class PaginatedResponse(GenericModel, Generic[T]):
items: list[T]
total: int
class MessageResponse(BaseModel):
code: str
message: str