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.3.14 app/models/ecom/core/booking.rb
ecom_core-1.3.13 app/models/ecom/core/booking.rb
ecom_core-1.3.12 app/models/ecom/core/booking.rb
ecom_core-1.3.11 app/models/ecom/core/booking.rb
ecom_core-1.3.10 app/models/ecom/core/booking.rb
ecom_core-1.3.9 app/models/ecom/core/booking.rb
ecom_core-1.3.8 app/models/ecom/core/booking.rb
ecom_core-1.3.7 app/models/ecom/core/booking.rb
ecom_core-1.3.6 app/models/ecom/core/booking.rb
ecom_core-1.3.5 app/models/ecom/core/booking.rb
ecom_core-1.3.4 app/models/ecom/core/booking.rb
ecom_core-1.3.3 app/models/ecom/core/booking.rb
ecom_core-1.3.2 app/models/ecom/core/booking.rb
ecom_core-1.3.1 app/models/ecom/core/booking.rb
ecom_core-1.3.0 app/models/ecom/core/booking.rb
ecom_core-1.2.36 app/models/ecom/core/booking.rb
ecom_core-1.2.35 app/models/ecom/core/booking.rb
ecom_core-1.2.34 app/models/ecom/core/booking.rb
ecom_core-1.2.33 app/models/ecom/core/booking.rb
ecom_core-1.2.32 app/models/ecom/core/booking.rb