feat: adding the rest ofthe nutrition properties from schema.org (#4301)

This commit is contained in:
Tom Brennan
2024-10-13 09:04:29 -04:00
committed by GitHub
parent 3aea229f2d
commit 02c0fe993b
16 changed files with 279 additions and 57 deletions

View File

@@ -1,14 +1,24 @@
from pydantic import ConfigDict
from pydantic.alias_generators import to_camel
from mealie.schema._mealie import MealieModel
class Nutrition(MealieModel):
calories: str | None = None
fat_content: str | None = None
protein_content: str | None = None
carbohydrate_content: str | None = None
cholesterol_content: str | None = None
fat_content: str | None = None
fiber_content: str | None = None
protein_content: str | None = None
saturated_fat_content: str | None = None
sodium_content: str | None = None
sugar_content: str | None = None
model_config = ConfigDict(from_attributes=True, coerce_numbers_to_str=True)
trans_fat_content: str | None = None
unsaturated_fat_content: str | None = None
model_config = ConfigDict(
from_attributes=True,
coerce_numbers_to_str=True,
alias_generator=to_camel,
)