order queue processing

This commit is contained in:
Min Zeya Phyo
2017-04-14 15:50:17 +06:30
parent 5b1bb6f6cd
commit 7cc2ac395d
22 changed files with 246 additions and 33 deletions

View File

@@ -7,10 +7,11 @@ class CreateMenuItems < ActiveRecord::Migration[5.0]
t.string :type, :null => false, :default => "SimpleMenuItem"
t.references :menu_category, foreign_key: true
t.references :menu_item, foreign_key: true
t.integer :min_qty, :null => false, :default => 1
t.integer :min_selectable_item, :null => false, :default => 1
t.integer :max_selectable_item, :null => false, :default => 1
t.json :options #save value
t.json :attributes #value IDS
t.json :item_attributes #value IDS
t.string :created_by
t.timestamps

View File

@@ -10,7 +10,6 @@ class CreateOrderItems < ActiveRecord::Migration[5.0]
t.string :remark
t.string :options
t.json :set_menu_items #this parameter is require to route the items correctly
t.timestamps
end
end

View File

@@ -1,13 +0,0 @@
class CreateOrderQueueProcessLogs < ActiveRecord::Migration[5.0]
def change
create_table :order_queue_process_logs do |t|
t.references :order, foreign_key: true
t.string :job_status, :default => "new", :null => "false"
t.string :print_status, :default => "new"
t.json :header #{table name, order_type, order_date}
t.json :items #{name, comment, qty}
t.timestamps
end
end
end

View File

@@ -0,0 +1,15 @@
class CreateMembershipSettings < ActiveRecord::Migration[5.0]
def change
create_table :membership_settings do |t|
t.string :membership_type, :null => false, :default => "internal"
t.boolean :is_active, :null => false, :default => true
t.string :gateway_communication_type, :null => false, :default => "api"
t.string :gateway_url
t.string :auth_token
t.string :merchant_account_id
t.string :created_by
t.timestamps
end
end
end

View File

@@ -0,0 +1,13 @@
class CreateAssignedOrderItems < ActiveRecord::Migration[5.0]
def change
create_table :assigned_order_items do |t|
t.string :item_code, :null => false, :index => true
t.references :order_queue_station, foreign_key: true
t.references :order, foreign_key: true
t.boolean :print_status
t.boolean :delivery_status
t.timestamps
end
end
end