Class: ItemProductLine

Inherits:
ApplicationRecord show all
Includes:
Models::Auditable
Defined in:
app/models/item_product_line.rb

Overview

== Schema Information

Table name: item_product_lines
Database name: primary

id :integer not null, primary key
documents :boolean default(FALSE)
position :integer not null
reviews :boolean default(FALSE)
videos :boolean default(FALSE)
created_at :datetime
updated_at :datetime
item_id :integer not null
product_line_id :integer not null

Indexes

idx_product_line_id_item_id (product_line_id,item_id)
item_product_lines_item_id_position_idx (item_id,position)
item_product_lines_item_id_product_line_id_idx (item_id,product_line_id) UNIQUE

Foreign Keys

item_product_lines_item_id_fk (item_id => items.id) ON DELETE => cascade
item_product_lines_product_line_id_fk (product_line_id => product_lines.id)

Constant Summary

Constants included from Models::Auditable

Models::Auditable::ALWAYS_IGNORED

Belongs to collapse

Methods included from Models::Auditable

#creator, #updater

Methods included from Models::Auditable

#all_skipped_columns, #audit_reference_data, #should_not_save_version, #stamp_record

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Instance Method Details

#itemItem

Returns:

See Also:



31
# File 'app/models/item_product_line.rb', line 31

belongs_to :item, :inverse_of => :item_product_lines, optional: true

#product_lineProductLine



32
# File 'app/models/item_product_line.rb', line 32

belongs_to :product_line, :inverse_of => :item_product_lines, optional: true