add ApiReturnModel ー>return value 統一

This commit is contained in:
2024-11-26 16:31:54 +09:00
parent 3447c7832c
commit 97d1232def
3 changed files with 52 additions and 31 deletions

View File

@@ -0,0 +1,12 @@
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