menu and menu item categories

This commit is contained in:
Min Zeya Phyo
2017-04-15 17:33:45 +06:30
parent 355f4fadb0
commit 63c5c97f24
24 changed files with 303 additions and 39 deletions

View File

@@ -10,8 +10,6 @@ class CreateMenuItems < ActiveRecord::Migration[5.0]
t.integer :min_qty, :null => false, :default => 1
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 :item_attributes #value IDS
t.string :created_by
t.timestamps

View File

@@ -3,8 +3,8 @@ class CreateMenuItemInstances < ActiveRecord::Migration[5.0]
create_table :menu_item_instances do |t|
t.references :menu_item, :foreign_key => true, :null => false
t.string :item_instance_code, :null => false
t.string :item_instance_name, :string, :null => false
t.json :attributes
t.string :item_instance_name, :null => false
t.json :item_attributes
t.decimal :price,:precision => 10, :scale => 2, :null => false, :default => 0.00
t.boolean :is_on_promotion, :null => false, :default => false
t.decimal :promotion_price, :precision => 10, :scale => 2, :null => false, :default => 0.00