fooder-api/fooder/model/diary.py
Piotr Domański e2af49046c
All checks were successful
Python lint and test / linttest (push) Successful in 5m30s
[isort] ran with black profile
2024-08-04 16:17:16 +02:00

22 lines
371 B
Python

from datetime import date
from typing import List
from pydantic import BaseModel
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
fiber: float
class Config:
from_attributes = True