from typing import List, Optional from pydantic import BaseModel class ItemWeb(BaseModel): id: int quantity: int class OrderWeb(BaseModel): customerId: int items: List[ItemWeb] totalAmount: float orderDate: str table: int class Product(BaseModel): """Legacy Product model - use models.items.Product instead""" id: int name: str price: float type: str description: str image: str status: int # 0: inactive, 1: active quantity: Optional[int] = 1 # Optional quantity for the product class Sale(BaseModel): """Sale model matching the database schema""" id: int user_id: int total: float fudo_id: str fecha: str table: int user_name: Optional[str] = None user_email: Optional[str] = None