menu, table,rooms, orders structure

This commit is contained in:
Min Zeya Phyo
2017-04-03 21:26:22 +06:30
parent 40423c12d3
commit 30b4a0f5ff
60 changed files with 536 additions and 101 deletions

View File

@@ -0,0 +1,19 @@
class CreateMenuItems < ActiveRecord::Migration[5.0]
def change
create_table :menu_items do |t|
t.string :item_code, :null => false
t.string :name, :null => false
t.string :alt_name
t.string :type, :null => false, :default => "SimpleMenuItem"
t.references :menu_category, foreign_key: true
t.references :menu_item, foreign_key: true
t.integer :min_selectable_item, :null => false, :default => 1
t.integer :max_selectable_item, :null => false, :default => 1
t.json :options #save value
t.json :attributes #value IDS
t.string :created_by
t.timestamps
end
end
end