Class: VisitEvent

Inherits:
ApplicationRecord show all
Defined in:
app/models/visit_event.rb

Overview

== Schema Information

Table name: visit_events
Database name: primary

id :bigint not null, primary key
name :string
properties :jsonb
time :datetime
user_id :integer
visit_id :bigint

Indexes

index_visit_events_on_visit_id (visit_id) USING hash

Foreign Keys

fk_rails_... (visit_id => visits.id)

Constant Summary

Constants included from Models::Schedulable

Models::Schedulable::SIMPLE_FORM_OPTIONS

Belongs to collapse

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::Schedulable

config

Methods included from Models::AfterCommittable

#after_commit

Methods included from Models::EventPublishable

#publish_event

Instance Method Details

#userParty?

Returns the user this record belongs to.

Returns:

  • (Party, nil)

    the user this record belongs to



27
# File 'app/models/visit_event.rb', line 27

belongs_to :user, class_name: 'Party', inverse_of: :visit_events, optional: true

#visitVisit

Returns the visit this record belongs to.

Returns:

  • (Visit)

    the visit this record belongs to



25
# File 'app/models/visit_event.rb', line 25

belongs_to :visit, inverse_of: :visit_events