📚 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:
0
backend/app/schemas/__init__.py
Normal file
0
backend/app/schemas/__init__.py
Normal file
BIN
backend/app/schemas/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
backend/app/schemas/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
backend/app/schemas/__pycache__/auth.cpython-312.pyc
Normal file
BIN
backend/app/schemas/__pycache__/auth.cpython-312.pyc
Normal file
Binary file not shown.
BIN
backend/app/schemas/__pycache__/scan.cpython-312.pyc
Normal file
BIN
backend/app/schemas/__pycache__/scan.cpython-312.pyc
Normal file
Binary file not shown.
21
backend/app/schemas/auth.py
Normal file
21
backend/app/schemas/auth.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from pydantic import BaseModel, EmailStr
|
||||
|
||||
class RegisterRequest(BaseModel):
|
||||
email: str
|
||||
name: str
|
||||
password: str
|
||||
|
||||
class LoginRequest(BaseModel):
|
||||
email: str
|
||||
password: str
|
||||
|
||||
class TokenResponse(BaseModel):
|
||||
access_token: str
|
||||
token_type: str = "bearer"
|
||||
user: dict
|
||||
|
||||
class UserResponse(BaseModel):
|
||||
id: int
|
||||
email: str
|
||||
name: str
|
||||
is_premium: bool
|
||||
36
backend/app/schemas/scan.py
Normal file
36
backend/app/schemas/scan.py
Normal file
@@ -0,0 +1,36 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List
|
||||
from datetime import datetime
|
||||
|
||||
class ScanRequest(BaseModel):
|
||||
barcode: str
|
||||
|
||||
class IngredientAnalysis(BaseModel):
|
||||
name: str
|
||||
popular_name: Optional[str] = None
|
||||
explanation: str
|
||||
classification: str # "good", "warning", "bad"
|
||||
reason: str
|
||||
|
||||
class ScanResult(BaseModel):
|
||||
barcode: str
|
||||
product_name: Optional[str] = None
|
||||
brand: Optional[str] = None
|
||||
category: Optional[str] = None
|
||||
image_url: Optional[str] = None
|
||||
score: int
|
||||
summary: str
|
||||
positives: List[str]
|
||||
negatives: List[str]
|
||||
ingredients: List[IngredientAnalysis]
|
||||
nutri_score: Optional[str] = None
|
||||
nova_group: Optional[int] = None
|
||||
source: str = "open_food_facts"
|
||||
|
||||
class ScanHistoryItem(BaseModel):
|
||||
id: int
|
||||
barcode: str
|
||||
product_name: Optional[str] = None
|
||||
brand: Optional[str] = None
|
||||
score: int
|
||||
scanned_at: datetime
|
||||
Reference in New Issue
Block a user