Class: ViewTechProductivity
- Inherits:
-
ApplicationViewRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ApplicationViewRecord
- ViewTechProductivity
- Defined in:
- app/models/view_tech_productivity.rb
Overview
== Schema Information
Table name: view_tech_productivities
Database name: primary
id(Synthetic row number primary key.) :bigint
accs_created(Count of new customer accounts created (non-guest) on this date.) :bigint
act_cmp_created(Count of activities completed (closed) on this date across qualifying activity types.) :bigint
business_day(1 = working day, 0 = weekend/holiday.) :integer
comm_sent(Count of communications (emails) sent on this date.) :bigint
date(Calendar date for this productivity row.) :date
day_off(Fraction of the day taken off (0.0 = working, 1.0 = full day off). From approved time-off requests.) :float
department(Employee's department from employee_records.) :string(30)
employee_name(Employee full name.) :string(255)
opp_created(Count of new opportunities created on this date.) :bigint
ord_created(Count of new orders created on this date.) :bigint
rmas_created(Count of new RMAs (return authorizations) created on this date.) :bigint
sc_created(Count of new support cases created on this date.) :bigint
sms(Total SMS messages sent and received (both directions counted).) :decimal(, )
employee_id(FK → parties.id for the employee.) :integer
Indexes
index_view_tech_productivities_on_date (date)
index_view_tech_productivities_on_department (department)
index_view_tech_productivities_on_employee_id (employee_id)
index_view_tech_productivities_on_id (id) UNIQUE
Constant Summary
Constants included from Schedulable
Schedulable::SIMPLE_FORM_OPTIONS
Class Method Summary collapse
Methods inherited from ApplicationViewRecord
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Class Method Details
.refresh ⇒ Object
31 32 33 |
# File 'app/models/view_tech_productivity.rb', line 31 def self.refresh Scenic.database.refresh_materialized_view(table_name, concurrently: false, cascade: false) end |