Files
VeracrossAnalyzerDemo/src/logic/course-info.ts
T
2020-04-12 15:04:31 -04:00

36 lines
651 B
TypeScript

export default class CourseInfo
{
id_ci: number
year: number
name: string
teacher: string
level: string
courseIds: string
courseCount: number
/**
* Construct with a json object
*
* @param json
*/
constructor(json: any)
{
this.id_ci = json.id_ci
this.year = json.year
this.name = json.name.trim()
this.teacher = json.teacher
this.level = json.level
this.courseIds = json.courseIds
this.courseCount = this.courseIds.split('|').length;
}
}
export interface UniqueCourse
{
name: string
courses: CourseInfo[]
}