Skip to content

Commit

Permalink
feat: create PlannerItemType enum
Browse files Browse the repository at this point in the history
  • Loading branch information
yumincho committed Mar 13, 2024
1 parent 6bf160b commit 6084410
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/shapes/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ export const enum ReviewsFocusFrom {
REVIEWS_LIKED = 'LIKED',
REVIEWS_RANKED = 'RANKED',
}

export const enum PlannerItemType {
TAKEN = 'TAKEN',
FUTURE = 'FUTURE',
ARBITRARY = 'ARBITRARY',
}
4 changes: 2 additions & 2 deletions src/shapes/model/planner/ArbitraryPlannerItem.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type Department from '../subject/Department';
import type { SemesterType } from '@/shapes/enum';
import type { SemesterType, PlannerItemType } from '@/shapes/enum';

export default interface ArbitraryPlannerItem {
id: number;
item_type: 'ARBITRARY';
item_type: PlannerItemType.ARBITRARY;
is_excluded: boolean;
year: number;
semester: SemesterType;
Expand Down
4 changes: 2 additions & 2 deletions src/shapes/model/planner/FuturePlannerItem.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type Course from '../subject/Course';
import type { SemesterType } from '@/shapes/enum';
import type { SemesterType, PlannerItemType } from '@/shapes/enum';

export default interface FuturePlannerItem {
id: number;
item_type: 'FUTURE';
item_type: PlannerItemType.FUTURE;
is_excluded: boolean;
year: number;
semester: SemesterType;
Expand Down
3 changes: 2 additions & 1 deletion src/shapes/model/planner/TakenPlannerItem.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type Course from '../subject/Course';
import type Lecture from '../subject/Lecture';
import type { PlannerItemType } from '@/shapes/enum';

export default interface TakenPlannerItem {
id: number;
item_type: 'TAKEN';
item_type: PlannerItemType.TAKEN;
is_excluded: boolean;
lecture: Lecture;
course: Course;
Expand Down

0 comments on commit 6084410

Please sign in to comment.