zone and seat_table models
This commit is contained in:
9
db/migrate/20170324135138_create_zones.rb
Normal file
9
db/migrate/20170324135138_create_zones.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateZones < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :zones do |t|
|
||||
t.string :name, :null => false
|
||||
t.boolean :is_active, :default => true
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
15
db/migrate/20170324135335_create_seat_tables.rb
Normal file
15
db/migrate/20170324135335_create_seat_tables.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateSeatTables < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :seat_tables do |t|
|
||||
t.references :zone, foreign_key: true
|
||||
t.string :name, :null => false
|
||||
t.integer :order_by
|
||||
t.integer :no_of_seater, :null => false, :default => 2
|
||||
t.string :table_type, :null => false, :default => "square"
|
||||
t.float :position_x, :null => false, :default => 0.0
|
||||
t.float :position_y, :null => false, :default => 0.0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
39
db/schema.txt
Normal file
39
db/schema.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
zone {name}
|
||||
seat_tables {table_name, seater, table_type:[square, round, ], position-x, position-y}
|
||||
room {Name, seater,}
|
||||
|
||||
menu {name, is_active, valid_days, valid_time_from, valid_time_to}
|
||||
menu_category {menu, name, alt_name, order_no}
|
||||
menu_items { menu_category, order_no, product_code, picture, menu_name, alt_menu_name, price, menu_item_type:[simple| set| DIY], available_size:[],
|
||||
ariants:[{product_code, name, picture, add_on_price}], allow_multiple_variants_selection: boolean, set_menu_items:[menu_items], is_sold_out, is_on_promotion
|
||||
promotion_price, promotion_qty}
|
||||
|
||||
order { id, date, order_source [tablet, order_station, emenu, api], order_type [dine-in, takeaway, delivery], table, item_count, quantity_count, status [new, processing, fulfilled], waiters[], guest_info: {customer_id, membership_id, }}
|
||||
order_items { order_item_status, product_code, name, qty, price, remark, options , variants: [], set_menu_items :[]}
|
||||
order_delivery_info {name, address, contact_no, delivery-by [InHouse | YDoor2Door | Food2U], tracker-id, sale}
|
||||
dine-in-table {table, order, status}
|
||||
room-booking {room, check-in, check-out, reserved_by, status,}
|
||||
|
||||
order_queue_station {name, is_active, processing_items [product_code]}
|
||||
order_queue_printer_setting { printer_name, font_size, cut_per_item}
|
||||
order_queue_log {order_id, job_status [new, completed], header: {table name, order_type, order_date}, items :{name, comment, qty}}
|
||||
|
||||
customer {name, company, contact, email, member_id, member_type, member_authentication_code}
|
||||
|
||||
sale_order {sale, order}
|
||||
sale {table, cashier, receipt_no, customer, payment_status, sale_status, total_amount, total_discount, total_tax, grand_total, amount_received}
|
||||
sale_items {sale, product_code, product_name, remark, qty, unit_price, taxable_amount, price}
|
||||
sale_discount_items {sale, product_code, product_name, regular_price, discounted_price, qty, taxable_amount, price, discount_type :[nett, percentage],discount_value}
|
||||
sale_discount {sale, discount_type, discount_value, discount_amount, discount_code}
|
||||
sale_taxes {sale, tax_name, tax_rate, tax_amount}
|
||||
sales_payment {sale, payment_method, payment_amount, payment_reference, payment_status}
|
||||
sales_audit {sale, action, action_by, approved_by, action_at}
|
||||
sale_receipt_setting {header, font_size, font, footer, show_tax, show_cashier, show_guest_info}
|
||||
payment_method_settings {payment_method , api_url , auth_token , account_id}
|
||||
|
||||
inventory_journal {product_code, qty, debit, credit, balance, references, stock_entry}
|
||||
stock_entry { who, date, status [new, processing, completed], action [entry | audit] }
|
||||
|
||||
lookup {lookup_type, name, value} [status | payment_method ]
|
||||
|
||||
Employee {name, role, access_code, encrypted_code}
|
||||
Reference in New Issue
Block a user