Class: ShowcaseRoomLegacy

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

Overview

== Schema Information

Table name: showcase_room_legacies
Database name: primary

id :integer not null, primary key
alias :string
amps :integer
breaker_size :string
calculate_fields :boolean
connection_type :string
description :text
hide_product_card :boolean default(FALSE)
images_imported_from_room :boolean default(FALSE)
name :string
operating_cost :float
operating_cost_explanation :text
room_size :string
surface :string
volts :integer
wattage :integer
created_at :datetime not null
updated_at :datetime not null
control_id :integer
digital_assets_showcase_room_id :text default([]), is an Array
floor_heating_pl_id :integer
floor_type_id :integer
heating_system_id :integer
item_id :integer
led_mirror_id :integer
mirror_defogger_id :integer
pipe_freeze_pl_id :integer
radiant_panel_id :integer
roof_gutter_pl_id :integer
room_configuration_id :integer
room_type_id :integer
showcase_id :integer
shower_kit_id :integer
snow_melting_pl_id :integer
sub_floor_type_id :integer
towel_warmer_id :integer

Indexes

idx_rc_id_showcase_id (room_configuration_id,showcase_id)
idx_room_type_id_showcase_id (room_type_id,showcase_id)
idx_showcase_id (showcase_id)
index_showcase_room_legacies_on_control_id (control_id)
index_showcase_room_legacies_on_floor_type_id (floor_type_id)
index_showcase_room_legacies_on_heating_system_id (heating_system_id)
index_showcase_room_legacies_on_item_id (item_id)
index_showcase_room_legacies_on_sub_floor_type_id (sub_floor_type_id)

Foreign Keys

fk_rails_... (control_id => items.id)
fk_rails_... (floor_type_id => floor_types.id)
fk_rails_... (item_id => items.id)
fk_rails_... (room_configuration_id => room_configurations.id)
fk_rails_... (room_type_id => room_types.id)
fk_rails_... (showcase_id => showcase_legacies.id)
fk_rails_... (sub_floor_type_id => sub_floor_types.id)

Belongs to collapse

Has and belongs to 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:



200
201
202
203
204
# File 'app/models/showcase_room_legacy.rb', line 200

has_and_belongs_to_many :digital_assets,
class_name: 'DigitalAsset',
join_table: 'digital_assets_showcase_rooms',
association_foreign_key: 'digital_asset_id',
foreign_key: 'showcase_room_id'

#room_configurationRoomConfiguration

Returns:

  • (RoomConfiguration)

See Also:



197
# File 'app/models/showcase_room_legacy.rb', line 197

belongs_to :room_configuration, optional: true

#room_typeRoomType

Returns:

See Also:



198
# File 'app/models/showcase_room_legacy.rb', line 198

belongs_to :room_type, optional: true

#showcaseShowcaseLegacy



196
# File 'app/models/showcase_room_legacy.rb', line 196

belongs_to :showcase, class_name: 'ShowcaseLegacy', optional: true