Hey guys !
The app: the user choses recipes (he can add to cart) and we generate for him a grocery list (from the ingredient needed for each recipe he choosed).
I was thinking doing it like this :
Thing : User, Catalog dish, Dish ordered, Catalog ingredient, Ingredient Dish, Catalog ingredient ordered, Supermarket ingredient.
John = User
2x scrambled eggs = Dish ordered
scrambled eggs = catalog dish
4x eggs = Ingredient dish
1 eggs = catalog ingredient
8 eggs = Catalog ingredient ordered
6 eggs = supermarket ingredient
John (user) ordered 2x scrambled eggs (creating a dish ordered from a catalog dish), one scrambled eggs is composed of 4x 1 eggs (creating Ingredient dish from a catalog ingredient) so in total 8 eggs (catalog ingredient ordered) , then depending of the supermarket that John choosed that only sell 6 eggs (supermarket ingredient) we wil generate for him 2 x 6 eggs.
QUESTION : I was wondering if there is anyother way to structure the data differently to make it easier ?? because that’s a lot of things .
PS: sorry for my english I’m french …