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' has_many :booked_items validates :status, presence: true, inclusion: STATUSES end end end