Class: InventorySummary

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

Overview

We use this model for package sorting

Schema Information

Table name: inventory_summaries

id                    :bigint           not null, primary key
date                  :date
total_seat_left       :integer          default(0)
created_at            :datetime         not null
updated_at            :datetime         not null
restaurant_id         :bigint
restaurant_package_id :bigint

Indexes

index_inventory_summaries_on_date                   (date)
index_inventory_summaries_on_restaurant_id          (restaurant_id)
index_inventory_summaries_on_restaurant_package_id  (restaurant_package_id)
uniq_inv_summary                                    (date,restaurant_id,restaurant_package_id) UNIQUE

Method Summary

Methods inherited from ApplicationRecord

sync_carrierwave_url