Merge remote-tracking branch 'origin/fillingDealsFromExcelFile' into excelMerge
This commit is contained in:
@@ -12,7 +12,7 @@ from schemas.marketplace import BaseMarketplaceSchema
|
||||
from schemas.product import ProductSchema
|
||||
from schemas.service import ServiceSchema, ServicePriceCategorySchema
|
||||
from schemas.shipping import PalletSchema, BoxSchema
|
||||
from schemas.shipping_warehouse import ShippingWarehouseSchema
|
||||
from schemas.shipping_warehouse import ShippingWarehouseSchema, BaseShippingWarehouseSchema
|
||||
from schemas.user import UserSchema
|
||||
|
||||
|
||||
@@ -129,6 +129,33 @@ class DealGeneralInfoSchema(BaseSchema):
|
||||
manager: Optional[UserSchema] = None
|
||||
|
||||
|
||||
class OptionalShippingWarehouseSchema(BaseShippingWarehouseSchema):
|
||||
id: Optional[int] = None
|
||||
|
||||
|
||||
class ParsedCityBreakdownSchema(BaseSchema):
|
||||
base_marketplace: BaseMarketplaceSchema
|
||||
shipping_warehouse: OptionalShippingWarehouseSchema
|
||||
quantity: int
|
||||
|
||||
|
||||
class ParsedProductRowSchema(BaseSchema):
|
||||
barcode: str
|
||||
products: list[ProductSchema]
|
||||
breakdowns: list[ParsedCityBreakdownSchema]
|
||||
|
||||
|
||||
class CityBreakdownFromExcelSchema(BaseSchema):
|
||||
base_marketplace: BaseMarketplaceSchema
|
||||
shipping_warehouse: OptionalShippingWarehouseSchema
|
||||
quantity: int
|
||||
|
||||
|
||||
class ProductFromExcelSchema(BaseSchema):
|
||||
product_id: int
|
||||
cities_breakdown: list[CityBreakdownFromExcelSchema]
|
||||
|
||||
|
||||
# endregion Entities
|
||||
|
||||
# region Requests
|
||||
@@ -271,6 +298,11 @@ class ManageEmployeeRequest(BaseSchema):
|
||||
is_assign: bool
|
||||
|
||||
|
||||
class CreateDealsFromExcelRequest(BaseSchema):
|
||||
client_id: int
|
||||
products: list[ProductFromExcelSchema]
|
||||
|
||||
|
||||
class DealAddToGroupRequest(BaseSchema):
|
||||
deal_id: int
|
||||
group_id: int
|
||||
@@ -411,6 +443,15 @@ class GetAvailableEmployeesToAssignResponse(BaseSchema):
|
||||
employees: list[UserSchema]
|
||||
|
||||
|
||||
class ParseDealsExcelResponse(BaseSchema):
|
||||
rows: list[ParsedProductRowSchema]
|
||||
errors: list[str]
|
||||
|
||||
|
||||
class CreateDealsFromExcelResponse(OkMessageSchema):
|
||||
pass
|
||||
|
||||
|
||||
class DealAddToGroupResponse(OkMessageSchema):
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user