Class: ReservationPackage
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ReservationPackage
- Defined in:
- app/models/reservation_package.rb
Overview
Schema Information
Table name: reservation_packages
id :bigint not null, primary key
commision :float(24)
custom_price :bigint
prepayment_percent :integer
price_cents :integer default(0), not null
price_currency :string(191) default("THB")
quantity :integer default(1), not null
type :string(191)
use_custom_price :boolean default(FALSE)
created_at :datetime not null
updated_at :datetime not null
reservation_id :integer
restaurant_package_id :integer
Indexes
index_reservation_packages_on_reservation_id (reservation_id)
index_reservation_packages_on_restaurant_package_id (restaurant_package_id)
restaurant_package_sold (restaurant_package_id,reservation_id) UNIQUE
Foreign Keys
fk_rails_... (reservation_id => reservations.id)
fk_rails_... (restaurant_package_id => hh_package_restaurant_packages.id)