coder16
updated claudio
67aa1ca
Raw
History Blame Contribute Delete
551 Bytes
"""Modelo de dominio: Item (menú, servicio o producto)."""
from __future__ import annotations
from pydantic import Field
from app.models.common import ImagenItem, MongoModel, PyObjectId, TipoItem
class Item(MongoModel):
"""Item ofertado por un negocio."""
negocio_id: PyObjectId
tipo: TipoItem
nombre: str = Field(min_length=1, max_length=200)
descripcion: str | None = Field(default=None, max_length=5000)
precio: float = Field(ge=0)
imagenes: list[ImagenItem] = Field(default_factory=list)
activo: bool = True