80 lines
1.3 KiB
Python
80 lines
1.3 KiB
Python
from modules.fulfillment_base.schemas.service import ServiceSchema
|
|
from schemas.base import BaseSchema, BaseResponse
|
|
|
|
|
|
# region Entity
|
|
|
|
|
|
class ProductServiceSchema(BaseSchema):
|
|
deal_id: int
|
|
product_id: int
|
|
service_id: int
|
|
service: ServiceSchema
|
|
price: float
|
|
is_fixed_price: bool
|
|
|
|
|
|
class CreateProductServiceSchema(BaseSchema):
|
|
deal_id: int
|
|
product_id: int
|
|
service_id: int
|
|
price: float
|
|
|
|
|
|
class UpdateProductServiceSchema(BaseSchema):
|
|
price: float
|
|
is_fixed_price: bool
|
|
|
|
|
|
# endregion
|
|
|
|
# region Request
|
|
|
|
|
|
class CreateProductServiceRequest(BaseSchema):
|
|
entity: CreateProductServiceSchema
|
|
|
|
|
|
class UpdateProductServiceRequest(BaseSchema):
|
|
entity: UpdateProductServiceSchema
|
|
|
|
|
|
class ProductServicesDuplicateRequest(BaseSchema):
|
|
deal_id: int
|
|
source_deal_product_id: int
|
|
target_deal_product_ids: list[int]
|
|
|
|
|
|
class DealProductAddKitRequest(BaseSchema):
|
|
deal_id: int
|
|
product_id: int
|
|
kit_id: int
|
|
|
|
|
|
# endregion
|
|
|
|
# region Response
|
|
|
|
|
|
class CreateProductServiceResponse(BaseResponse):
|
|
entity: ProductServiceSchema
|
|
|
|
|
|
class UpdateProductServiceResponse(BaseResponse):
|
|
pass
|
|
|
|
|
|
class DeleteProductServiceResponse(BaseResponse):
|
|
pass
|
|
|
|
|
|
class ProductServicesDuplicateResponse(BaseResponse):
|
|
pass
|
|
|
|
|
|
class DealProductAddKitResponse(BaseResponse):
|
|
pass
|
|
|
|
|
|
# endregion
|