menu and menu_category

This commit is contained in:
Min Zeya Phyo
2017-03-27 22:09:16 +06:30
parent 75db4dbc26
commit 40423c12d3
18 changed files with 144 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
class CreateRooms < ActiveRecord::Migration[5.0]
def change
create_table :rooms do |t|
t.string :name, :null => false
t.integer :seater, :null => false, :default => 4
t.string :created_by
t.boolean :is_active, :null => false, :default => true
t.integer :order_by
t.references :zone
t.timestamps
end
end
end

View File

@@ -0,0 +1,13 @@
class CreateMenus < ActiveRecord::Migration[5.0]
def change
create_table :menus do |t|
t.string :name
t.boolean :is_active, :null => false
t.string :valid_days, :null => false, :default => "1,2,3,4,5,6,7"
t.time :valid_time_from, :null => false, :default => "00:00:00"
t.time :valid_time_to, :null => false, :default => "23:59:59"
t.string :created_by
t.timestamps
end
end
end

View File

@@ -0,0 +1,13 @@
class CreateMenuCategories < ActiveRecord::Migration[5.0]
def change
create_table :menu_categories do |t|
t.references :menu, foreign_key: true
t.string :name, :null => false
t.string :alt_name
t.integer :order_by
t.integer :parent_category_id
t.timestamps
end
end
end

View File

@@ -1,18 +1,18 @@
zone {name}
seat_tables {table_name, seater, table_type:[square, round, ], position-x, position-y}
room {Name, seater,}
room {Name, seater, created_by, is_active, order_by}
menu {name, is_active, valid_days, valid_time_from, valid_time_to}
menu_category {menu, name, alt_name, order_no}
menu_category {menu, name, alt_name, order_no, parent_category_id}
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
variants:[{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 { id, date, order_source [tablet, order_station, emenu, api], order_type [dine-in, takeaway, delivery], 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,}
room-booking {room, check-in, check-out, reserved_by, status, orders}
order_queue_station {name, is_active, processing_items [product_code]}
order_queue_printer_setting { printer_name, font_size, cut_per_item}