mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Add basic storage for validation events
This commit is contained in:
parent
6675dac63d
commit
d4fe961e34
5 changed files with 123 additions and 0 deletions
9
app/models/validation_event.rb
Normal file
9
app/models/validation_event.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class ValidationEvent < ActiveRecord::Base
|
||||
enum event_type: ValidationEvent::EventType::TYPES, _suffix: true
|
||||
|
||||
belongs_to :validation_eventable, polymorphic: true
|
||||
|
||||
def event_type
|
||||
@event_type ||= ValidationEvent::EventType.new(read_attribute(:event_kind))
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue