-
Notifications
You must be signed in to change notification settings - Fork 2
/
databasesSchema.gql
147 lines (129 loc) · 2.54 KB
/
databasesSchema.gql
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
scalar Role
scalar Date
type User {
email: String
emails: [Email]
password: String
fullname: RealName
displayPicture: String
phone: String
joined: Date
becameCitizen: Date
dateOfBirth: Date
religion: String
ethnicities: [String]
countriesOfCitizenship: [String]
countryOfBirth: String
countryOfResidence: String
gender: String
address: Address
roles: [Role]
sessions: [Session]
applications: [Application]
faceImage: String
}
type RealName {
firstName: String
lastName: String
alias: [String]
}
type Email {
email: String
token: String
verified: Boolean
}
type SignupInput {
email: String
phone: String
firstName: String
lastName: String
password: String
referer: String
}
type Application {
applicationDate: Date
user: User
# Phase 2
dateOfBirth: Date
religion: String
ethnicities: [String]
countriesOfCitizenship: [CountryOfCitizenship]
countryOfBirth: String
countryOfResidence: String
sex: String
# Phase 3
previousGender: String
middleNames: [String]
previousNames: [PreviousName]
residentialAddress: String
cityOfBirth: String
provinceOfBirth: String
proofOfAddress: Photo
postalAddress: String
eyeColor: String
hairColor: String
height: String
weight: String
occupations: [String]
skills: [String]
# Phase 4
countriesOfPermanentResidence: String
identityDocuments: [IdentityDocument]
children: [ApplicantChild]
}
type ApplicantChild {
applyingWithApplicant: Boolean
relationship: String # father, mother, auntie, etc
firstName: String
lastName: String
sex: String
dateOfBirth: Date
cityOfBirth: String
provinceOfBirth: String
countryOfBirth: String
previousNames: [PreviousName]
}
type IdentityDocument {
photoProof: Photo,
firstName: String
lastName: String
identityNumber: String
typeOfDocument: String
countryOfIssue: String
}
type CountryOfCitizenship {
country: String
acquired: Date #required for phase 3 applicants
ended: Date #can be null - denotes whether citizenship has ended
}
type PreviousName {
name: String
reason: String
}
type Address {
full: String
country: String
postalCode: String
street: String
Number: String
Unit: String
province: String
}
type Session {
user: User
token: String
lastUsed: Date
agent: String
}
type Role {
name: String
slug: String
description: String
permissions: [Permission]
inherits: [Role]
}
type Permission {
slug: String
name: String
description: String
}