File: schema.bare

package info (click to toggle)
golang-sourcehut-sircmpwn-go-bare 0.0~git20210406.ab86bc2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 268 kB
  • sloc: makefile: 5
file content (44 lines) | stat: -rw-r--r-- 646 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
type PublicKey data<128>
type Time string # ISO 8601

enum Department {
	ACCOUNTING
	ADMINISTRATION
	CUSTOMER_SERVICE
	DEVELOPMENT

	# Reserved for the CEO
	JSMITH = 99
}

type Customer {
	name: string
	email: string
	address: Address
	orders: []{
		orderId: i64
		quantity: i32
	}
	metadata: map[string]data
}

type Employee {
	name: string
	email: string
	address: Address
	department: Department
	hireDate: Time
	publicKey: optional<PublicKey>
	metadata: map[string]data
}

type TerminatedEmployee void

type Person (Customer | Employee | TerminatedEmployee)

type Address {
	address: [4]string
	city: string
	state: string
	country: string
}