Debian Codegraph @

example/schema.bare

raw
1 type PublicKey data<128>
2 type Time string # ISO 8601
3
4 enum Department {
5 ACCOUNTING
6 ADMINISTRATION
7 CUSTOMER_SERVICE
8 DEVELOPMENT
9
10 # Reserved for the CEO
11 JSMITH = 99
12 }
13
14 type Customer {
15 name: string
16 email: string
17 address: Address
18 orders: []{
19 orderId: i64
20 quantity: i32
21 }
22 metadata: map[string]data
23 }
24
25 type Employee {
26 name: string
27 email: string
28 address: Address
29 department: Department
30 hireDate: Time
31 publicKey: optional<PublicKey>
32 metadata: map[string]data
33 }
34
35 type TerminatedEmployee void
36
37 type Person (Customer | Employee | TerminatedEmployee)
38
39 type Address {
40 address: [4]string
41 city: string
42 state: string
43 country: string
44 }