13 lines
238 B
Python
13 lines
238 B
Python
|
|
from pydantic import BaseModel,Field
|
|
from pydantic.generics import GenericModel
|
|
from typing import Generic,TypeVar,Optional
|
|
|
|
T = TypeVar('T')
|
|
|
|
class ApiReturnModel(GenericModel,Generic[T]):
|
|
code:int = 0
|
|
msg:str ="OK"
|
|
data:T
|
|
|