fooder-api/fooder/model/diary.py

22 lines
370 B
Python
Raw Normal View History

2023-04-01 16:19:12 +02:00
from pydantic import BaseModel
from typing import List
from datetime import date
from .meal import Meal
class Diary(BaseModel):
"""Diary represents user diary for given day"""
id: int
date: date
meals: List[Meal]
calories: float
protein: float
carb: float
fat: float
2023-07-30 20:18:42 +02:00
fiber: float
2023-04-01 16:19:12 +02:00
class Config:
2023-07-30 20:18:42 +02:00
from_attributes = True