GenericModel -> BaseModel

This commit is contained in:
2024-11-26 17:57:25 +09:00
parent 97d1232def
commit 0232e0d2c2

View File

@@ -1,12 +1,10 @@
from pydantic import BaseModel,Field from pydantic import BaseModel
from pydantic.generics import GenericModel
from typing import Generic,TypeVar,Optional from typing import Generic,TypeVar,Optional
T = TypeVar('T') T = TypeVar('T')
class ApiReturnModel(GenericModel,Generic[T]): class ApiReturnModel(BaseModel,Generic[T]):
code:int = 0 code:int = 0
msg:str ="OK" msg:str ="OK"
data:T data:T