94 lines
2.7 KiB
Python
94 lines
2.7 KiB
Python
|
|
from persons import db as persons_db
|
||
|
|
|
||
|
|
class Persons:
|
||
|
|
jacob = persons_db.Person(
|
||
|
|
id=1,
|
||
|
|
name='Jacob')
|
||
|
|
|
||
|
|
ryan = persons_db.Person(
|
||
|
|
id=2,
|
||
|
|
name='Ryan')
|
||
|
|
|
||
|
|
ellie = persons_db.Person(
|
||
|
|
id=3,
|
||
|
|
name='Ellie')
|
||
|
|
|
||
|
|
chris = persons_db.Person(
|
||
|
|
id=4,
|
||
|
|
name='Chris')
|
||
|
|
|
||
|
|
from products import db as products_db
|
||
|
|
|
||
|
|
class Products:
|
||
|
|
broccoli = products_db.Product(
|
||
|
|
id=0,
|
||
|
|
product_id='69',
|
||
|
|
name='Broccoli',
|
||
|
|
link='https://en.wikipedia.org/wiki/Broccoli',
|
||
|
|
tags=['vegetable'],
|
||
|
|
img_small='https://upload.wikimedia.org/wikipedia/commons/thumb/0/03/Broccoli_and_cross_section_edit.jpg/800px-Broccoli_and_cross_section_edit.jpg',
|
||
|
|
img_large='https://upload.wikimedia.org/wikipedia/commons/0/03/Broccoli_and_cross_section_edit.jpg',
|
||
|
|
raw_data={},
|
||
|
|
)
|
||
|
|
|
||
|
|
garlic_bread = products_db.Product(
|
||
|
|
id=0,
|
||
|
|
product_id='420',
|
||
|
|
name='Garlic Bread',
|
||
|
|
link='https://en.wikipedia.org/wiki/Garlic_bread',
|
||
|
|
tags=['bread', 'garlic'],
|
||
|
|
img_small='https://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/Garlic_bread.jpg/800px-Garlic_bread.jpg',
|
||
|
|
img_large='https://upload.wikimedia.org/wikipedia/commons/4/4b/Garlic_bread.jpg',
|
||
|
|
raw_data={},
|
||
|
|
)
|
||
|
|
|
||
|
|
from ingredients import db as ingredients_db
|
||
|
|
|
||
|
|
class Ingredients:
|
||
|
|
broccoli_chopped_1kg = ingredients_db.Ingredient(
|
||
|
|
id=0,
|
||
|
|
line='1kg Broccoli, Chopped',
|
||
|
|
name='Broccoli',
|
||
|
|
unit='1kg',
|
||
|
|
quantity='1',
|
||
|
|
preparation='Chopped',
|
||
|
|
product=Products.broccoli,
|
||
|
|
)
|
||
|
|
|
||
|
|
garlic_bread_1_loaf = ingredients_db.Ingredient(
|
||
|
|
id=0,
|
||
|
|
line='1 Loaf Garlic Bread',
|
||
|
|
name='Garlic Bread',
|
||
|
|
unit='Loaf',
|
||
|
|
quantity='1',
|
||
|
|
preparation='',
|
||
|
|
product=Products.garlic_bread,
|
||
|
|
)
|
||
|
|
|
||
|
|
from recipes import db as recipes_db
|
||
|
|
|
||
|
|
class Recipes:
|
||
|
|
broccoli_soup = recipes_db.Recipe(
|
||
|
|
id=0,
|
||
|
|
name='Broccoli Soup',
|
||
|
|
link='https://www.bbcgoodfood.com/recipes/broccoli-soup',
|
||
|
|
image_urls=['https://www.bbcgoodfood.com/sites/default/files/styles/recipe/public/recipe/recipe-image/2018/10/broccoli-soup.jpg'],
|
||
|
|
ingredients=[Ingredients.broccoli_chopped_1kg],
|
||
|
|
created_by_id=Persons.jacob.id,
|
||
|
|
)
|
||
|
|
|
||
|
|
from meals import db as meals_db
|
||
|
|
from datetime import datetime
|
||
|
|
|
||
|
|
class Meals:
|
||
|
|
broccoli_soup_for_jacob = meals_db.Meal(
|
||
|
|
id=0,
|
||
|
|
create_date=datetime(2021, 12, 25),
|
||
|
|
created_by=Persons.jacob,
|
||
|
|
meal_date=datetime(2021, 12, 25),
|
||
|
|
chefs=[Persons.jacob],
|
||
|
|
cleanup=[Persons.ryan],
|
||
|
|
consumers=[Persons.ellie, Persons.chris],
|
||
|
|
recipes=[Recipes.broccoli_soup],
|
||
|
|
extra_ingredients=[Ingredients.garlic_bread_1_loaf],
|
||
|
|
)
|