about summary refs log tree commit diff
path: root/app/models/report.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/report.rb')
-rw-r--r--app/models/report.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/report.rb b/app/models/report.rb
index dd123fc15..f5b37cb6d 100644
--- a/app/models/report.rb
+++ b/app/models/report.rb
@@ -12,12 +12,16 @@
 #  account_id                 :integer          not null
 #  action_taken_by_account_id :integer
 #  target_account_id          :integer          not null
+#  assigned_account_id        :integer
 #
 
 class Report < ApplicationRecord
   belongs_to :account
   belongs_to :target_account, class_name: 'Account'
   belongs_to :action_taken_by_account, class_name: 'Account', optional: true
+  belongs_to :assigned_account, class_name: 'Account', optional: true
+
+  has_many :notes, class_name: 'ReportNote', foreign_key: :report_id, inverse_of: :report, dependent: :destroy
 
   scope :unresolved, -> { where(action_taken: false) }
   scope :resolved,   -> { where(action_taken: true) }