Add association for Comments and RequestForComments

For the submission and comments, I mainly decided to use a `has_one` association. Based on the database schema, multiple request for comments could be allowed (i.e., for each file or submission), but this won't happen practically (since we always create new submissions and files). Hence, the `has_one` association is representing our relationship better.
This commit is contained in:
Sebastian Serth
2023-09-22 12:55:20 +02:00
committed by Sebastian Serth
parent b2f409fe63
commit 0e387ffda2
10 changed files with 12 additions and 13 deletions

View File

@ -32,6 +32,7 @@ module CodeOcean
has_many :files, class_name: 'CodeOcean::File'
has_many :testruns
has_many :comments
has_one :request_for_comment
has_many :events_synchronized_editor, class_name: 'Event::SynchronizedEditor'
alias descendants files