-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1cda09e
commit 153ce0c
Showing
21 changed files
with
337 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import 'package:cse_archive/app/constants/strings.dart'; | ||
import 'package:cse_archive/app/models/base_enum.dart'; | ||
|
||
class CourseTypeEnumModel extends BaseEnumModel { | ||
const CourseTypeEnumModel._({ | ||
required int? super.value, | ||
required super.representation, | ||
required super.queryParameterValue, | ||
}); | ||
|
||
int? toJson() => value; | ||
|
||
static CourseTypeEnumModel fromJson(int value) { | ||
return values.firstWhere( | ||
(courseTypeModel) => courseTypeModel.value == value, | ||
); | ||
} | ||
|
||
static const none = CourseTypeEnumModel._( | ||
value: null, | ||
representation: ArchiveStrings.none, | ||
queryParameterValue: '', | ||
); | ||
|
||
static const specialized = CourseTypeEnumModel._( | ||
value: 1, | ||
representation: ArchiveStrings.courseTypeSpecialized, | ||
queryParameterValue: 'specialized', | ||
); | ||
|
||
static const optional = CourseTypeEnumModel._( | ||
value: 2, | ||
representation: ArchiveStrings.courseTypeOptional, | ||
queryParameterValue: 'optional', | ||
); | ||
|
||
static const basic = CourseTypeEnumModel._( | ||
value: 3, | ||
representation: ArchiveStrings.courseTypeBasic, | ||
queryParameterValue: 'basic', | ||
); | ||
|
||
static const general = CourseTypeEnumModel._( | ||
value: 4, | ||
representation: ArchiveStrings.courseTypeGeneral, | ||
queryParameterValue: 'general', | ||
); | ||
|
||
static const values = [none, specialized, optional, basic, general]; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import 'package:cse_archive/app/constants/strings.dart'; | ||
import 'package:cse_archive/app/models/base_enum.dart'; | ||
|
||
class CourseUnitsEnumModel extends BaseEnumModel { | ||
const CourseUnitsEnumModel._({ | ||
required int? super.value, | ||
required super.representation, | ||
required super.queryParameterValue, | ||
}); | ||
|
||
int? toJson() => value; | ||
|
||
static CourseUnitsEnumModel fromJson(int value) { | ||
return values.firstWhere( | ||
(courseUnitsModel) => courseUnitsModel.value == value, | ||
); | ||
} | ||
|
||
static const none = CourseUnitsEnumModel._( | ||
value: null, | ||
representation: ArchiveStrings.none, | ||
queryParameterValue: '', | ||
); | ||
|
||
static const one = CourseUnitsEnumModel._( | ||
value: 1, | ||
representation: ArchiveStrings.courseUnits1, | ||
queryParameterValue: '1', | ||
); | ||
|
||
static const two = CourseUnitsEnumModel._( | ||
value: 2, | ||
representation: ArchiveStrings.courseUnits2, | ||
queryParameterValue: '2', | ||
); | ||
|
||
static const three = CourseUnitsEnumModel._( | ||
value: 3, | ||
representation: ArchiveStrings.courseUnits3, | ||
queryParameterValue: '3', | ||
); | ||
|
||
static const values = [none, one, two, three]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.