Sha256: 78a884d158c977720dbeb5f98190f4184b274f46366d9483f0c2fd2073af3c25

Contents?: true

Size: 600 Bytes

Versions: 2

Compression:

Stored size: 600 Bytes

Contents

class Mdm::Event < ActiveRecord::Base
    
  #
  # Associations
  #

  belongs_to :host,
             class_name: 'Mdm::Host',
             inverse_of: :events

  belongs_to :workspace,
             class_name: 'Mdm::Workspace',
             inverse_of: :events
  
  #
  # Scopes
  #

  scope :flagged, -> { where(:critical => true, :seen => false) }
  scope :module_run, -> { where(:name => 'module_run') }

  #
  # Serializations
  #

  serialize :info, MetasploitDataModels::Base64Serializer.new

  #
  # Validations
  #

  validates :name, :presence => true

  Metasploit::Concern.run(self)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
metasploit_data_models-1.0.0.pre.rails.pre.4.0b app/models/mdm/event.rb
metasploit_data_models-1.0.0.pre.rails.pre.4.0a app/models/mdm/event.rb