rake
This commit is contained in:
@@ -74,7 +74,7 @@ namespace :manual_data do
|
||||
{lookup_type:'employee_roles',name: 'Manager',value: 'manager',shop_code: args.shop_code},
|
||||
{lookup_type:'employee_roles',name: 'Accountant',value: 'account',shop_code: args.shop_code},
|
||||
{lookup_type:'employee_roles',name: 'Administrator',value: 'administrator',shop_code: args.shop_code},
|
||||
{lookup_type:'employee_roles',name: 'FoodCourt Cashier',value: 'foodcourt_cashier',shop_code: args.shop_code}])
|
||||
{lookup_type:'employee_roles',name: 'Application',value: 'application',shop_code: args.shop_code}])
|
||||
puts " Finished employee_roles Set Up Data"
|
||||
|
||||
#booking_status
|
||||
@@ -151,7 +151,7 @@ namespace :manual_data do
|
||||
puts " Finished changable_tax Set Up Data"
|
||||
|
||||
# expity_time
|
||||
expity_time = Lookup.create([{lookup_type:'expity_time',name: 'login',value: '{30}',shop_code: args.shop_code}])
|
||||
expity_time = Lookup.create([{lookup_type:'expiry_time',name: 'login',value: '{30}',shop_code: args.shop_code}])
|
||||
puts " Finished expity_time Set Up Data"
|
||||
|
||||
#foodcourt use
|
||||
@@ -178,12 +178,12 @@ namespace :manual_data do
|
||||
puts " Finished Default CUSTOMER Set Up Data"
|
||||
|
||||
#seed_generators
|
||||
ActiveRecord::Base.connection.execute("INSERT INTO seed_generators(model,current,next,shop_code,created_at,updated_at) VALUES ('Customer',3,4,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());")
|
||||
ActiveRecord::Base.connection.execute("INSERT INTO seed_generators(model,current,next,shop_code,created_at,updated_at) VALUES ('Customer',3,4,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('TableBooking',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('Order',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('OrderItem',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('AssignedOrderItem',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('sale',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('SaleOrder',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('SaleItem',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('SaleAudit',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('SalePayment',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('SaleTax',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('Reservation',1,2,'#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());")
|
||||
puts " Finished seed_generators Set Up Data"
|
||||
|
||||
|
||||
#Create Adminstrator employee
|
||||
ActiveRecord::Base.connection.execute("INSERT INTO employees(name,role,password_digest,emp_id,created_by,shop_code,created_at,updated_at) VALUES ('Administrator','administrator','$2a$10$OKFA4b4yh0xCJNmzjMMijusnO712LUSEL4/y56p2XmdKBRPWgXwDa','999','SYSTEM DEFAULT','#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP()),('Cashier','cashier','$2a$12$NZ6JNxcp8PbSafAl1p740uUqGsULETtHq4Kr0JQYnfAiSNR3Jrfuu','222','SYSTEM DEFAULT','#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP());")
|
||||
ActiveRecord::Base.connection.execute("INSERT INTO employees(name,role,password_digest,emp_id,created_by,shop_code,created_at,updated_at,app_id,app_token) VALUES ('Administrator','administrator','$2a$10$OKFA4b4yh0xCJNmzjMMijusnO712LUSEL4/y56p2XmdKBRPWgXwDa','999','SYSTEM DEFAULT','#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP(),NULL,NULL),('Cashier','cashier','$2a$10$rXWBQro.YqUu5klH9oxqA.vcdq7webHm75FeXylY4uoJlek82luOq','333','SYSTEM DEFAULT','#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP(),NULL,NULL),('Manager','manager','$2a$10$JmzePPoejam8alpR6hrjr.8jIe/pm36IhErtoP4WwK788x2JfHUL2','777','SYSTEM DEFAULT','#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP(),NULL,NULL),('Application','application','$2a$12$Kzr5OIFb7B7KU52iKNoeSu5LnXtfJx0YX3s3d.HHJzxeodCv31Ehm','444','SYSTEM DEFAULT','#{args.shop_code}',CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP(), '#{SecureRandom.urlsafe_base64(nil, false)}', '#{SecureRandom.hex(10)}');")
|
||||
puts " Finished Create Adminstrator employee Set Up Data"
|
||||
|
||||
#PrintSetting
|
||||
@@ -215,7 +215,6 @@ namespace :manual_data do
|
||||
|
||||
payment_methods = PaymentMethodSetting.create({payment_method:"PAYMAL",gateway_url: "/api/create_payment",merchant_account_id:"pZBHXEFbGNj/G",shop_code: args.shop_code})
|
||||
puts " Finished payment_methods Set Up Data"
|
||||
|
||||
puts " Finished System Default Set Up Data"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user