module Mks module Edm class Equipment < ApplicationRecord include Mks::Edm::Defaults self.table_name = 'mks_edm_equipments' belongs_to :equipment_category validates :code, :name, presence: true validates :code, uniqueness: true delegate(:id, to: :equipment_category, prefix: true) delegate(:name, to: :equipment_category, prefix: true) default :minimum_acquisition_time, 0 end end end