From 60e1e72bffa422b8100910e41ea9a5ca4ab4bb9e Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 8 Feb 2024 10:25:22 +0100 Subject: [PATCH] update datatypes --- lib/datatypes.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/datatypes.py b/lib/datatypes.py index 1f1981b..2c2e931 100644 --- a/lib/datatypes.py +++ b/lib/datatypes.py @@ -58,6 +58,22 @@ class Supplier: def dict(self): return {k: str(v) for k, v in asdict(self).items()} +@dataclass +class Recipe: + recipe_id: int + preperation_time: int + name: str + description: str + instructions: str + + def dict(self): + return {k: str(v) for k, v in asdict(self).items()} + +@dataclass +class SupplierContainsIngredients: + recipe: Recipe + ingredient: Ingredient + amount: int @dataclass class SupplierContainsIngredients: