-
Notifications
You must be signed in to change notification settings - Fork 0
/
ERD.dbml
64 lines (48 loc) · 948 Bytes
/
ERD.dbml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Table users {
id int [pk]
name varchar
email varchar
}
Table recipeLikes {
id int [pk]
user_id int
recipe_id int
}
Table recipes {
id int [pk]
title varchar
body text
categoryId int
userId int
authorFavorite bool
time int
servings int
numOfFavorites int
date date
}
Table ingredients {
id int pk
name varchar
grocerySubcategoryId int
}
Table ingredientsForRecipe {
id int pk
ingredientId int
recipeId int
quantity int
}
Table grocerySubtypes {
id int pk
name varchar
}
Table mealTypes {
id int [pk]
name varchar
}
Ref: "users"."id" < "recipes"."userId"
Ref: "recipes"."id" < "ingredientsForRecipe"."recipeId"
Ref: "mealTypes"."id" < "recipes"."categoryId"
Ref: "ingredients"."id" < "ingredientsForRecipe"."ingredientId"
Ref: "grocerySubtypes"."id" < "ingredients"."grocerySubcategoryId"
Ref: "recipes"."id" < "recipeLikes"."recipe_id"
Ref: "users"."id" < "recipeLikes"."user_id"