# -*- coding: utf-8 -*- """统一响应包装体""" from typing import Generic, Optional, TypeVar from pydantic import BaseModel T = TypeVar("T") class ApiResponse(BaseModel, Generic[T]): code: int = 200 msg: str = "success" data: Optional[T] = None