21 lines
351 B
Python
21 lines
351 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
from .product import Product
|
|
|
|
|
|
class PresetEntry(BaseModel):
|
|
"""PresetEntry."""
|
|
|
|
id: int
|
|
grams: float
|
|
product: Product
|
|
preset_id: int
|
|
calories: float
|
|
protein: float
|
|
carb: float
|
|
fat: float
|
|
fiber: float
|
|
|
|
class Config:
|
|
from_attributes = True
|