order queue and print station
This commit is contained in:
16
db/migrate/20170403151731_create_order_queue_stations.rb
Normal file
16
db/migrate/20170403151731_create_order_queue_stations.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class CreateOrderQueueStations < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :order_queue_stations do |t|
|
||||
t.string :station_name, :null => false
|
||||
t.boolean :is_active, :null => false, :default => false
|
||||
t.json :processing_items
|
||||
t.boolean :print_copy, :null => false, :default => false
|
||||
t.string :printer_name
|
||||
t.integer :font_size, :null => false, :default => 10
|
||||
t.boolean :cut_per_item, :null => false, :default => false
|
||||
t.boolean :use_alternate_name, :null => false, :default => false
|
||||
t.string :created_by, :null => false
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
13
db/migrate/20170403152157_create_order_queue_process_logs.rb
Normal file
13
db/migrate/20170403152157_create_order_queue_process_logs.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
@@ -0,0 +1,10 @@
|
||||
class CreateOrderQueueProcessByZones < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :order_queue_process_by_zones do |t|
|
||||
t.references :order_queue_station, :null => false
|
||||
t.references :zone, :null => false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
14
db/migrate/20170403153001_create_payment_method_settings.rb
Normal file
14
db/migrate/20170403153001_create_payment_method_settings.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreatePaymentMethodSettings < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :payment_method_settings do |t|
|
||||
t.string :payment_method, :null => false
|
||||
t.boolean :is_active, :null => false, :default => false
|
||||
t.string :gateway_communication_type, :null => false, :default => "api"
|
||||
t.string :gateway_url
|
||||
t.string :auth_token
|
||||
t.string :merchant_account_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20170403155230_create_employees.rb
Normal file
11
db/migrate/20170403155230_create_employees.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateEmployees < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :employees do |t|
|
||||
t.string :name, :null => false
|
||||
t.string :role, :null => false, :default => "cashier"
|
||||
t.string :encrypted_access_code, :null => false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
20
db/migrate/20170403155500_create_cashier_terminals.rb
Normal file
20
db/migrate/20170403155500_create_cashier_terminals.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class CreateCashierTerminals < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :cashier_terminals do |t|
|
||||
t.string :name, :null => false
|
||||
t.boolean :is_active, :null => false, :default => true
|
||||
t.boolean :is_currently_login, :null => false, :default => false
|
||||
t.string :auto_print_receipt, :null => false, :default => false
|
||||
t.string :printer_name
|
||||
t.json :header
|
||||
t.json :footer
|
||||
t.string :font
|
||||
t.string :font_size, :null => false, :default => 10
|
||||
t.boolean :show_tax, :null => false, :default => true
|
||||
t.boolean :show_cashier, :null => false, :default => true
|
||||
t.boolean :show_guest_info, :null => false, :default => false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
12
db/migrate/20170403155531_create_cashier_login_logs.rb
Normal file
12
db/migrate/20170403155531_create_cashier_login_logs.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateCashierLoginLogs < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :cashier_login_logs do |t|
|
||||
t.references :cashier_terminal, foreign_key: true
|
||||
t.references :employee, foreign_key: true
|
||||
t.datetime :login_at, :null => false
|
||||
t.datetime :logout_at
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user