feat: billing for groups of deals
This commit is contained in:
@@ -11,6 +11,13 @@ class DealBillRequestSchema(BaseSchema):
|
||||
pdf_url: Optional[str]
|
||||
invoice_number: Optional[str]
|
||||
|
||||
class GroupBillRequestSchema(BaseSchema):
|
||||
group_id: int
|
||||
created_at: datetime.datetime
|
||||
paid: bool
|
||||
pdf_url: Optional[str]
|
||||
invoice_number: Optional[str]
|
||||
|
||||
# endregion
|
||||
|
||||
# region Requests
|
||||
|
||||
@@ -6,7 +6,7 @@ from pydantic import constr, field_validator
|
||||
|
||||
from models import ServiceCategoryPrice, ServicePriceCategory, Deal, Product, DealProduct, DealStatusHistory
|
||||
from schemas.base import BaseSchema, OkMessageSchema
|
||||
from schemas.billing import DealBillRequestSchema
|
||||
from schemas.billing import DealBillRequestSchema, GroupBillRequestSchema
|
||||
from schemas.client import ClientSchema
|
||||
from schemas.marketplace import BaseMarketplaceSchema
|
||||
from schemas.product import ProductSchema
|
||||
@@ -27,6 +27,7 @@ class DealGroupSchema(BaseSchema):
|
||||
id: int
|
||||
name: Optional[str] = None
|
||||
lexorank: str
|
||||
bill_request: Optional[GroupBillRequestSchema] = None
|
||||
|
||||
|
||||
class DealSummary(BaseSchema):
|
||||
@@ -99,6 +100,7 @@ class DealSchema(BaseSchema):
|
||||
shipping_warehouse: Optional[Union[ShippingWarehouseSchema, str]] = None
|
||||
bill_request: Optional[DealBillRequestSchema] = None
|
||||
category: Optional[ServicePriceCategorySchema] = None
|
||||
group: Optional[DealGroupSchema] = None
|
||||
|
||||
delivery_date: Optional[datetime.datetime] = None
|
||||
receiving_slot_date: Optional[datetime.datetime] = None
|
||||
|
||||
Reference in New Issue
Block a user