Class: ViewRmasFact

Inherits:
ApplicationViewRecord show all
Defined in:
app/models/view_rmas_fact.rb

Overview

== Schema Information

Table name: view_rmas_facts
Database name: primary

id :bigint
consolidated_exchange_rate :float
customer_name :string(255)
discounted_price :decimal(10, 2)
item_name :string(255)
msrp :decimal(8, 2)
notes :text
primary_or_local_rep_name :string(255)
quantity :integer
ref_original_invoice :string(255)
ref_original_order :string(255)
ref_replacement_order :string(255)
replacement_date :date
report_grouping :string(255)
restocking_description :text
restocking_reason :string
return_date :date
returned_description :text
returned_item_location :string(255)
returned_reason :string
rma_created_date :date
rma_number :string(255)
rma_state :string(255)
shipped_date :date
sku :string
company_id :integer
customer_id :integer
item_id :integer
original_order_id :integer
primary_or_local_rep_id :integer
primary_product_line_id :integer
replacement_order_id :integer
rma_id :integer

Indexes

index_view_rmas_facts_on_company_id (company_id)
index_view_rmas_facts_on_customer_id (customer_id)
index_view_rmas_facts_on_id (id) UNIQUE
index_view_rmas_facts_on_item_id (item_id)
index_view_rmas_facts_on_original_order_id (original_order_id)
index_view_rmas_facts_on_primary_or_local_rep_id (primary_or_local_rep_id)
index_view_rmas_facts_on_primary_product_line_id (primary_product_line_id)
index_view_rmas_facts_on_replacement_date (replacement_date)
index_view_rmas_facts_on_replacement_order_id (replacement_order_id)
index_view_rmas_facts_on_report_grouping (report_grouping)
index_view_rmas_facts_on_restocking_reason (restocking_reason)
index_view_rmas_facts_on_return_date (return_date)
index_view_rmas_facts_on_returned_item_location (returned_item_location)
index_view_rmas_facts_on_returned_reason (returned_reason)
index_view_rmas_facts_on_rma_created_date (rma_created_date)
index_view_rmas_facts_on_rma_id (rma_id)
index_view_rmas_facts_on_rma_state (rma_state)
index_view_rmas_facts_on_shipped_date (shipped_date)

Class Method Summary collapse

Methods inherited from ApplicationViewRecord

create, create!, #readonly?

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Class Method Details

.refreshObject



62
63
64
# File 'app/models/view_rmas_fact.rb', line 62

def self.refresh
  Scenic.database.refresh_materialized_view(table_name, concurrently: true, cascade: false)
end