Class: ShowcaseLegacy

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

Overview

== Schema Information

Table name: showcase_legacies
Database name: primary

id :integer not null, primary key
button_customize_floor_plan :boolean default(FALSE)
button_design_room :boolean default(TRUE)
button_floor_heating :boolean default(FALSE)
button_floor_heating_quote :boolean default(FALSE)
button_led_mirror :boolean default(FALSE)
button_mirror_defogger :boolean default(FALSE)
button_pipe_freeze_protection :boolean default(FALSE)
button_radiant_panel :boolean default(FALSE)
button_roof_gutter_deicing :boolean default(FALSE)
button_shower_kit :boolean default(FALSE)
button_snow_melting :boolean default(FALSE)
button_snow_melting_quote :boolean default(FALSE)
button_towel_warmers :boolean default(FALSE)
city :string
description :text
featured :boolean default(FALSE)
featured_date :datetime
filter_1_name :string
filter_1_value :string
filter_2_name :string
filter_2_value :string
images_imported_from_room :boolean default(FALSE)
name :string
notes :text
position :integer default(999)
project_type :string
resource_url :string
seo_description :text
seo_title :string
short_description :string
slug :string
slug_custom :string
status :string
tags :text default([]), is an Array
created_at :datetime not null
updated_at :datetime not null
address_id :integer
customer_id :integer
digital_assets_showcase_id :integer
employee_id :integer
product_line_id :integer
room_configuration_id :integer
room_plan_id :integer
room_type_id :integer
showcase_floorplan_id :integer
showcase_room_id :integer
state_id :integer

Indexes

idx_showcase_floorplan_id (showcase_floorplan_id)
idx_state_id (state_id)
index_showcase_legacies_on_address_id (address_id)
index_showcase_legacies_on_customer_id (customer_id)
index_showcase_legacies_on_employee_id (employee_id)
index_showcase_legacies_on_product_line_id (product_line_id)
index_showcase_legacies_on_project_type (project_type)
index_showcase_legacies_on_room_configuration_id (room_configuration_id)
index_showcase_legacies_on_room_plan_id (room_plan_id)
index_showcase_legacies_on_room_type_id (room_type_id)
index_showcase_legacies_on_showcase_room_id (showcase_room_id)
index_showcase_legacies_on_status (status)
index_showcase_legacies_on_tags (tags) USING gin

Foreign Keys

fk_rails_... (address_id => addresses.id)
fk_rails_... (customer_id => parties.id)
fk_rails_... (employee_id => parties.id)
fk_rails_... (product_line_id => product_lines.id)
fk_rails_... (room_configuration_id => room_configurations.id)
fk_rails_... (room_plan_id => room_plans.id)
fk_rails_... (room_type_id => room_types.id)
fk_rails_... (showcase_room_id => showcase_room_legacies.id)

Belongs to collapse

Has and belongs to many collapse

Has many collapse

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Instance Method Details

#digital_assetsActiveRecord::Relation<DigitalAsset>

Returns:

See Also:



253
254
255
256
257
# File 'app/models/showcase_legacy.rb', line 253

has_and_belongs_to_many :digital_assets,
class_name: 'DigitalAsset',
join_table: 'digital_assets_showcases',
association_foreign_key: 'digital_asset_id',
foreign_key: 'showcase_id'

#room_planRoomPlan

Returns:

See Also:



250
# File 'app/models/showcase_legacy.rb', line 250

belongs_to :room_plan, optional: true

#room_typeRoomType

Returns:

See Also:



251
# File 'app/models/showcase_legacy.rb', line 251

belongs_to :room_type, optional: true

#roomsActiveRecord::Relation<ShowcaseRoom>

Returns:

  • (ActiveRecord::Relation<ShowcaseRoom>)

See Also:



259
# File 'app/models/showcase_legacy.rb', line 259

has_many :rooms, class_name: 'ShowcaseRoom', foreign_key: 'showcase_id'