16 lines
336 B
Crystal
16 lines
336 B
Crystal
module Backend::Db
|
|
class Teacher
|
|
include Clear::Model
|
|
self.table = :teachers
|
|
|
|
primary_key type: :serial
|
|
|
|
belongs_to user : User
|
|
|
|
column max_students : Int32
|
|
|
|
has_many teacher_votes : TeacherVote, foreign_key: :teacher_id
|
|
has_many student_assignments : StudentAssignment, foreign_key: :teacher_id
|
|
end
|
|
end
|