-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent.js
More file actions
61 lines (56 loc) · 1.48 KB
/
Copy pathStudent.js
File metadata and controls
61 lines (56 loc) · 1.48 KB
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
/**
* @typedef {'BSCpE' | 'BSIT'} ICSPrograms
* @typedef {'BSEd-SCI' | 'BEEd-GEN' | 'BEEd-ECED' | 'BTLEd-ICT' | 'TCP'} ITEPrograms
* @typedef {'BSBA-HRM' | 'BSE'} IBEPrograms
*/
/**
* @typedef {{
* name: {
* first: string,
* middle: string,
* last: string
* },
* role: 'student' | 'unverified-student',
* email: string,
* id: string,
* profilePicture?: string,
* status?: 'active' | 'restricted' | 'dismissed',
* organizations?: import('./Organization').OrganizationProps[],
* ongoingCases?: number
* }} BaseStudentProps
*/
/** @typedef {BaseStudentProps & { institute: 'ics', program: ICSPrograms, year: number }} ICSStudent */
/** @typedef {BaseStudentProps & { institute: 'ite', program: ITEPrograms, year: number }} ITEStudent */
/** @typedef {BaseStudentProps & { institute: 'ibe', program: IBEPrograms, year: number }} IBEStudent */
/** @typedef {ICSStudent | ITEStudent | IBEStudent} StudentProps */
class Student {
/**
* @param {StudentProps} props
*/
constructor({
name,
role,
email,
id,
institute,
program,
year,
profilePicture = '/Placeholder Image.svg',
status = 'active',
organizations = [],
ongoingCases = 0
}) {
this.name = name;
this.role = role;
this.email = email;
this.id = id;
this.institute = institute;
this.program = program;
this.year = year;
this.profilePicture = profilePicture;
this.status = status;
this.organizations = organizations;
this.ongoingCases = ongoingCases;
};
};
export default Student;