updated seed for customer
This commit is contained in:
@@ -4,7 +4,7 @@ class CreateCustomers < ActiveRecord::Migration[5.1]
|
|||||||
t.string :customer_id, :limit => 16, :primary_key => true #custom foreign_key to prevent conflict during sync
|
t.string :customer_id, :limit => 16, :primary_key => true #custom foreign_key to prevent conflict during sync
|
||||||
t.string :name, :null => false
|
t.string :name, :null => false
|
||||||
t.string :company
|
t.string :company
|
||||||
t.string :contact_no
|
t.string :contact_no, :unique => true
|
||||||
t.string :email
|
t.string :email
|
||||||
t.date :date_of_birth
|
t.date :date_of_birth
|
||||||
t.string :membership_id
|
t.string :membership_id
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class CreateShops < ActiveRecord::Migration[5.1]
|
|||||||
t.string :state, :null => false
|
t.string :state, :null => false
|
||||||
t.string :country, :null => false
|
t.string :country, :null => false
|
||||||
t.string :phone_no, :null => false
|
t.string :phone_no, :null => false
|
||||||
t.string :reserviation_no, :null => false
|
t.string :reservation_no, :null => false
|
||||||
t.string :license, :null => false
|
t.string :license, :null => false
|
||||||
t.datetime :activated_at, :null => false
|
t.datetime :activated_at, :null => false
|
||||||
t.text :license_data, :null => false
|
t.text :license_data, :null => false
|
||||||
|
|||||||
15
db/seeds.rb
15
db/seeds.rb
@@ -75,9 +75,8 @@ account_type = Lookup.create([{lookup_type:'account_type', name: 'Income', value
|
|||||||
{lookup_type:'account_type', name: 'Expense', value: 'expense'}])
|
{lookup_type:'account_type', name: 'Expense', value: 'expense'}])
|
||||||
|
|
||||||
#WALK CUSTOMER - Default CUSTOMER (take key 1)
|
#WALK CUSTOMER - Default CUSTOMER (take key 1)
|
||||||
customer = Customer.create({id:1, name:"WALK-IN", contact_no:"000000000"})
|
customer = Customer.create({name:"WALK-IN", email: "cus1@customer.com", contact_no:"000000000"})
|
||||||
customer = Customer.create({id:2, name:"TAKEAWAY", contact_no:"000000000"})
|
customer2 = Customer.create({name:"TAKEAWAY", email: "cus2@customer.com", contact_no:"111111111"})
|
||||||
|
|
||||||
|
|
||||||
#Default ZOne
|
#Default ZOne
|
||||||
zone = Zone.create({id:1, name: "Default Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
zone = Zone.create({id:1, name: "Default Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||||
@@ -141,9 +140,9 @@ admin_employee = Employee.create({name: "Administrator", role: "Administrator",
|
|||||||
food = Account.create({title: "Food", account_type: "0"})
|
food = Account.create({title: "Food", account_type: "0"})
|
||||||
beverage = Account.create({title: "Beverage", account_type: "1"})
|
beverage = Account.create({title: "Beverage", account_type: "1"})
|
||||||
|
|
||||||
# shop = Shop.create(
|
shop = Shop.create(
|
||||||
# {name: "Beauty In The Pot", address: "address", township: "Yangon", city: "Yangon", state: "Yangon",
|
{name: "Beauty In The Pot", address: "address", township: "Yangon", city: "Yangon", state: "Yangon",
|
||||||
# country: "Myanmar", phone_no: "09123456789", reservation_no: "bip000001", license: "license",
|
country: "Myanmar", phone_no: "09123456789", reservation_no: "bip000001", license: "license",
|
||||||
# activated_at: "2017-06-06", license_data: "license_data", base_currency: "Ks", id_prefix: "abc"}
|
activated_at: "2017-06-06", license_data: "license_data", base_currency: "Ks", id_prefix: "abc"}
|
||||||
# )
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user