更新python后端

This commit is contained in:
BBIT-Kai
2025-09-18 17:18:18 +08:00
parent 2fc209e6e6
commit de6a350da8
45 changed files with 2524 additions and 89 deletions
+3 -2
View File
@@ -1,11 +1,12 @@
from fastapi import FastAPI
from pydantic import BaseModel
from typing import Generic, TypeVar, Optional, List
from pydantic.generics import GenericModel
from pydantic import BaseModel
T = TypeVar("T")
# 定义通用响应结构
class BaseResponse(GenericModel, Generic[T]):
class BaseResponse(BaseModel, Generic[T]):
status: bool = True
message: str = "操作成功"
data: Optional[T] = None