From f3619b20e1c5baa342eb7466c67c44d3192bb3eb Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Tue, 13 Apr 2021 00:52:32 -0500 Subject: Initial TypeScript refactoring --- src/models/Lab.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/models/Lab.ts (limited to 'src/models/Lab.ts') diff --git a/src/models/Lab.ts b/src/models/Lab.ts new file mode 100644 index 0000000..a6972ef --- /dev/null +++ b/src/models/Lab.ts @@ -0,0 +1,23 @@ +import EventInfo from '@/models/EventInfo'; + +export default class Lab { + course: number; + + section: number; + + event: EventInfo; + + constructor(course = 0, section = 0, event = new EventInfo()) { + this.course = course; + this.section = section; + this.event = event; + } + + get id() { + return `${this.course}-${this.section}`; + } + + get fullInfo() { + return `${this.id} ${this.event.info}`; + } +} -- cgit v1.2.3