add ApiReturnModel ー>return value 統一
This commit is contained in:
12
backend/app/core/common.py
Normal file
12
backend/app/core/common.py
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user