Class: Event
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Event
- 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
- .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_emails ⇒ Object
Class Methods ##############################.
-
.with_active_participation ⇒ Object
Class Methods ##############################.
- .with_latest_participation ⇒ Object
Instance Method Summary collapse
- #access_key ⇒ Object
- #active_for_online_access? ⇒ Boolean
-
#any_approved_modified_blocks? ⇒ Boolean
for the dashboard display.
- #are_participant_groups_valid? ⇒ Boolean
- #are_participants_valid? ⇒ Boolean
- #batch_add_participants(emails_str) ⇒ Object
- #can_resolve_participant_group_without_code? ⇒ Boolean
- #consumer_display_name ⇒ Object
- #current_reservation ⇒ Object
- #day_total ⇒ Object
- #default_language ⇒ Object
- #display_name ⇒ Object
- #either_company?(user) ⇒ Boolean
- #event_ready? ⇒ Boolean (also: #is_event_ready)
- #get_participant_group(participant, code = nil) ⇒ Object
- #hosting_company?(user) ⇒ Boolean
- #location_not_null ⇒ Object
-
#location_title ⇒ Object
a not null/empty string describing where this event is taking place.
- #missing_session_count ⇒ Object
- #number_of_days ⇒ Object
- #offsite_company?(user) ⇒ Boolean
- #participant_total ⇒ Object
- #requires_location? ⇒ Boolean
- #schedule_valid? ⇒ Boolean (also: #is_schedule_valid?)
- #scheduled_session_count ⇒ Object
- #sessions_valid? ⇒ Boolean
- #started? ⇒ Boolean
-
#surveys_url ⇒ Object
End Class Methods ##############################.
- #using_static_url ⇒ Object (also: #using_static_url?)
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_emails ⇒ Object
Class Methods ##############################
.with_active_participation ⇒ Object
Class Methods ##############################
.with_latest_participation ⇒ Object
Instance Method Details
#access_key ⇒ Object
#active_for_online_access? ⇒ Boolean
#any_approved_modified_blocks? ⇒ Boolean
for the dashboard display
#are_participant_groups_valid? ⇒ Boolean
#are_participants_valid? ⇒ Boolean
#batch_add_participants(emails_str) ⇒ Object
#can_resolve_participant_group_without_code? ⇒ Boolean
#consumer_display_name ⇒ Object
#current_reservation ⇒ Object
#day_total ⇒ Object
#default_language ⇒ Object
#display_name ⇒ Object
#either_company?(user) ⇒ Boolean
#event_ready? ⇒ Boolean Also known as: is_event_ready
#get_participant_group(participant, code = nil) ⇒ Object
#hosting_company?(user) ⇒ Boolean
#location_not_null ⇒ Object
#location_title ⇒ Object
a not null/empty string describing where this event is taking place
#missing_session_count ⇒ Object
#number_of_days ⇒ Object
#offsite_company?(user) ⇒ Boolean
#participant_total ⇒ Object
#requires_location? ⇒ Boolean
#schedule_valid? ⇒ Boolean Also known as: is_schedule_valid?
#scheduled_session_count ⇒ Object
#sessions_valid? ⇒ Boolean
#started? ⇒ Boolean
#surveys_url ⇒ Object
End Class Methods ##############################