diff options
Diffstat (limited to 'app/models/error_tracking/error_event.rb')
-rw-r--r-- | app/models/error_tracking/error_event.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/error_tracking/error_event.rb b/app/models/error_tracking/error_event.rb new file mode 100644 index 00000000000..ed14a1bce41 --- /dev/null +++ b/app/models/error_tracking/error_event.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class ErrorTracking::ErrorEvent < ApplicationRecord + belongs_to :error, counter_cache: :events_count + + validates :payload, json_schema: { filename: 'error_tracking_event_payload' } + + validates :error, presence: true + validates :description, presence: true + validates :occurred_at, presence: true +end |