Class: InventorySevenRooms

Inherits:
ApplicationRecord show all
Includes:
InventoryTrait
Defined in:
app/models/inventory_seven_rooms.rb

Overview

Schema Information

Table name: inventory_seven_rooms_partitions

id                 :bigint           unsigned, not null, primary key
date               :date
end_time           :time
quantity_available :integer
start_time         :time
total_booked_seat  :integer          default(0)
created_at         :datetime         not null
updated_at         :datetime         not null
restaurant_id      :integer          not null, primary key

Indexes

by_inventory_seven_rooms_restaurant_date_time  (restaurant_id,date,start_time) UNIQUE
index_inventory_seven_rooms_on_date            (date)
index_inventory_seven_rooms_on_end_time        (end_time)
index_inventory_seven_rooms_on_restaurant_id   (restaurant_id)
index_inventory_seven_rooms_on_start_time      (start_time)

Constant Summary

Constants included from InventoryTrait

InventoryTrait::QUANTITY_AVAILABLE_DEFAULT

Method Summary

Methods included from InventoryTrait

#calc_total_booked_seat, #date_format, #date_format_ext, #end_time_format, #end_time_sql, #log_and_update_attributes, #overbooked?, #seat_left, #start_time_format, #start_time_hour, #start_time_sql

Methods inherited from ApplicationRecord

sync_carrierwave_url