Sha256: 2b960e163732003803c504343b91aa00ca691037f68fe1b831a803d2a619e37c

Contents?: true

Size: 392 Bytes

Versions: 35

Compression:

Stored size: 392 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'
      has_many :booked_items

      validates :status, presence: true, inclusion: STATUSES
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
ecom_core-1.2.31 app/models/ecom/core/booking.rb
ecom_core-1.2.30 app/models/ecom/core/booking.rb
ecom_core-1.2.29 app/models/ecom/core/booking.rb
ecom_core-1.2.28 app/models/ecom/core/booking.rb
ecom_core-1.2.27 app/models/ecom/core/booking.rb
ecom_core-1.2.26 app/models/ecom/core/booking.rb
ecom_core-1.2.25 app/models/ecom/core/booking.rb
ecom_core-1.2.24 app/models/ecom/core/booking.rb
ecom_core-1.2.23 app/models/ecom/core/booking.rb
ecom_core-1.2.22 app/models/ecom/core/booking.rb
ecom_core-1.2.21 app/models/ecom/core/booking.rb
ecom_core-1.2.20 app/models/ecom/core/booking.rb
ecom_core-1.2.19 app/models/ecom/core/booking.rb
ecom_core-1.2.18 app/models/ecom/core/booking.rb
ecom_core-1.2.17 app/models/ecom/core/booking.rb