text: -- phpMyAdmin SQL Dump
  -- version 4.7.0
  -- https://www.phpmyadmin.net/
  --
  -- Servidor: 127.0.0.1
  -- Tiempo de generación: 06-10-2018 a las 18:23:23
  -- Versión del servidor: 10.1.26-MariaDB
  -- Versión de PHP: 7.1.8
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  START TRANSACTION;
  SET time_zone = "+00:00";
  
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8mb4 */;
  
  --
  -- Base de datos: `restaurant`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `category`
  --
  
  CREATE TABLE `category` (
    `id` int(11) NOT NULL,
    `name` varchar(255) NOT NULL,
    `active` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `category`
  --
  
  INSERT INTO `category` (`id`, `name`, `active`) VALUES
  (1, 'Bebidas', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `company`
  --
  
  CREATE TABLE `company` (
    `id` int(11) NOT NULL,
    `company_name` varchar(255) NOT NULL,
    `service_charge_value` varchar(255) NOT NULL,
    `vat_charge_value` varchar(255) NOT NULL,
    `address` varchar(255) NOT NULL,
    `phone` varchar(255) NOT NULL,
    `country` varchar(255) NOT NULL,
    `message` text NOT NULL,
    `currency` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `company`
  --
  
  INSERT INTO `company` (`id`, `company_name`, `service_charge_value`, `vat_charge_value`, `address`, `phone`, `country`, `message`, `currency`) VALUES
  (1, 'Lulu', '', '13', 'READING', '234234235', 'Spai', 'this is just an testing', 'USD');
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `groups`
  --
  
  CREATE TABLE `groups` (
    `id` int(11) NOT NULL,
    `group_name` varchar(255) NOT NULL,
    `permission` text NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `groups`
  --
  
  INSERT INTO `groups` (`id`, `group_name`, `permission`) VALUES
  (1, 'Super Administrador', 'a:32:{i:0;s:10:\"createUser\";i:1;s:10:\"updateUser\";i:2;s:8:\"viewUser\";i:3;s:10:\"deleteUser\";i:4;s:11:\"createGroup\";i:5;s:11:\"updateGroup\";i:6;s:9:\"viewGroup\";i:7;s:11:\"deleteGroup\";i:8;s:11:\"createStore\";i:9;s:11:\"updateStore\";i:10;s:9:\"viewStore\";i:11;s:11:\"deleteStore\";i:12;s:11:\"createTable\";i:13;s:11:\"updateTable\";i:14;s:9:\"viewTable\";i:15;s:11:\"deleteTable\";i:16;s:14:\"createCategory\";i:17;s:14:\"updateCategory\";i:18;s:12:\"viewCategory\";i:19;s:14:\"deleteCategory\";i:20;s:13:\"createProduct\";i:21;s:13:\"updateProduct\";i:22;s:11:\"viewProduct\";i:23;s:13:\"deleteProduct\";i:24;s:11:\"createOrder\";i:25;s:11:\"updateOrder\";i:26;s:9:\"viewOrder\";i:27;s:11:\"deleteOrder\";i:28;s:10:\"viewReport\";i:29;s:13:\"updateCompany\";i:30;s:11:\"viewProfile\";i:31;s:13:\"updateSetting\";}'),
  (4, 'Miembros', 'a:9:{i:0;s:9:\"viewStore\";i:1;s:11:\"deleteStore\";i:2;s:9:\"viewTable\";i:3;s:11:\"deleteTable\";i:4;s:12:\"viewCategory\";i:5;s:11:\"viewProduct\";i:6;s:11:\"createOrder\";i:7;s:11:\"updateOrder\";i:8;s:9:\"viewOrder\";}'),
  (5, 'Personal', 'a:6:{i:0;s:9:\"viewTable\";i:1;s:11:\"viewProduct\";i:2;s:11:\"createOrder\";i:3;s:11:\"updateOrder\";i:4;s:9:\"viewOrder\";i:5;s:11:\"viewProfile\";}');
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `orders`
  --
  
  CREATE TABLE `orders` (
    `id` int(11) NOT NULL,
    `bill_no` varchar(255) NOT NULL,
    `date_time` varchar(255) NOT NULL,
    `gross_amount` varchar(255) NOT NULL,
    `service_charge_rate` varchar(255) NOT NULL,
    `service_charge_amount` varchar(255) NOT NULL,
    `vat_charge_rate` varchar(255) NOT NULL,
    `vat_charge_amount` varchar(255) NOT NULL,
    `discount` varchar(255) NOT NULL,
    `net_amount` varchar(255) NOT NULL,
    `user_id` int(11) NOT NULL,
    `table_id` int(11) NOT NULL,
    `paid_status` int(11) NOT NULL,
    `store_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `orders`
  --
  
  INSERT INTO `orders` (`id`, `bill_no`, `date_time`, `gross_amount`, `service_charge_rate`, `service_charge_amount`, `vat_charge_rate`, `vat_charge_amount`, `discount`, `net_amount`, `user_id`, `table_id`, `paid_status`, `store_id`) VALUES
  (1, 'BILPR-2CA7', '1536244193', '10.00', '', '0', '13', '1.30', '', '11.30', 1, 1, 1, 0);
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `order_items`
  --
  
  CREATE TABLE `order_items` (
    `id` int(11) NOT NULL,
    `order_id` int(11) NOT NULL,
    `product_id` int(11) NOT NULL,
    `qty` varchar(255) NOT NULL,
    `rate` varchar(255) NOT NULL,
    `amount` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `order_items`
  --
  
  INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `qty`, `rate`, `amount`) VALUES
  (11, 1, 1, '1', '10', '10.00');
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `products`
  --
  
  CREATE TABLE `products` (
    `id` int(11) NOT NULL,
    `category_id` text NOT NULL,
    `store_id` text NOT NULL,
    `name` varchar(255) NOT NULL,
    `price` varchar(255) NOT NULL,
    `description` text NOT NULL,
    `image` text NOT NULL,
    `active` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `products`
  --
  
  INSERT INTO `products` (`id`, `category_id`, `store_id`, `name`, `price`, `description`, `image`, `active`) VALUES
  (1, 'null', '[\"1\"]', 'cena1', '10', '<p>es la cena uno</p>', 'assets/images/product_image/5ba1c4f1a3c00.jpg', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `stores`
  --
  
  CREATE TABLE `stores` (
    `id` int(11) NOT NULL,
    `name` varchar(255) NOT NULL,
    `active` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `stores`
  --
  
  INSERT INTO `stores` (`id`, `name`, `active`) VALUES
  (1, 'Prueba2', 1),
  (2, 'Prueba3', 2);
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `tables`
  --
  
  CREATE TABLE `tables` (
    `id` int(11) NOT NULL,
    `table_name` varchar(255) NOT NULL,
    `capacity` varchar(255) NOT NULL,
    `available` int(11) NOT NULL,
    `active` int(11) NOT NULL,
    `store_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `tables`
  --
  
  INSERT INTO `tables` (`id`, `table_name`, `capacity`, `available`, `active`, `store_id`) VALUES
  (1, 'mesa1', '10', 1, 2, 1);
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `users`
  --
  
  CREATE TABLE `users` (
    `id` int(11) NOT NULL,
    `username` varchar(255) NOT NULL,
    `password` varchar(255) NOT NULL,
    `email` varchar(255) NOT NULL,
    `firstname` varchar(255) NOT NULL,
    `lastname` varchar(255) NOT NULL,
    `phone` varchar(255) NOT NULL,
    `gender` int(11) NOT NULL,
    `store_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `users`
  --
  
  INSERT INTO `users` (`id`, `username`, `password`, `email`, `firstname`, `lastname`, `phone`, `gender`, `store_id`) VALUES
  (1, 'admin', '$2y$10$OZIHvVNCs1g45SKousYnku1eA8OTr1E8mLPmuIMphEYgXg5MP4DDG', 'admin@admin.com', 'Edu', 'doe', '80789998', 1, 0),
  (2, 'prueba', '$2y$10$Sj6Rt2Vz3PoW0JWjhqhizOkgmLYuKTFg3g2cF8NcMtoAskJCUNU3C', 'prueba@prueba.com', 'Prueba', 'Prueba', '12345678', 1, 1),
  (3, 'Staff', '$2y$10$ac5q9x4pmImJrlKB8phoY.CnzYslCkeTx06TuRwY3e6x3LKkEwziK', 'staff@staff.com', 'Staff', 'Staff2', '12345678', 1, 1);
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `user_group`
  --
  
  CREATE TABLE `user_group` (
    `id` int(11) NOT NULL,
    `user_id` int(11) NOT NULL,
    `group_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Volcado de datos para la tabla `user_group`
  --
  
  INSERT INTO `user_group` (`id`, `user_id`, `group_id`) VALUES
  (1, 1, 1),
  (2, 2, 4),
  (3, 3, 5);
  
  --
  -- Índices para tablas volcadas
  --
  
  --
  -- Indices de la tabla `category`
  --
  ALTER TABLE `category`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `company`
  --
  ALTER TABLE `company`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `groups`
  --
  ALTER TABLE `groups`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `orders`
  --
  ALTER TABLE `orders`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `order_items`
  --
  ALTER TABLE `order_items`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `products`
  --
  ALTER TABLE `products`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `stores`
  --
  ALTER TABLE `stores`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `tables`
  --
  ALTER TABLE `tables`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `user_group`
  --
  ALTER TABLE `user_group`
    ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT de las tablas volcadas
  --
  
  --
  -- AUTO_INCREMENT de la tabla `category`
  --
  ALTER TABLE `category`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT de la tabla `company`
  --
  ALTER TABLE `company`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT de la tabla `groups`
  --
  ALTER TABLE `groups`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  --
  -- AUTO_INCREMENT de la tabla `orders`
  --
  ALTER TABLE `orders`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT de la tabla `order_items`
  --
  ALTER TABLE `order_items`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
  --
  -- AUTO_INCREMENT de la tabla `products`
  --
  ALTER TABLE `products`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT de la tabla `stores`
  --
  ALTER TABLE `stores`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT de la tabla `tables`
  --
  ALTER TABLE `tables`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT de la tabla `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  --
  -- AUTO_INCREMENT de la tabla `user_group`
  --
  ALTER TABLE `user_group`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;COMMIT;
  
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  