Class: Booking

Inherits:
Slot
  • Object
show all
Defined in:
app/models/booking.rb

Overview

A kind of Slot that represents the Booking that a Customer reserves with a service Provider.

Schema Information

Table name: slots

id                 :integer          not null, primary key
capacity           :integer          default("1")
min_booking_length :integer          default("15")
created_at         :datetime         not null
updated_at         :datetime         not null
slot_group_id      :integer
color              :integer          not null
type               :string           not null
provider_id        :integer
booking_state_id   :integer
period_id          :integer          not null
affiliation_id     :integer
free_slot_id       :integer

Instance Method Summary (collapse)

Constructor Details

- (Booking) initialize

Returns a new instance of Booking



38
39
40
41
42
# File 'app/models/booking.rb', line 38

def initialize(*)
  super
  self.color ||= 1
  self.booking_state ||= BookingState.pending
end