othr
This commit is contained in:
@@ -31,8 +31,8 @@ class OkMessageSchema(CustomModelCamel):
|
||||
|
||||
|
||||
class PaginationSchema(CustomModelCamel):
|
||||
page: int
|
||||
items_per_page: int
|
||||
page: int | None = None
|
||||
items_per_page: int | None = None
|
||||
|
||||
|
||||
class PaginationInfoSchema(CustomModelCamel):
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import List
|
||||
|
||||
from schemas.base import CustomModelCamel, OkMessageSchema
|
||||
from schemas.client import ClientSchema
|
||||
from schemas.product import ProductSchema
|
||||
from schemas.service import ServiceSchema
|
||||
|
||||
|
||||
@@ -28,6 +29,11 @@ class DealServiceSchema(CustomModelCamel):
|
||||
quantity: int
|
||||
|
||||
|
||||
class DealProductSchema(CustomModelCamel):
|
||||
product: ProductSchema
|
||||
quantity: int
|
||||
|
||||
|
||||
class DealSchema(CustomModelCamel):
|
||||
id: int
|
||||
name: str
|
||||
@@ -35,6 +41,7 @@ class DealSchema(CustomModelCamel):
|
||||
created_at: datetime.datetime
|
||||
current_status: int
|
||||
services: List[DealServiceSchema]
|
||||
products: List[DealProductSchema]
|
||||
# total_price: int
|
||||
|
||||
|
||||
|
||||
@@ -4,12 +4,16 @@ 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[str]
|
||||
barcodes: list[ProductBarcodeSchema]
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
Reference in New Issue
Block a user