import express from 'express';
import controller from '../../controllers/admin/rewardCoin';

const router = express.Router();

// #region /api/admin/rewardCoin/getRewardCoin apidoc
/**
 * @api {post} /api/admin/rewardCoin/getRewardCoin Get Reward Coin
 * @apiVersion 1.0.0
 * @apiName Get Reward Coin
 * @apiDescription Get Reward Coin
 * @apiGroup Reward Coin - Admin
 * @apiParam  {String}          [startIndex]                Optional Start Index
 * @apiParam  {String}          [fetchRecords]              Optional Fetch Records.
 * @apiSuccess (200) {JSON} Result status, message, recordList, totalRecords.
 * @apiSuccessExample {json} Success-200-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          status: 200,
 *          isDisplayMessage: <true/false>, // if the value is true then display message on screen
 *          message: 'Get Reward Coin',
 *          recordList: Reward Coin,
 *          totalRecords: TotalRecords
 *     }
 * @apiError (500) {JSON} Result message, apiName, apiType, fileName, functionName, lineNumber, typeName, stack.
 * @apiErrorExample {json} Error-500-Response:
 *     HTTP/1.1 500 ERROR
 *     {
 *          status: <error status code>,
 *          isDisplayMessage: <true/false>, // if the value is true then display message on screen
 *          message: <error message>,
 *          error: {
 *              apiName: <api name>,
 *              apiType: <api type>,
 *              fileName: <file name>,
 *              functionName: <function name>,
 *              lineNumber: <line number>,
 *              typeName: <type name>,
 *              stack: <stack>
 *          },
 *          value: <value if any>
 *     }
 */
// #endregion
router.post('/getRewardCoin', controller.getRewardCoin);

// #region /api/admin/rewardCoin/insertUpdateRewardCoin apidoc
/**
 * @api {post} /api/admin/rewardCoin/insertUpdateRewardCoin insert Reward Coin
 * @apiVersion 1.0.0
 * @apiName insert/Update Reward Coin
 * @apiDescription insert Reward Coin
 * @apiGroup Reward Coin - Admin
 * @apiParam  {Integer}             rewardTypeId                Requires Reward Type Id.
 * @apiParam  {String}              name                        Requires Reward Coin.
 * @apiSuccess (200) {JSON} Result status, message, recordList, totalRecords.
 * @apiSuccessExample {json} Success-200-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          status: 200,
 *          isDisplayMessage: <true/false>, // if the value is true then display message on screen
 *          message: 'insert Reward Coin',
 *          recordList: Reward Coin,
 *          totalRecords: TotalRecords
 *     }
 * @apiError (500) {JSON} Result message, apiName, apiType, fileName, functionName, lineNumber, typeName, stack.
 * @apiErrorExample {json} Error-500-Response:
 *     HTTP/1.1 500 ERROR
 *     {
 *          status: <error status code>,
 *          isDisplayMessage: <true/false>, // if the value is true then display message on screen
 *          message: <error message>,
 *          error: {
 *              apiName: <api name>,
 *              apiType: <api type>,
 *              fileName: <file name>,
 *              functionName: <function name>,
 *              lineNumber: <line number>,
 *              typeName: <type name>,
 *              stack: <stack>
 *          },
 *          value: <value if any>
 *     }
 */
// #endregion
router.post('/insertUpdateRewardCoin', controller.insertUpdateRewardCoin);

// #region /api/admin/rewardCoin/getRewardType apidoc
/**
 * @api {post} /api/admin/rewardCoin/getRewardType Get Reward Coin
 * @apiVersion 1.0.0
 * @apiName Get Reward Type
 * @apiDescription Get Reward Type
 * @apiGroup Reward Coin - Admin
 * @apiSuccess (200) {JSON} Result status, message, recordList, totalRecords.
 * @apiSuccessExample {json} Success-200-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          status: 200,
 *          isDisplayMessage: <true/false>, // if the value is true then display message on screen
 *          message: 'Get Reward Type',
 *          recordList: Reward Type,
 *          totalRecords: TotalRecords
 *     }
 * @apiError (500) {JSON} Result message, apiName, apiType, fileName, functionName, lineNumber, typeName, stack.
 * @apiErrorExample {json} Error-500-Response:
 *     HTTP/1.1 500 ERROR
 *     {
 *          status: <error status code>,
 *          isDisplayMessage: <true/false>, // if the value is true then display message on screen
 *          message: <error message>,
 *          error: {
 *              apiName: <api name>,
 *              apiType: <api type>,
 *              fileName: <file name>,
 *              functionName: <function name>,
 *              lineNumber: <line number>,
 *              typeName: <type name>,
 *              stack: <stack>
 *          },
 *          value: <value if any>
 *     }
 */
// #endregion
router.post('/getRewardType', controller.getRewardType);

export = router;