Class: Mdm::Note

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/mdm/note.rb

Overview

Data gathered or derived from the #host or #service such as its fingerprint.

Instance Attribute Summary collapse

Instance Attribute Details

#created_atDateTime

When the note was created.

Returns:

  • (DateTime)


# File 'app/models/mdm/note.rb', line 48

#criticalBoolean

Whether this note is critical or not.

Returns:

  • (Boolean)


# File 'app/models/mdm/note.rb', line 53

#dataHash

A Hash of data about the #host or #service.

Returns:

  • (Hash)


# File 'app/models/mdm/note.rb', line 58

#hostMdm::Host?

The host to which this note is attached.

Returns:



13
14
15
16
# File 'app/models/mdm/note.rb', line 13

belongs_to :host,
class_name: 'Mdm::Host',
counter_cache: :note_count,
inverse_of: :notes

#ntypeString

The type of note. Usually a dot-separateed name like 'host.updated.'.

Returns:

  • (String)


# File 'app/models/mdm/note.rb', line 63

#seenBoolean

Whether any user has seen this note.

Returns:

  • (Boolean)


# File 'app/models/mdm/note.rb', line 68

#serviceMdm::Service?

The service to which this note is attached.

Returns:



23
24
25
# File 'app/models/mdm/note.rb', line 23

belongs_to :service,
class_name: 'Mdm::Service',
inverse_of: :notes

#updated_atDateTime

The last time the note was updated.

Returns:

  • (DateTime)


# File 'app/models/mdm/note.rb', line 73

#vulnMdm::Vuln?

The vuln to which this note is attached.

Returns:

  • (Mdm::Vuln)

    if note is attached to an Vuln.

  • (nil)

    if not is attached to an Host.



32
33
34
# File 'app/models/mdm/note.rb', line 32

belongs_to :vuln,
class_name: 'Mdm::Vuln',
inverse_of: :notes

#workspaceMdm::Workspace

The workspace in which the #host or #service exists.

Returns:



40
41
42
# File 'app/models/mdm/note.rb', line 40

belongs_to :workspace,
class_name: 'Mdm::Workspace',
inverse_of: :notes