Files
2026-09-22 17:01:14 +08:00

9 lines
261 B
Python

# -*- 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