from datetime import date

from src.data.model.schemas.base_schemas import BaseSchemaModel
from typing import List


class ShoppingCartItem(BaseSchemaModel):
    id: int
    article_number: str
    size: int
    color: str
    quantity: int
    price: float
    sales_order_type: int
    overall_price: float
    date_to: str
    date_from: str
    delivery_number: str | None


class ShoppingCart(BaseSchemaModel):
    price_sum: float
    has_shipping_cost: bool
    shipping_cost: float
    items: List[ShoppingCartItem]


class ShoppingCartItemInsert(BaseSchemaModel):
    ean: str
    quantity: int
    sales_order_type: int
    agent_id: int | None
    partner_id: int


class ShoppingCartItemRemove(BaseSchemaModel):
    id: int


class ShoppingCartItemChangeDate(BaseSchemaModel):
    date_to: date | None
    date_from: date | None
