This commit is contained in:
BarsTiger
2023-10-07 22:51:05 +03:00
parent 2f14f4d1ee
commit 9d45084d98
33 changed files with 2205 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
from typing import Generic
from typing import Optional
from typing import TypeVar
from pydantic import BaseModel
from pydantic.generics import GenericModel
T = TypeVar("T", bound=BaseModel)
class BaseIdTypeHref(BaseModel):
id: str
type: str
href: str
class BaseDataModel(GenericModel, BaseModel, Generic[T]):
attributes: T
class BaseHrefNextData(GenericModel, Generic[T]):
href: str
next: Optional[str] = None
data: T