-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.ts
111 lines (94 loc) · 2.03 KB
/
types.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
export enum Day {
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
}
export type DayKeys = keyof typeof Day;
export enum LessonType {
LAB,
LEC,
TUT,
RMBKG,
}
export interface IModuleExamTimetable {
moduleId: string;
roomIds: string[];
date: Date;
info: string;
}
export interface IStudentExamTimetable {
studentId: string;
modules: IModuleExamTimetable[];
}
export interface ITimetableLesson {
fromTime: string;
toTime: string;
lessonType: LessonType;
weekIds: string[];
}
export interface IStudentTimetableLesson extends ITimetableLesson {
moduleId: string;
roomIds: string[];
group: string | null;
}
export interface ICourseTimetableLesson extends ITimetableLesson {
moduleId: string;
roomIds: string[];
group: string | null;
instructor: string | null;
}
export interface IModuleTimetableLesson extends ITimetableLesson {
roomIds: string[];
group: string | null;
instructor: string | null;
}
export interface IRoomTimetableLesson extends ITimetableLesson {
moduleIds: string[] | null;
groups: string[] | null;
size: number;
instructor: string | null;
}
export interface ITimetableLessons<T extends ITimetableLesson> {
[Day.Monday]: T[];
[Day.Tuesday]: T[];
[Day.Wednesday]: T[];
[Day.Thursday]: T[];
[Day.Friday]: T[];
[Day.Saturday]: T[];
}
export interface IStudentTimetable {
studentId: string;
lessons: ITimetableLessons<IStudentTimetableLesson>;
}
export interface ICourseTimetable {
courseId: string;
year: number;
lessons: ITimetableLessons<ICourseTimetableLesson>;
}
export interface IModuleTimetable {
moduleId: string;
lessons: ITimetableLessons<IModuleTimetableLesson>;
}
export interface IRoomTimetable {
roomId: string;
lessons: ITimetableLessons<IRoomTimetableLesson>;
}
export interface IModuleDetails {
id: string;
name: string;
}
export interface IRoomDetails {
id: string;
buildingName: string;
building: string;
floor: string;
room: string;
}
export interface IWeekDate {
id: string;
name: string;
startDate: Date;
}