Skip to content

Instantly share code, notes, and snippets.

@jakeisnt
Created January 20, 2020 02:56
Show Gist options
  • Save jakeisnt/c056979c8ca605e361589df115613a2d to your computer and use it in GitHub Desktop.
Save jakeisnt/c056979c8ca605e361589df115613a2d to your computer and use it in GitHub Desktop.
graduate-new
/**
* A Schedule
* @param years a list of the years of this object
* @param yearMap an object containing the year objects of this schedule
* @param id the id number of this schedule
*/
export interface Schedule {
years: number[];
yearMap: {
[key: number]: ScheduleYear;
};
id: string;
}
/**
* A ScheduleYear, representing a year of a schedule
* @param year the year
* @param fall the fall term
* @param spring the spring term
* @param summer1 the summer 1 term
* @param summer2 the summer 2 term
* @param isSummerFull true if the summer1 should hold the classes for summer full.
*/
export interface ScheduleYear {
year: number;
fall: ScheduleTerm;
spring: ScheduleTerm;
summer1: ScheduleTerm;
summer2: ScheduleTerm;
isSummerFull: boolean;
}
/**
* A ScheduleTerm, representing a term of a scheudle
* @param season the season of this term
* @param year the year of this term
* @param termId the termId of this term
* @param id the unique id of this term
* @param status the status of this term, on coop, classes, or inactive.
* @param classes a list of the classes of this term.
*/
export interface ScheduleTerm {
season: Season | SeasonEnum;
year: number;
termId: number;
id: number;
status: Status | StatusEnum;
classes: ScheduleCourse[];
}
/**
* A course of a schedule
* @param classId the classId of this course
* @param subject the subject of this course
* @param prereqs the prerequisites for this course
* @param coreqs the corequisites for this course
* @param numCreditsMin the minimum number of credits this course gives
* @param numCreditsMax the maximum number of credits this course gives
*/
export interface ScheduleCourse {
name: string;
classId: string;
subject: string;
prereqs?: INEUAndPrereq | INEUOrPrereq;
coreqs?: INEUAndPrereq | INEUOrPrereq;
numCreditsMin: number;
numCreditsMax: number;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment