-
Notifications
You must be signed in to change notification settings - Fork 2
/
models.dot
35 lines (35 loc) · 2.95 KB
/
models.dot
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
digraph models_diagram {
graph[overlap=false, splines=true]
"Category" [shape=Mrecord, label="{Category|name :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Comment" [shape=Mrecord, label="{Comment|message :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Cookbook" [shape=Mrecord, label="{Cookbook|name :string\ldescription :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Friendship" [shape=Mrecord, label="{Friendship|created_at :datetime\lupdated_at :datetime\l}"]
"Identity" [shape=Mrecord, label="{Identity|name :string\lemail :string\lpassword_digest :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Ingredient" [shape=Mrecord, label="{Ingredient|quantity :integer\lcreated_at :datetime\lupdated_at :datetime\lname :string\l}"]
"Like" [shape=Mrecord, label="{Like|created_at :datetime\lupdated_at :datetime\l}"]
"Post" [shape=Mrecord, label="{Post|postable_type :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Recipe" [shape=Mrecord, label="{Recipe|name :string\linstructions :string\lpreperation_time :integer\lcourse :string\lcreated_at :datetime\lupdated_at :datetime\ldescription :string\l}"]
"RecipeCookbook" [shape=Mrecord, label="{RecipeCookbook|created_at :datetime\lupdated_at :datetime\l}"]
"RecipePicture" [shape=Mrecord, label="{RecipePicture|title :string\lcreated_at :datetime\lupdated_at :datetime\limage :string\l}"]
"Tag" [shape=Mrecord, label="{Tag|name :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Tagging" [shape=Mrecord, label="{Tagging|created_at :datetime\lupdated_at :datetime\l}"]
"Unit" [shape=Mrecord, label="{Unit|name :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"User" [shape=Mrecord, label="{User|provider :string\luid :string\lname :string\lcreated_at :datetime\lupdated_at :datetime\lpicture_url :string\l}"]
"Category" -> "Ingredient" [arrowtail=odot, arrowhead=crow, dir=both]
"Cookbook" -> "Post" [arrowtail=odot, arrowhead=dot, dir=both]
"Cookbook" -> "Recipe" [arrowtail=crow, arrowhead=crow, dir=both]
"Ingredient" -> "Category" [arrowtail=odot, arrowhead=dot, dir=both]
"Ingredient" -> "Unit" [arrowtail=odot, arrowhead=dot, dir=both]
"Post" -> "Recipe" [arrowtail=odot, arrowhead=crow, dir=both]
"Recipe" -> "Post" [arrowtail=odot, arrowhead=dot, dir=both]
"Recipe" -> "Ingredient" [arrowtail=odot, arrowhead=crow, dir=both]
"Recipe" -> "Item" [arrowtail=crow, arrowhead=crow, dir=both]
"Recipe" -> "Comment" [arrowtail=odot, arrowhead=crow, dir=both]
"Tagging" -> "Tag" [arrowtail=odot, arrowhead=crow, dir=both]
"Unit" -> "Ingredient" [arrowtail=odot, arrowhead=crow, dir=both]
"User" -> "Friendship" [arrowtail=odot, arrowhead=crow, dir=both]
"User" -> "User" [label="friends", arrowtail=crow, arrowhead=crow, dir=both]
"User" -> "Friendship" [label="inverse_friendships", arrowtail=odot, arrowhead=crow, dir=both]
"User" -> "User" [label="inverse_friends", arrowtail=crow, arrowhead=crow, dir=both]
"User" -> "Comment" [arrowtail=odot, arrowhead=crow, dir=both]
}