Class: QeDataStatistic
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- QeDataStatistic
- Defined in:
- app/models/qe_data_statistic.rb
Overview
== Schema Information
Table name: qe_data_statistics
Database name: primary
id :integer not null, primary key
application_type :string(255)
coverage_state :string(255) default("0"), not null
expansion_joint_spacing :decimal(8, 2)
heating_system_type_code :string(255)
zone_length :decimal(8, 2)
zone_sqft :decimal(8, 2)
zone_width :decimal(8, 2)
catalog_id :integer
floor_type_id :integer
Indexes
index_qe_data_statistics_on_application_type (application_type)
index_qe_data_statistics_on_catalog_id (catalog_id)
index_qe_data_statistics_on_coverage_state (coverage_state)
index_qe_data_statistics_on_floor_type_id (floor_type_id)
index_qe_data_statistics_on_heating_system_type_code (heating_system_type_code)
Constant Summary
Constants included from Schedulable
Schedulable::SIMPLE_FORM_OPTIONS
Has one collapse
Instance Method Summary collapse
- #expansion_joint_spacing_defined? ⇒ Boolean
- #length_defined? ⇒ Boolean
-
#sqft_defined? ⇒ Boolean
validates_presence_of :catalog_id, :floor_type_id, :application_type, :heating_system_type_code, :sqft, :coverage_state validates_format_of :application_type, :with => %r\b[FWSMO]{2\b} validates_format_of :heating_system_type_code, :with => %r\b[TZEV2SMCH]{2,3\b} validates_numericality_of :sqft, :greater_than_or_equal_to => 0.0, if: :sqft_defined? validates_numericality_of :width, :greater_than_or_equal_to => 0.0, if: :width_defined? validates_numericality_of :length, :greater_than_or_equal_to => 0.0, if: :length_defined? validates_numericality_of :expansion_joint_spacing, :greater_than_or_equal_to => 0.0, if: :expansion_joint_spacing_defined?.
- #width_defined? ⇒ Boolean
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
Instance Method Details
#expansion_joint_spacing_defined? ⇒ Boolean
48 49 50 |
# File 'app/models/qe_data_statistic.rb', line 48 def expansion_joint_spacing_defined? expansion_joint_spacing? end |
#length_defined? ⇒ Boolean
44 45 46 |
# File 'app/models/qe_data_statistic.rb', line 44 def length_defined? length? end |
#qe_access_statistic ⇒ QeAccessStatistic
27 |
# File 'app/models/qe_data_statistic.rb', line 27 has_one :qe_access_statistic |
#sqft_defined? ⇒ Boolean
validates_presence_of :catalog_id, :floor_type_id, :application_type, :heating_system_type_code, :sqft, :coverage_state
validates_format_of :application_type, :with => %r\b[FWSMO]{2\b}
validates_format_of :heating_system_type_code, :with => %r\b[TZEV2SMCH]{2,3\b}
validates_numericality_of :sqft, :greater_than_or_equal_to => 0.0, if: :sqft_defined?
validates_numericality_of :width, :greater_than_or_equal_to => 0.0, if: :width_defined?
validates_numericality_of :length, :greater_than_or_equal_to => 0.0, if: :length_defined?
validates_numericality_of :expansion_joint_spacing, :greater_than_or_equal_to => 0.0, if: :expansion_joint_spacing_defined?
36 37 38 |
# File 'app/models/qe_data_statistic.rb', line 36 def sqft_defined? sqft? end |
#width_defined? ⇒ Boolean
40 41 42 |
# File 'app/models/qe_data_statistic.rb', line 40 def width_defined? width? end |