module Ecom module Core class Booking < ApplicationRecord APPROVED = 'Approved'.freeze UNAPPROVED = 'Unapproved'.freeze STATUSES = [APPROVED, UNAPPROVED].freeze belongs_to :equipment_request belongs_to :booked_by, class_name: 'Ecom::Core::User' belongs_to :booked_for, class_name: 'Ecom::Core::User' validates :status, presence: true, inclusion: STATUSES end end end