Class: MaterialAlertItem

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

Overview

== Schema Information

Table name: material_alert_items
Database name: primary

id :bigint not null, primary key
position :integer default(0), not null
item_id :bigint not null
material_alert_id :bigint not null

Indexes

idx_material_alert_items_item (item_id)
idx_material_alert_items_unique (material_alert_id,item_id) UNIQUE

Foreign Keys

fk_rails_... (item_id => items.id) ON DELETE => cascade
fk_rails_... (material_alert_id => material_alerts.id) ON DELETE => cascade

See Also:

Belongs to 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

#itemItem

Returns:

See Also:



25
# File 'app/models/material_alert_item.rb', line 25

belongs_to :item

#material_alertMaterialAlert



24
# File 'app/models/material_alert_item.rb', line 24

belongs_to :material_alert