Created
June 25, 2023 07:49
-
-
Save ornicar/7bd3dc136277bffc5743465118ef5ff1 to your computer and use it in GitHub Desktop.
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
type Email = String | |
case class User(username: String, givenName: String, familyName: String, email: Email) | |
sealed abstract class Role(user: User, course: Course) | |
case class Student(user: User) | |
case class StudentInCourse(user: User, course: Course) extends Role(user, course) | |
case class Instructor(user: User, course: Course) extends Role(user, course) | |
case class Course( | |
name: String, | |
directory: String, | |
instructors: List[Instructor], | |
students: List[Student] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment