feat: modules, products, services, services kits
This commit is contained in:
69
modules/fulfillment_base/schemas/product_service.py
Normal file
69
modules/fulfillment_base/schemas/product_service.py
Normal file
@ -0,0 +1,69 @@
|
||||
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]
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region Response
|
||||
|
||||
|
||||
class CreateProductServiceResponse(BaseResponse):
|
||||
entity: ProductServiceSchema
|
||||
|
||||
|
||||
class UpdateProductServiceResponse(BaseResponse):
|
||||
pass
|
||||
|
||||
|
||||
class DeleteProductServiceResponse(BaseResponse):
|
||||
pass
|
||||
|
||||
|
||||
class ProductServicesDuplicateResponse(BaseResponse):
|
||||
pass
|
||||
|
||||
|
||||
# endregion
|
||||
Reference in New Issue
Block a user