crappy
This commit is contained in:
33
schemas/product.py
Normal file
33
schemas/product.py
Normal 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
|
||||
Reference in New Issue
Block a user