Sha256: 3039d27cf13da1f1310d127ea55499f5ed4e1978d246c84493b55e390ea5b023

Contents?: true

Size: 411 Bytes

Versions: 3

Compression:

Stored size: 411 Bytes

Contents

module Ecom
  module Core
    class EquipmentItem < ApplicationRecord
      READY = 'Ready'
      UNDER_MAINTENANCE = 'Under Maintenance'

      belongs_to :equipment
      belongs_to :current_location, class_name: 'Ecom::Core::EquipmentLocation'

      validates :name, :status, :serial_number, :purchase_date, :purchase_price, presence: true
      validates :serial_number, uniqueness: true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ecom_core-1.0.25 app/models/ecom/core/equipment_item.rb
ecom_core-1.0.24 app/models/ecom/core/equipment_item.rb
ecom_core-1.0.23 app/models/ecom/core/equipment_item.rb