Sha256: c07d46f1778e33e9c32252d5a4bf10c5a1a88ff9cc769503928624d51c9e950a

Contents?: true

Size: 886 Bytes

Versions: 16

Compression:

Stored size: 886 Bytes

Contents

module Ecom
  module Core
    class WorkItemResourceRequirementTemplate < ApplicationRecord
      belongs_to :project_work_item_template
      belongs_to :resource_type
      belongs_to :work_item_quantity_measurement_unit, class_name: 'Ecom::Core::MeasurementUnit'
      belongs_to :resource_quantity_measurement_unit, class_name: 'Ecom::Core::MeasurementUnit'

      validates :project_work_item_template_id, :project_work_item_template,
                :resource_type_id, :resource_type, :work_item_quantity_measurement_unit_id,
                :work_item_quantity_measurement_unit, :resource_quantity_measurement_unit_id,
                :resource_quantity_measurement_unit, presence: true

      validates :work_item_quantity, presence: true, numericality: { greater_than: 0 }
      validates :resource_quantity, presence: true, numericality: { greater_than: 0 }
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ecom_core-1.3.14 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.13 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.12 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.11 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.10 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.9 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.8 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.7 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.6 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.5 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.4 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.3 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.2 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.1 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.3.0 app/models/ecom/core/work_item_resource_requirement_template.rb
ecom_core-1.2.36 app/models/ecom/core/work_item_resource_requirement_template.rb