Class: BookingSummary

Inherits:
ApplicationRecord show all
Defined in:
app/models/booking_summary.rb

Overview

Schema Information

Table name: booking_summaries

id            :bigint           not null, primary key
booking_count :integer          default(0), not null
cancel_count  :integer          default(0), not null
no_show_count :integer          default(0), not null
created_at    :datetime         not null
updated_at    :datetime         not null
restaurant_id :bigint
user_id       :bigint

Indexes

index_booking_summaries_on_restaurant_id  (restaurant_id)
index_booking_summaries_on_user_id        (user_id)

Class Method Summary collapse

Methods inherited from ApplicationRecord

sync_carrierwave_url

Class Method Details

.default_dataObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'app/models/booking_summary.rb', line 23

def self.default_data
  {
    restaurant_booking: {
      booking: 0,
      cancel: 0,
      no_show: 0,
    },
    all_restaurant_booking: {
      booking: 0,
      cancel: 0,
      no_show: 0,
    },
  }
end