- MANUAL-PRODUTO.md: Manual do usuário final - MANUAL-VENDAS.md: Estratégia comercial e vendas - MANUAL-TECNICO.md: Infraestrutura e deploy - README.md: Visão geral do projeto
18 lines
654 B
Python
18 lines
654 B
Python
from sqlalchemy import Column, Integer, String, Text, DateTime
|
|
from datetime import datetime, timezone
|
|
from app.database import Base
|
|
|
|
class Product(Base):
|
|
__tablename__ = "products"
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
barcode = Column(String, unique=True, index=True, nullable=False)
|
|
name = Column(String)
|
|
brand = Column(String)
|
|
category = Column(String)
|
|
ingredients_text = Column(Text)
|
|
nutri_score = Column(String)
|
|
nova_group = Column(Integer)
|
|
nutrition_json = Column(Text) # JSON string
|
|
image_url = Column(String)
|
|
updated_at = Column(DateTime, default=lambda: datetime.now(timezone.utc))
|