module Ecom module Model class WorkComponent < ApplicationRecord belongs_to :performer, class_name: 'Ecom::Model::User' belongs_to :approver, class_name: 'Ecom::Model::User' belongs_to :supervisor, class_name: 'Ecom::Model::User' belongs_to :quality_controller, class_name: 'Ecom::Model::User' belongs_to :work_component_template belongs_to :work_product validates :name, :assignment_status, :task_status, :percent_completed, presence: true end end end