Debian Codegraph @

tests/languages/mermaid/full_erdiagram.test

raw
1 erDiagram
2 CUSTOMER ||--o{ ORDER : places
3 ORDER ||--|{ LINE-ITEM : contains
4 CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
5
6 erDiagram
7 CUSTOMER ||--o{ ORDER : places
8 CUSTOMER {
9 string name
10 string custNumber
11 string sector
12 }
13 ORDER ||--|{ LINE-ITEM : contains
14 ORDER {
15 int orderNumber
16 string deliveryAddress
17 }
18 LINE-ITEM {
19 string productCode
20 int quantity
21 float pricePerUnit
22 }
23
24 PROPERTY ||--|{ ROOM : contains
25
26 CAR ||--o{ NAMED-DRIVER : allows
27 PERSON ||--o{ NAMED-DRIVER : is
28
29 erDiagram
30 CAR ||--o{ NAMED-DRIVER : allows
31 CAR {
32 string registrationNumber
33 string make
34 string model
35 }
36 PERSON ||--o{ NAMED-DRIVER : is
37 PERSON {
38 string firstName
39 string lastName
40 int age
41 }
42
43 erDiagram
44 CAR ||--o{ NAMED-DRIVER : allows
45 CAR {
46 string registrationNumber
47 string make
48 string model
49 }
50 PERSON ||--o{ NAMED-DRIVER : is
51 PERSON {
52 string firstName
53 string lastName
54 int age
55 }
56
57 ----------------------------------------------------
58
59 [
60 ["keyword", "erDiagram"],
61
62 "\r\n CUSTOMER ",
63 ["arrow", "||--o{"],
64 " ORDER ",
65 ["operator", ":"],
66 " places\r\n ORDER ",
67 ["arrow", "||--|{"],
68 " LINE-ITEM ",
69 ["operator", ":"],
70 " contains\r\n CUSTOMER ",
71 ["arrow", "}|..|{"],
72 " DELIVERY-ADDRESS ",
73 ["operator", ":"],
74 " uses\r\n\r\n",
75
76 ["keyword", "erDiagram"],
77
78 "\r\n CUSTOMER ",
79 ["arrow", "||--o{"],
80 " ORDER ",
81 ["operator", ":"],
82 " places\r\n CUSTOMER ",
83 ["punctuation", "{"],
84
85 "\r\n string name\r\n string custNumber\r\n string sector\r\n ",
86
87 ["punctuation", "}"],
88
89 "\r\n ORDER ",
90 ["arrow", "||--|{"],
91 " LINE-ITEM ",
92 ["operator", ":"],
93 " contains\r\n ORDER ",
94 ["punctuation", "{"],
95
96 "\r\n int orderNumber\r\n string deliveryAddress\r\n ",
97
98 ["punctuation", "}"],
99
100 "\r\n LINE-ITEM ",
101 ["punctuation", "{"],
102
103 "\r\n string productCode\r\n int quantity\r\n float pricePerUnit\r\n ",
104
105 ["punctuation", "}"],
106
107 "\r\n\r\nPROPERTY ",
108 ["arrow", "||--|{"],
109 " ROOM ",
110 ["operator", ":"],
111 " contains\r\n\r\nCAR ",
112 ["arrow", "||--o{"],
113 " NAMED-DRIVER ",
114 ["operator", ":"],
115 " allows\r\n PERSON ",
116 ["arrow", "||--o{"],
117 " NAMED-DRIVER ",
118 ["operator", ":"],
119 " is\r\n\r\n",
120
121 ["keyword", "erDiagram"],
122
123 "\r\n CAR ",
124 ["arrow", "||--o{"],
125 " NAMED-DRIVER ",
126 ["operator", ":"],
127 " allows\r\n CAR ",
128 ["punctuation", "{"],
129
130 "\r\n string registrationNumber\r\n string make\r\n string model\r\n ",
131
132 ["punctuation", "}"],
133
134 "\r\n PERSON ",
135 ["arrow", "||--o{"],
136 " NAMED-DRIVER ",
137 ["operator", ":"],
138 " is\r\n PERSON ",
139 ["punctuation", "{"],
140
141 "\r\n string firstName\r\n string lastName\r\n int age\r\n ",
142
143 ["punctuation", "}"],
144
145 ["keyword", "erDiagram"],
146
147 "\r\n CAR ",
148 ["arrow", "||--o{"],
149 " NAMED-DRIVER ",
150 ["operator", ":"],
151 " allows\r\n CAR ",
152 ["punctuation", "{"],
153
154 "\r\n string registrationNumber\r\n string make\r\n string model\r\n ",
155
156 ["punctuation", "}"],
157
158 "\r\n PERSON ",
159 ["arrow", "||--o{"],
160 " NAMED-DRIVER ",
161 ["operator", ":"],
162 " is\r\n PERSON ",
163 ["punctuation", "{"],
164
165 "\r\n string firstName\r\n string lastName\r\n int age\r\n ",
166
167 ["punctuation", "}"]
168 ]