2022-11-21 18:48:53 +00:00
|
|
|
module Backend::Db
|
|
|
|
class Vote
|
|
|
|
include Clear::Model
|
|
|
|
self.table = :votes
|
2022-04-05 18:26:22 +00:00
|
|
|
|
2022-11-21 18:48:53 +00:00
|
|
|
primary_key type: :serial
|
2022-01-08 12:29:22 +00:00
|
|
|
|
2022-11-21 18:48:53 +00:00
|
|
|
belongs_to student : Student
|
2022-01-08 12:29:22 +00:00
|
|
|
|
2022-11-21 18:48:53 +00:00
|
|
|
has_many teacher_votes : TeacherVote, foreign_key: :vote_id
|
2022-01-08 12:29:22 +00:00
|
|
|
end
|
|
|
|
end
|