This commit is contained in:
2024-03-28 08:22:14 +03:00
parent 6ba041a839
commit a72eb31e07
19 changed files with 243 additions and 28 deletions

33
schemas/product.py Normal file
View File

@@ -0,0 +1,33 @@
from typing import List
from schemas.base import CustomModel, PaginationInfoSchema
# region Entities
class ProductSchema(CustomModel):
id: int
name: str
article: str
client_id: int
# endregion
# region Requests
class ProductCreateRequest(CustomModel):
name: str
article: str
client_id: int
# endregion
# region Responses
class ProductCreateResponse(CustomModel):
product_id: int
class ProductGetResponse(CustomModel):
products: List[ProductSchema]
pagination_info: PaginationInfoSchema
# endregion