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