初始化

This commit is contained in:
2026-09-03 14:31:25 +08:00
parent 30dd0bea14
commit 64a51f2567
23 changed files with 2091 additions and 144 deletions

0
core/dto/__init__.py Normal file
View File

12
core/dto/api_response.py Normal file
View File

@@ -0,0 +1,12 @@
from typing import TypeVar, Generic
from pydantic import BaseModel
# 声明一个泛型类型变量
T = TypeVar("T")
# 泛型响应体
class ApiResponse(BaseModel, Generic[T]):
code: int
message: str
data: T | None = None # data可以为空