Created
September 21, 2011 01:13
-
-
Save mxswd/1230922 to your computer and use it in GitHub Desktop.
Class Diagram / ERD Graphviz example.
Compile with `dot -Tpdf diagram.gv > diagram.pdf`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph models_diagram { | |
graph[overlap=false, splines=true] | |
"Venue" [shape=record, label="{\ | |
Venue|name :string\l\ | |
}"] | |
"User" [shape=record, label="{User|\ | |
email :string\l\ | |
password :string\l\ | |
}"] | |
"Order" [shape=record, label="{Order|\ | |
name :string\l\ | |
}"] | |
{ rank=same; "User" "Venue" } | |
"User" -> "Order" [arrowtail=odot, arrowhead=crow, dir=both, label="request"] | |
"User" -> "Venue" [arrowtail=odot, arrowhead=crow, dir=both, label=agent] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For anybody finding this and wondering why it doesn't compile it is because of line 16.
Line 19 says
User -> Venue
so they can impossibly be the same rank.