Class: CatalogItemRepriceReference
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- CatalogItemRepriceReference
- Defined in:
- app/models/catalog_item_reprice_reference.rb
Overview
Join row scoping which sibling retailer catalogs cap a catalog item's
Amazon price raises: rows present → only those retailers' scrapes cap;
none → every probe-enabled retailer does (no preference).
catalog_id is nullable because the FK is ON DELETE SET NULL — deleting a
catalog must never block on repricing scopes. Orphaned rows are inert:
readers go through the inner-join :reprice_reference_catalogs association.
Constant Summary
Constants included from Models::Schedulable
Models::Schedulable::SIMPLE_FORM_OPTIONS
Instance Attribute Summary collapse
-
#catalog_id ⇒ Integer?
Foreign key to the repricing scope catalog.
Belongs to collapse
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Instance Attribute Details
#catalog_id ⇒ Integer?
Returns Foreign key to the repricing scope catalog.
18 |
# File 'app/models/catalog_item_reprice_reference.rb', line 18 validates :catalog_id, uniqueness: { scope: :catalog_item_id }, allow_nil: true |
Instance Method Details
#catalog ⇒ Catalog
14 |
# File 'app/models/catalog_item_reprice_reference.rb', line 14 belongs_to :catalog, optional: true |
#catalog_item ⇒ CatalogItem
12 |
# File 'app/models/catalog_item_reprice_reference.rb', line 12 belongs_to :catalog_item |