| 123456789101112131415161718192021222324252627 |
- from typing import List, Optional
- from pydantic import BaseModel
- from models.items import Product
- class ItemWeb(BaseModel):
- id: int
- quantity: int
- class OrderWeb(BaseModel):
- customerId: int
- items: List[ItemWeb]
- totalAmount: float
- orderDate: str
- table: int
- class Sale(BaseModel):
- """Sale model matching the database schema"""
- id: int
- user_id: int
- total: float
- fudo_id: str
- date: str
- table: int
- username: Optional[str] = None
- user_email: Optional[str] = None
- products: List[Product] = []
|