-
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
a4c5cb0
commit 78de7a4
Showing
21 changed files
with
516 additions
and
127 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import '../subject_code.dart'; | ||
|
||
class SubjectFee { | ||
SubjectCode id = SubjectCode(); | ||
String name = ''; | ||
int credit = 0; | ||
bool isHighQuality = false; | ||
double price = 0; | ||
bool isDebt = false; | ||
bool isReStudy = false; | ||
String? confirmedPaymentAt; | ||
} |
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,14 @@ | ||
import '../subject_code.dart'; | ||
import 'subject_schedule_exam.dart'; | ||
import 'subject_schedule_study.dart'; | ||
|
||
class SubjectSchedule { | ||
SubjectCode id = SubjectCode(); | ||
String name = ''; | ||
int credit = 0; | ||
bool isHighQuality = false; | ||
String lecturerName = ''; | ||
SubjectScheduleStudyList subjectStudy = SubjectScheduleStudyList(); | ||
SubjectScheduleExam subjectExam = SubjectScheduleExam(); | ||
String pointFormula = ''; | ||
} |
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,6 @@ | ||
class SubjectScheduleExam { | ||
int date = 0; | ||
String room = ''; | ||
bool isGlobal = false; | ||
String group = ''; | ||
} |
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,13 @@ | ||
import '../range_class.dart'; | ||
|
||
class SubjectScheduleStudy { | ||
// 0: Sunday, 1: Monday -> 6: Saturday | ||
int dayOfWeek = 0; | ||
RangeInt lesson = RangeInt(start: 0, end: 0); | ||
String room = ''; | ||
} | ||
|
||
class SubjectScheduleStudyList { | ||
List<SubjectScheduleStudy> subjectStudyList = []; | ||
List<RangeInt> weekList = []; | ||
} |
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,74 @@ | ||
class CustomClock { | ||
final int hour, minute; | ||
|
||
CustomClock({ | ||
required this.hour, | ||
required this.minute, | ||
}); | ||
|
||
CustomClock.current() | ||
: hour = DateTime.now().hour, | ||
minute = DateTime.now().minute; | ||
|
||
@override | ||
bool operator ==(other) { | ||
return other is CustomClock && hour == other.hour && minute == other.minute; | ||
} | ||
|
||
bool operator >(other) { | ||
return other is CustomClock && | ||
(hour > other.hour || (hour == other.hour && minute > other.minute)); | ||
} | ||
|
||
bool operator <(other) { | ||
return other is CustomClock && | ||
(hour < other.hour || (hour == other.hour && minute < other.minute)); | ||
} | ||
|
||
@override | ||
int get hashCode => hour * 60 + minute; | ||
|
||
@override | ||
String toString() { | ||
return "${hour.toString().padLeft(2, '0')}:${minute.toString().padLeft(2, '0')}"; | ||
} | ||
|
||
bool isInRange(CustomClock valLeft, CustomClock valRight) { | ||
return (valLeft < valRight) | ||
? (valLeft < this && this < valRight) | ||
: (valLeft > valRight) | ||
? ((valRight < this && valLeft < this) || | ||
(valRight > this && valLeft > this)) | ||
: (valLeft == this && this == valRight); | ||
} | ||
|
||
int toDUTLesson() { | ||
var data = [ | ||
CustomClock(hour: 7, minute: 0), | ||
CustomClock(hour: 8, minute: 0), | ||
CustomClock(hour: 9, minute: 0), | ||
CustomClock(hour: 10, minute: 0), | ||
CustomClock(hour: 11, minute: 0), | ||
CustomClock(hour: 12, minute: 0), | ||
CustomClock(hour: 12, minute: 30), | ||
CustomClock(hour: 13, minute: 30), | ||
CustomClock(hour: 14, minute: 30), | ||
CustomClock(hour: 15, minute: 30), | ||
CustomClock(hour: 16, minute: 30), | ||
CustomClock(hour: 17, minute: 30), | ||
CustomClock(hour: 18, minute: 15), | ||
CustomClock(hour: 19, minute: 10), | ||
CustomClock(hour: 19, minute: 55), | ||
CustomClock(hour: 20, minute: 30), | ||
]; | ||
var data2 = [-2, 1, 2, 3, 4, 5, -1, 6, 7, 8, 9, 10, 11, 12, 13, 14]; | ||
|
||
for (var item in data) { | ||
if (this < item) { | ||
return data2[data.indexOf(item)]; | ||
} | ||
} | ||
|
||
return 0; | ||
} | ||
} |
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,16 @@ | ||
class DutSchoolYear { | ||
int week; | ||
String schoolYear; | ||
int schoolYearVal; | ||
|
||
DutSchoolYear({ | ||
required this.schoolYear, | ||
required this.schoolYearVal, | ||
required this.week, | ||
}); | ||
|
||
@override | ||
String toString() { | ||
return "School year: $schoolYear\nSchool year value: $schoolYearVal\nWeek $week"; | ||
} | ||
} |
Oops, something went wrong.