decided to add season support

This commit is contained in:
Sriram Hariharan
2023-03-04 23:00:01 -06:00
parent bc464cd264
commit d9739cdb56
3 changed files with 99 additions and 1 deletions

View File

@@ -27,6 +27,16 @@ export enum Status {
CANCELLED = 'CANCELLED',
}
/**
* Represents a semester, with the year and the season for when a course is offered
*/
export type Semester = {
/** The year that the semester is in */
year: number;
/** The season that the semester is in (Fall, Spring, Summer) */
season: string;
};
/**
* The internal representation of a course for the extension
*/
@@ -59,6 +69,8 @@ export class Course {
flags: string[];
/** How is the class being taught (online, hybrid, in person, etc) */
instructionMode: InstructionMode;
/** Which semester is the course from */
semester: Semester;
constructor(course: Course | Serialized<Course>) {
Object.assign(this, course);