1type PublicKey data<128> 2type Time string # ISO 8601 3 4enum Department { 5 ACCOUNTING 6 ADMINISTRATION 7 CUSTOMER_SERVICE 8 DEVELOPMENT 9 10 # Reserved for the CEO 11 JSMITH = 99 12} 13 14type 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 25type 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 35type TerminatedEmployee void 36 37type Person (Customer | Employee | TerminatedEmployee) 38 39type Address { 40 address: [4]string 41 city: string 42 state: string 43 country: string 44} 45