Sha256: 73640ee10b573d99c58c8f88cdaff2c201ffa0d42815b022f5ac817919cf94f4

Contents?: true

Size: 457 Bytes

Versions: 14

Compression:

Stored size: 457 Bytes

Contents

module Ecom
  module Core
    class WorkPackage < ApplicationRecord
      belongs_to :project
      belongs_to :site_engineer, class_name: 'Ecom::Core::User', optional: true
      belongs_to :project_manager, class_name: 'Ecom::Core::User', optional: true

      validates :code, :name, presence: true
      validates :code, uniqueness: true
      validates :budget, numericality: true, unless: proc { budget.nil? }

      has_many :tasks
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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