Created
February 4, 2020 23:07
-
-
Save Levi-Lesches/5d98139641ebdd38552ba599666b53d3 to your computer and use it in GitHub Desktop.
RamLife Tutoring data types
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
enum Subject {history, english} // ... | |
enum Reviewer {teacher, student} | |
class User { | |
String first, last; | |
int rating; | |
} | |
class Tutor extends User { | |
int yearGraduated; | |
List<Subject> subjects; | |
Map<Subject, int> reportCard; | |
List<Review> reviews; | |
String phoneNumber; | |
} | |
class Student extends User { | |
int grade; | |
} | |
class Session { | |
List<DateTime> availableMeetings; | |
int price; | |
Tutor tutor; | |
Student student; | |
} | |
class Review { | |
Reviewer reviewer; | |
String teacherName; | |
DateTime date; | |
// make a getter to decide whether a student wrote the review or not | |
} | |
List<Tutor> tutors = []; | |
class TutoringModel { | |
// filters... | |
// print(tutors.where((Tutor tutor) => tutor.subjects.contains(Subject.english))); | |
} | |
void main() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment