Files
Fulfillment-Backend/generators/deal_pdf_generator/deal_data.py

26 lines
928 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from typing import TypedDict, List, Dict, Tuple, Optional
from models import DealProduct, Deal, DealStatusHistory
class DealTechSpecProductData(TypedDict):
deal: Deal
last_status: DealStatusHistory
total_one_product: int
quantity: int
additional_info: Optional[str]
# Поле для группировки товаров с одним артикулом и вывода таблицы [Штрихкод, Размер, Кол-во, Короба]
deal_products: List[DealProduct]
# Поле для группировки товаров из нескольких сделок и вывода таблицы [Склад отгрузки, Кол-во]
warehouses_and_quantities: List[Tuple[str, int]]
class DealTechSpecData(TypedDict):
deals: List[Deal]
products: Dict[str, DealTechSpecProductData]
product_images: Tuple
deal_ids_header: str
deal_status_str: list[str]