Class: StoreTransfer
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- StoreTransfer
- Includes:
- Models::Auditable
- Defined in:
- app/models/store_transfer.rb
Overview
== Schema Information
Table name: store_transfers
Database name: primary
id :bigint not null, primary key
created_at :datetime not null
updated_at :datetime not null
consignee_party_id :integer not null
creator_id :integer
from_store_id :integer not null
sold_to_customer_id :integer not null
to_store_id :integer not null
updater_id :integer
Indexes
index_store_transfers_on_consignee_party_id (consignee_party_id)
index_store_transfers_on_from_store_id_and_to_store_id (from_store_id,to_store_id) UNIQUE
index_store_transfers_on_sold_to_customer_id (sold_to_customer_id)
index_store_transfers_on_to_store_id (to_store_id)
Foreign Keys
fk_rails_... (consignee_party_id => parties.id)
fk_rails_... (from_store_id => stores.id)
fk_rails_... (sold_to_customer_id => parties.id)
fk_rails_... (to_store_id => stores.id)
Constant Summary
Constants included from Models::Auditable
Models::Auditable::ALWAYS_IGNORED
Belongs to collapse
- #consignee_party ⇒ Customer
- #from_store ⇒ Store
- #sold_to_customer ⇒ Customer
- #store ⇒ Store
- #to_store ⇒ Store
Methods included from Models::Auditable
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
Instance Method Details
#consignee_party ⇒ Customer
37 |
# File 'app/models/store_transfer.rb', line 37 belongs_to :consignee_party, class_name: 'Customer' |
#from_store ⇒ Store
34 |
# File 'app/models/store_transfer.rb', line 34 belongs_to :from_store, class_name: 'Store' |
#sold_to_customer ⇒ Customer
36 |
# File 'app/models/store_transfer.rb', line 36 belongs_to :sold_to_customer, class_name: 'Customer' |
#to_store ⇒ Store
35 |
# File 'app/models/store_transfer.rb', line 35 belongs_to :to_store, class_name: 'Store' |