Class: PriceThreshold

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

Overview

== Schema Information

Table name: price_thresholds
Database name: primary

id :integer not null, primary key
min_quantity :integer
price :decimal(12, 2)
created_at :datetime
updated_at :datetime
supplier_item_id :integer

Indexes

price_thresholds_supplier_item_id_idx (supplier_item_id)

Foreign Keys

price_thresholds_supplier_item_id_fk (supplier_item_id => supplier_items.id) ON DELETE => cascade

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

#supplier_itemSupplierItem



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

belongs_to :supplier_item, optional: true