order api - WIP & db structure change

This commit is contained in:
Min Zeya Phyo
2017-04-04 12:18:17 +06:30
parent aba3e52d0b
commit bcdce092cc
21 changed files with 120 additions and 130 deletions

View File

@@ -1,10 +0,0 @@
class Api::CustomersController < ActionController::API
#List all active customers by name
def index
end
#Show customer by ID
def show
end
end

View File

@@ -1,36 +0,0 @@
class Api::Restaurant::OrderController < ActionController::API
before :authenticate_token
#Description
# This API show current order details
# Input Params - order_id
def show
order = Order.find(params[:order_id])
order.order_items
end
# Description
# This API allow new order creation
# Input Params
# order_source [* default - emenu] | table_id (*require for Dine-In) | order_type [* Default - Dine-in]
# | guest_info (optional) | customer_id (optional)
# order_items {[item_code, item_instance_code , qty, option, variants]}
# Output Params
# Status [Success | Error | System Error] , order_id, error_message (*)
def create
end
# Description
# This API - allow order to add new items to existing orders, does not allow you to remove confirm items
# Update customer info, Guest Info
# Input Params
# order_id , order_items {[item_code, item_instance_code , qty, option, variants]}
def update
end
end