Class: Event

Inherits:
ApplicationRecord
  • Object
show all
Includes:
PgSearch
Defined in:
api/app/models/event.rb

Overview

An identity for a combination of Location and one more Session where people will come and participate in a SensoryTest.

Schema

  • [Integer] created_by_id, null: false
  • [DateTime] created_at
  • [DateTime] updated_at
  • [Integer] location_id
  • [Integer] sensory_test_id, null: false
  • [Integer] location_type, default: 1, null: false
  • [Boolean] using_console, default: true
  • [Integer] checkin_type, default: 1, null: false
  • [Boolean] using_recruiting, default: false, null: false
  • [String] language, limit: 5
  • [Integer] required_session_count, default: 1, null: false
  • [Decimal] compensation, precision: 8, scale: 2, default: 0.0, null: false
  • [String] name
  • [DateTime] start_time
  • [DateTime] end_time
  • [Integer] panel_id
  • [DateTime] launched_at
  • [String] static_url
  • [String] timezone
  • [Boolean] using_block_row_verification, default: false, null: false
  • [Boolean] using_participant_code_verification, default: true, null: false
  • [Text] description
  • [String] title, null: false
  • [Integer] online_type, default: 0, null: false
  • [Integer] company_id, null: false
  • [Boolean] obsolete_static_url_global, default: false, null: false
  • [String] external_id
  • [Integer] updated_by_id, null: false

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.accessible_joins_sql(user) ⇒ Object

.accessible_where_sql(user) ⇒ Object

.active_for_event_key(key) ⇒ Object

.active_for_station(station) ⇒ Object

.between_dates(start_date, end_date) ⇒ Object

.scheduled_for_station(station) ⇒ Object

.scheduled_reservations(active_events, station) ⇒ Object

.send_online_emailsObject

Class Methods ##############################

.with_active_participationObject

Class Methods ##############################

.with_latest_participationObject

Instance Method Details

#access_keyObject

#active_for_online_access?Boolean

Returns:

  • (Boolean)

#any_approved_modified_blocks?Boolean

for the dashboard display

Returns:

  • (Boolean)

#are_participant_groups_valid?Boolean

Returns:

  • (Boolean)

#are_participants_valid?Boolean

Returns:

  • (Boolean)

#batch_add_participants(emails_str) ⇒ Object

#can_resolve_participant_group_without_code?Boolean

Returns:

  • (Boolean)

#consumer_display_nameObject

#current_reservationObject

#day_totalObject

#default_languageObject

#display_nameObject

#either_company?(user) ⇒ Boolean

Returns:

  • (Boolean)

#event_ready?Boolean Also known as: is_event_ready

Returns:

  • (Boolean)

#get_participant_group(participant, code = nil) ⇒ Object

#hosting_company?(user) ⇒ Boolean

Returns:

  • (Boolean)

#location_not_nullObject

#location_titleObject

a not null/empty string describing where this event is taking place

#missing_session_countObject

#number_of_daysObject

#offsite_company?(user) ⇒ Boolean

Returns:

  • (Boolean)

#participant_totalObject

#requires_location?Boolean

Returns:

  • (Boolean)

#schedule_valid?Boolean Also known as: is_schedule_valid?

Returns:

  • (Boolean)

#scheduled_session_countObject

#sessions_valid?Boolean

Returns:

  • (Boolean)

#started?Boolean

Returns:

  • (Boolean)

#surveys_urlObject

End Class Methods ##############################

#using_static_urlObject Also known as: using_static_url?