tax profile and lookup seed data
This commit is contained in:
@@ -4,10 +4,10 @@ class CreateMenuItemInstances < ActiveRecord::Migration[5.0]
|
||||
t.references :menu_item, :foreign_key => true, :null => false
|
||||
t.string :item_instance_code, :null => false
|
||||
t.json :attributes
|
||||
t.decimal :price, :null => false
|
||||
t.decimal :price,:precision => 10, :scale => 2, :null => false, :default => 0.00
|
||||
t.boolean :is_available, :null => false, :default => true
|
||||
t.boolean :is_on_promotion, :null => false, :default => false
|
||||
t.decimal :promotion_price, :null => false, :default => false
|
||||
t.decimal :promotion_price, :precision => 10, :scale => 2, :null => false, :default => 0.00
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ class CreateOrderItems < ActiveRecord::Migration[5.0]
|
||||
t.string :order_item_status, :null => false, :default => "new"
|
||||
t.string :item_code, :null => false
|
||||
t.string :item_name, :null => false
|
||||
t.integer :qty, :null => false
|
||||
t.decimal :qty, :precision => 10, :scale => 2, :null => false, :default => 0.00
|
||||
t.string :item_order_by #person who order this
|
||||
t.string :remark
|
||||
t.string :options
|
||||
|
||||
@@ -3,6 +3,7 @@ class CreateDiningFacilities < ActiveRecord::Migration[5.0]
|
||||
create_table :dining_facilities do |t|
|
||||
t.references :zone, foreign_key: true
|
||||
t.string :name, :null => false
|
||||
t.string :status, :null => false, :default => "available"
|
||||
t.string :type, :null => false, :default => "table"
|
||||
t.integer :seater, :null => false, :default => 2
|
||||
t.integer :order_by
|
||||
|
||||
@@ -2,7 +2,7 @@ class CreateRoomBookings < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :room_bookings do |t|
|
||||
t.references :room, :null => false
|
||||
t.datetime :checkin_at
|
||||
t.datetime :checkin_at, :null => false
|
||||
t.datetime :checkout_at
|
||||
t.string :checkout_by
|
||||
t.datetime :reserved_at
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class CreateRoomOrders < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :room_orders do |t|
|
||||
t.references :room, foreign_key: true
|
||||
t.references :room
|
||||
t.references :orders, foreign_key: true
|
||||
t.string :order_by
|
||||
|
||||
|
||||
12
db/migrate/20170403183755_create_tax_profiles.rb
Normal file
12
db/migrate/20170403183755_create_tax_profiles.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateTaxProfiles < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :tax_profiles do |t|
|
||||
t.string :name, :null => false
|
||||
t.decimal :rate, :precision => 10, :scale => 2, :null => false, :default => 0.00
|
||||
t.boolean :inclusive, :null => false, :default => false
|
||||
t.integer :order_by, :null => false, :default => 1
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user