-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnw-firestore-schema.ts
240 lines (214 loc) · 6.13 KB
/
nw-firestore-schema.ts
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
type Tiers = inKind | bronze | silver | gold | platinum
interface Sponsor {
name: "apple";
url: "apple.com";
imgURL: "link-to-image";
imgName: "name of image in storage";
lastmod: Date().toLocaleString();
lastmodBy: "username";
tier: Tiers = "platinum";
}
interface Event {
name: "event name";
description: "this is an event";
imgURL?: "link-to-event-image";
order: "ordering of the event";
}
interface WebsiteData {
[key]: any;
startTime: string;
endTime: string;
//eg
Intro: {
title: "Intro",
content: "Come make things and break things, and then make them cooler. You'll never be short on inspiration when you're surrounded by 650 of the brightest minds in the Pacific Northwest. All you need to bring is an open mind and an insatiable desire to learn; we'll take care of the rest. After all, we're western Canada's largest hackathon - we make the west coast the best coast",
editor: "Derek Chen",
header: "This is nwHacks 2019",
time: "July 14, 2020 at 10:30:03 AM UTC-7",
imgURL: "link"
},
otherSection: {
title: "Other Text Section(s)",
content: "Vancouver is breathtaking and so are you",
editor: "Ian Mah",
header: "Why nwHacks?",
time: "July 8, 2020 at 12:00:00PM UTC-7",
imgURL: "link"
}
}
interface Quicklink {
label: string;
href: string;
category: string;
common: boolean;
}
interface Prize {
place: number | boolean; // number if a main prize, false if sponsor prize
sponsor: string;
title: string;
content: string[];
}
interface DayOfEvent {
name: "name";
type: "notices" | "main" | "workshops" | "minievents";
delayed: boolean;
startTime: "July 8, 2020 at 12:00:00PM UTC-7";
endTime: "July 8, 2020 at 2:00:00PM UTC-7";
description: string;
}
type Team = "Pres" | "Dev" | "Design" | "Marketing" | "Content Writing" | "cmd-f" | "Hackcamp" | "nwHacks" | "Engagement" | "Sponsorship"
type Section = "Github" | "Resume" | "Portfolio" | "Long Answer 1" | "Long Answer 2"
interface ApplicationRange {
start: number;
end: number;
}
interface SectionsAssigned {
section: Section;
applicationRange: ApplicationRange[];
}
interface HackathonEvaluations {
evaluationsInfo: {
sectionsAssigned: SectionsAssigned[];
assigned: number;
completed: number;
}
}
interface Admin {
team: Team;
hackathonEvaluations: HackathonEvaluations[];
}
type EducationLevels = highSchool | undergraduate | graduate | professional | doctorate
type HackerRoles = developer | designer | hardware | product | data | business | other
type Engagements = facebook | instagram | twitter | medium | linkedin | event
type ApplicationStatus = applied | accepted | rejected | waitlisted | inProgress
interface Application {
_id: string; // same as user ID
numericalId: number;
projectsAssigned: string[] // project ids
basicInfo: {
email: string;
firstName: string;
lastName: string;
gender: string;
ethnicity: string[];
isOfLegalAge: boolean;
phoneNumber: string;
school: string;
major: string;
educationLevel: EducationLevels = "bachelors";
graduation: number;
hackathonsAttended: number;
contributionRole: HackerRoles;
location: string;
},
skills: {
resume: string; // link to resume (pdf, docx, etc.) stored on firebase
portfolio: string;
linkedin: string;
github: string;
longAnswers: {
["question number"]: string;
}; // hackers will have either one or two questions depending on their role
},
score: {
githubOrWebsiteScore: number;
resumeScore: number;
longAnswerOneScore: number;
longAnswerTwoScore: number;
tags: string[];
},
comments: Comment[]; // where Comment = {user: "", text: ""}
questionnaire: {
engagementSource: Engagements;
eventsAttended: string[];
otherEngagementSource: string;
},
submission: {
lastUpdated: timestamp;
submitted: boolean;
},
status: {
applicationStatus: ApplicationStatus = "applied";
responded: boolean | false; // using responded and attending to check if they un-RSVPed or if they didn't RSVP at all (no RSVP)
attending: boolean | false; // false for no-rsvp by default
}
team: reference;
}
// Stats are incomplete, I'd like to collect more data but for now this is all I could think of
interface Stats {
EventStats: {
["event name"]: { "relevant-stats" };
};
}
interface Hackathon {
id: "lhd"; //(example)
Applicants: Application[];
Hackers: Hacker[];
WebsiteData: WebsiteData;
Sponsors: Sponsor[];
Events: Event[];
DayOf: DayOfEvent[];
Announcements: Announcement[];
Quicklinks: Quicklink[];
Prizes: Prize[];
}
interface Announcement {
title: string;
content: string;
timestamp: number; // ie Date.now()
priority: string;
editor: string;
}
interface FAQ {
question: string;
answer: string;
category: string;
hackathonIDs: string[]; // Must be one of the hackathon IDs
lastModified: string;
lastModifiedBy: string;
}
interface CMS {
offUntilDate: timestamp | boolean;
}
interface InternalWebsites {
CMS: CMS;
Livesite: Livesite;
}
interface Root {
Hackathons: Hackathon[];
FAQ: FAQ[];
InternalWebsites: InternalWebsites;
}
interface Livesite {
imgURL: string; // url to logo image
activeHackathon: string; // hackathon ID
judgingOpen: boolean; // particpants can judge other projects
judgingReleased: boolean; // participants can see their judging results
submissionsOpen: boolean; // participants can submit projects
applicationsOpen: boolean; // hackers can start applying
hackathonStart: string // ISO Date string
hackathonEnd: string // ISO Date string
hackingStart: string // ISO Date string
hackingEnd: string // ISO Date string
}
interface Grade {
tech: number
design: number
functionality: number
creativity: number
pitch: number
notes: string
submittedBy: string // applicant key / user uid
}
interface Project {
grades: map // grade objects
acknowledged: boolean // devpost checkbox for "Has added all teammates to devpost"
countAssigned: number
sponsorPrizes: string[]
teamMembers: string[]
teamMembersEmails: string[]
title: string
description: string
youtubeUrl: string
devpostUrl: string
}