from typing import List from schemas.base import CustomModelCamel, PaginationInfoSchema, OkMessageSchema # region Entities class ProductBarcodeSchema(CustomModelCamel): barcode: str class ProductSchema(CustomModelCamel): id: int name: str article: str client_id: int barcodes: list[ProductBarcodeSchema] # endregion # region Requests class ProductCreateRequest(CustomModelCamel): name: str article: str client_id: int barcodes: List[str] class ProductDeleteRequest(CustomModelCamel): product_id: int class ProductUpdateRequest(CustomModelCamel): product: ProductSchema # endregion # region Responses class ProductCreateResponse(OkMessageSchema): product_id: int | None = None class ProductGetResponse(CustomModelCamel): products: List[ProductSchema] pagination_info: PaginationInfoSchema class ProductDeleteResponse(OkMessageSchema): pass class ProductUpdateResponse(OkMessageSchema): pass # endregion