29 lines
540 B
Python
29 lines
540 B
Python
from decimal import Decimal
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class NutritionalInformation(BaseModel):
|
|
name: str
|
|
units: str
|
|
product_group: str
|
|
|
|
description: str | None
|
|
ingredients: list[str]
|
|
|
|
allergen: list[str]
|
|
protein: Decimal
|
|
carbohydrate: Decimal
|
|
total_sugar: Decimal
|
|
added_sugar: Decimal
|
|
total_fat: Decimal
|
|
saturated_fat: Decimal
|
|
trans_fat: Decimal
|
|
cholestrol: Decimal
|
|
sodium: Decimal
|
|
|
|
msnf: Decimal
|
|
other_solids: Decimal
|
|
total_solids: Decimal
|
|
water: Decimal
|