from __future__ import annotations from pydantic import BaseModel, Field class ProductCreate(BaseModel): producto: str precio: float = Field(ge=0) cantidad: float = Field(gt=0) unidad: str = "unidad" fechaCaducidad: str fechaIngreso: str fechaProduccion: str categoria: str = "" caducidadEstimada: bool = False notas: str = "" fuente: str = "web" class ConsumptionCreate(BaseModel): producto: str cantidad: float = Field(gt=0) unidad: str = "unidad" notas: str = "" fuente: str = "telegram-consumo" class SearchRequest(BaseModel): question: str class DiagramRequest(BaseModel): instruction: str class TextExtractionRequest(BaseModel): text: str