27 lines
417 B
Python
27 lines
417 B
Python
from pydantic import BaseModel
|
|
|
|
|
|
class CustomConfig:
|
|
populate_by_name = True
|
|
from_attributes = True
|
|
|
|
|
|
class CustomModel(BaseModel):
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class OkMessageSchema(BaseModel):
|
|
ok: bool
|
|
message: str
|
|
|
|
|
|
class PaginationSchema(CustomModel):
|
|
page: int
|
|
items_per_page: int
|
|
|
|
|
|
class PaginationInfoSchema(CustomModel):
|
|
total_pages: int
|
|
total_items: int
|