Sha256: 0d12505380ab3889a91e1f3434ebdbd5bb15465384782110a99ef9033e963e22

Contents?: true

Size: 423 Bytes

Versions: 1

Compression:

Stored size: 423 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ecom_core-1.2.13 app/models/ecom/core/booking.rb