📚 Documentação inicial do ALETHEIA
- 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
This commit is contained in:
17
backend/app/models/product.py
Normal file
17
backend/app/models/product.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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))
|
||||
Reference in New Issue
Block a user