diff options
Diffstat (limited to 'app/models/incident_management/timeline_event.rb')
-rw-r--r-- | app/models/incident_management/timeline_event.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/incident_management/timeline_event.rb b/app/models/incident_management/timeline_event.rb index de193308558..735d4e4298c 100644 --- a/app/models/incident_management/timeline_event.rb +++ b/app/models/incident_management/timeline_event.rb @@ -21,6 +21,11 @@ module IncidentManagement validates :note, presence: true, length: { maximum: 10_000 } validates :note_html, length: { maximum: 10_000 } + has_many :timeline_event_tag_links, class_name: 'IncidentManagement::TimelineEventTagLink' + has_many :timeline_event_tags, + class_name: 'IncidentManagement::TimelineEventTag', + through: :timeline_event_tag_links + scope :order_occurred_at_asc_id_asc, -> { reorder(occurred_at: :asc, id: :asc) } end end |