-- phpMyAdmin SQL Dump
-- version 5.2.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 30, 2026 at 07:49 AM
-- Server version: 10.6.28-MariaDB
-- PHP Version: 8.4.25

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 */;

--
-- Database: `BhojanPooja`
--

-- --------------------------------------------------------

--
-- Table structure for table `bills`
--

CREATE TABLE `bills` (
  `id` int(11) NOT NULL,
  `bill_no` varchar(100) NOT NULL,
  `archived_order_id` int(11) NOT NULL,
  `table_no` int(11) NOT NULL,
  `subtotal` decimal(10,2) NOT NULL,
  `ac_charge` decimal(10,2) NOT NULL DEFAULT 0.00,
  `gst` decimal(10,2) NOT NULL,
  `grand_total` decimal(10,2) NOT NULL,
  `paid_at` datetime NOT NULL,
  `waiter_id` int(11) NOT NULL DEFAULT 0,
  `admin_id` int(11) NOT NULL DEFAULT 0,
  `order_type` enum('dine_in','parcel') NOT NULL DEFAULT 'dine_in',
  `customer_name` varchar(100) DEFAULT NULL,
  `customer_mobile` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `bills`
--

INSERT INTO `bills` (`id`, `bill_no`, `archived_order_id`, `table_no`, `subtotal`, `ac_charge`, `gst`, `grand_total`, `paid_at`, `waiter_id`, `admin_id`, `order_type`, `customer_name`, `customer_mobile`) VALUES
(110, 'BILL20260630112936916', 143, 0, 155.00, 0.00, 27.90, 182.90, '2026-06-30 05:59:36', 0, 9, 'parcel', 'yash', '8320775403'),
(111, 'BILL20260630114227479', 144, 0, 480.00, 0.00, 77.76, 509.76, '2026-06-30 06:12:27', 0, 9, 'parcel', 'aryan', '9023079729'),
(112, 'BILL20260630131941862', 145, 1, 20.00, 0.00, 3.60, 23.60, '2026-06-30 07:49:41', 0, 9, 'dine_in', '', ''),
(113, 'BILL20260630153709950', 151, 9, 85.00, 8.50, 16.83, 110.33, '2026-06-30 10:07:09', 45, 9, 'dine_in', '', ''),
(114, 'BILL20260630160656535', 152, 4, 155.00, 15.50, 30.69, 201.19, '2026-06-30 10:36:56', 45, 9, '', '', ''),
(115, 'BILL20260630173313354', 154, 1, 20.00, 0.00, 3.60, 23.60, '2026-06-30 12:03:13', 0, 9, 'dine_in', '', ''),
(116, 'BILL20260701110741990', 159, 4, 85.00, 8.50, 16.83, 110.33, '2026-07-01 05:37:41', 0, 9, 'dine_in', '', ''),
(117, 'BILL20260701112054927', 160, 0, 40.00, 0.00, 7.20, 47.20, '2026-07-01 05:50:54', 0, 9, 'parcel', 'yash', '8320775403'),
(118, 'BILL20260701113750369', 162, 1, 5.00, 0.00, 0.90, 5.90, '2026-07-01 06:07:50', 0, 9, 'dine_in', '', ''),
(119, 'BILL20260701121343822', 161, 1, 490.00, 0.00, 88.20, 578.20, '2026-07-01 06:43:43', 0, 9, 'dine_in', '', ''),
(120, 'BILL20260701125737431', 163, 3, 280.00, 0.00, 50.40, 330.40, '2026-07-01 07:27:37', 0, 9, 'dine_in', '', ''),
(121, 'BILL20260701125848219', 164, 4, 105.00, 10.50, 20.79, 136.29, '2026-07-01 07:28:48', 30, 9, '', '', ''),
(122, 'BILL20260701140632701', 165, 4, 20.00, 2.00, 3.96, 25.96, '2026-07-01 08:36:32', 0, 9, 'dine_in', '', ''),
(123, 'BILL20260709122832163', 166, 1, 245.00, 0.00, 44.10, 289.10, '2026-07-09 06:58:32', 0, 9, 'dine_in', '', ''),
(124, 'BILL20260810153802788', 173, 6, 100.00, 10.00, 19.80, 129.80, '2026-08-10 10:08:02', 0, 9, 'dine_in', '', ''),
(125, 'BILL20260810153807147', 168, 1, 130.00, 0.00, 23.40, 153.40, '2026-08-10 10:08:07', 0, 9, 'dine_in', 'Abc', '9876543210');

-- --------------------------------------------------------

--
-- Table structure for table `business_information`
--

CREATE TABLE `business_information` (
  `id` int(11) NOT NULL,
  `store_name` varchar(255) NOT NULL,
  `address` text NOT NULL,
  `phone_number` varchar(20) NOT NULL,
  `gst_number` varchar(50) NOT NULL,
  `fssai_number` varchar(50) NOT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `business_information`
--

INSERT INTO `business_information` (`id`, `store_name`, `address`, `phone_number`, `gst_number`, `fssai_number`, `updated_at`) VALUES
(2, 'Bhojan Pooja', 'Ahmedabad, Gujarat', '9876543210', '24ABCDE1234F1Z5', '12345678901234', '2026-08-10 09:15:33');

-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(11) NOT NULL,
  `category_name` varchar(255) DEFAULT NULL,
  `color` varchar(20) DEFAULT '#ff7a00',
  `value` int(11) DEFAULT 0,
  `user_id` int(11) DEFAULT NULL,
  `admin_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `category_name`, `color`, `value`, `user_id`, `admin_id`) VALUES
(1, 'Fast Food', '#ff7a00', 0, NULL, 0),
(7, 'Beverages', '#ff7a00', 0, NULL, 0),
(14, 'Desserts', '#ff7a00', 0, NULL, 0),
(19, 'Main Course', '#ff7a00', 0, NULL, 0),
(33, 'food', '#ff7a00', 0, NULL, 39),
(37, 'veg', '#ff7a00', 0, NULL, 9),
(40, 'non-vage', '#ff7a00', 0, NULL, 9),
(41, 'stater', '#ff7a00', 0, NULL, 9),
(42, 'Snacks', '#ff7a00', 0, NULL, 9);

-- --------------------------------------------------------

--
-- Table structure for table `client_modules`
--

CREATE TABLE `client_modules` (
  `id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `module_key` varchar(100) NOT NULL,
  `module_name` varchar(150) NOT NULL,
  `module_path` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `access_mode` enum('single','all') NOT NULL DEFAULT 'single'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `client_modules`
--

INSERT INTO `client_modules` (`id`, `client_id`, `module_key`, `module_name`, `module_path`, `is_active`, `created_at`, `access_mode`) VALUES
(1, 12, '', 'billing', 'user/modules//index.php', 1, '2026-04-17 06:50:22', 'single'),
(2, 14, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-04-17 08:40:32', 'single'),
(3, 14, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-04-17 08:40:33', 'single'),
(4, 14, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-04-17 08:40:33', 'single'),
(5, 14, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-04-17 08:40:33', 'single'),
(6, 15, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-04-17 09:52:39', 'single'),
(7, 15, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-04-17 09:52:39', 'single'),
(8, 15, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-04-17 09:52:39', 'single'),
(9, 15, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-04-17 09:52:39', 'single'),
(10, 15, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-04-17 09:52:39', 'single'),
(11, 15, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-04-17 09:52:39', 'single'),
(12, 15, 'payroll', 'Payroll', 'user/modules/payroll/index.php', 1, '2026-04-17 09:52:39', 'single'),
(13, 15, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-04-17 09:52:39', 'single'),
(14, 15, 'reports', 'Reports', 'user/modules/reports/index.php', 1, '2026-04-17 09:52:39', 'single'),
(15, 15, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-04-17 09:52:39', 'single'),
(16, 15, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-04-17 09:52:39', 'single'),
(17, 15, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-04-17 09:52:39', 'single'),
(18, 15, 'kitchen_ready', 'Ready Orders', 'user/modules/kitchen_ready/index.php', 1, '2026-04-17 09:52:39', 'single'),
(19, 15, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-04-17 09:52:39', 'single'),
(20, 15, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-04-17 09:52:39', 'single'),
(21, 15, 'waiter_order', 'New Order', 'user/modules/waiter_order/index.php', 1, '2026-04-17 09:52:39', 'single'),
(22, 15, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-04-17 09:52:39', 'single'),
(23, 15, 'waiter_profile', 'Profile', 'user/modules/waiter_profile/index.php', 1, '2026-04-17 09:52:39', 'single'),
(24, 15, 'user_home', 'Home', 'user/modules/user_home/index.php', 1, '2026-04-17 09:52:39', 'single'),
(25, 15, 'user_menu', 'Menu', 'user/modules/user_menu/index.php', 1, '2026-04-17 09:52:39', 'single'),
(26, 15, 'user_cart', 'Cart', 'user/modules/user_cart/index.php', 1, '2026-04-17 09:52:39', 'single'),
(27, 15, 'user_book', 'Book Table', 'user/modules/user_book/index.php', 1, '2026-04-17 09:52:39', 'single'),
(28, 15, 'user_orders', 'Orders', 'user/modules/user_orders/index.php', 1, '2026-04-17 09:52:39', 'single'),
(29, 21, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-04-17 10:44:35', 'single'),
(30, 21, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-04-17 10:44:35', 'single'),
(31, 21, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-04-17 10:44:35', 'single'),
(32, 21, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-04-17 10:44:35', 'single'),
(33, 21, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-04-17 10:44:35', 'single'),
(34, 21, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-04-17 10:44:35', 'single'),
(35, 21, 'payroll', 'Payroll', 'user/modules/payroll/index.php', 1, '2026-04-17 10:44:35', 'single'),
(36, 21, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-04-17 10:44:35', 'single'),
(37, 21, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-04-17 10:44:35', 'single'),
(38, 21, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-04-17 10:44:35', 'single'),
(39, 21, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-04-17 10:44:35', 'single'),
(40, 21, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-04-17 10:44:35', 'single'),
(41, 21, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-04-17 10:44:35', 'single'),
(42, 21, 'waiter_order', 'New Order', 'user/modules/waiter_order/index.php', 1, '2026-04-17 10:44:35', 'single'),
(43, 21, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-04-17 10:44:35', 'single'),
(44, 23, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-04-17 10:51:15', 'single'),
(45, 23, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-04-17 10:51:15', 'single'),
(46, 23, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-04-17 10:51:15', 'single'),
(47, 23, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-04-17 10:51:15', 'single'),
(48, 23, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-04-17 10:51:15', 'single'),
(49, 23, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-04-17 10:51:15', 'single'),
(50, 23, 'payroll', 'Payroll', 'user/modules/payroll/index.php', 1, '2026-04-17 10:51:15', 'single'),
(51, 23, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-04-17 10:51:15', 'single'),
(52, 23, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-04-17 10:51:15', 'single'),
(53, 23, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-04-17 10:51:15', 'single'),
(54, 23, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-04-17 10:51:15', 'single'),
(55, 23, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-04-17 10:51:15', 'single'),
(56, 23, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-04-17 10:51:15', 'single'),
(57, 23, 'waiter_order', 'New Order', 'user/modules/waiter_order/index.php', 1, '2026-04-17 10:51:15', 'single'),
(58, 23, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-04-17 10:51:15', 'single'),
(59, 27, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-04-20 06:54:44', 'single'),
(60, 27, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-04-20 06:54:44', 'single'),
(61, 27, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-04-20 06:54:44', 'single'),
(62, 27, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-04-20 06:54:44', 'single'),
(63, 27, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-04-20 06:54:44', 'single'),
(64, 27, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-04-20 06:54:44', 'single'),
(65, 27, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-04-20 06:54:44', 'single'),
(66, 27, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-04-20 06:54:44', 'single'),
(67, 27, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-04-20 06:54:44', 'single'),
(68, 27, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-04-20 06:54:44', 'single'),
(69, 27, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-04-20 06:54:44', 'single'),
(70, 27, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-04-20 06:54:44', 'single'),
(71, 27, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-04-20 06:54:44', 'single'),
(72, 9, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-04-21 05:29:25', 'single'),
(73, 9, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-04-21 05:29:25', 'single'),
(74, 9, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-04-21 05:29:25', 'single'),
(75, 9, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-04-21 05:29:25', 'single'),
(76, 9, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-04-21 05:29:25', 'single'),
(77, 9, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-04-21 05:29:25', 'single'),
(78, 9, 'payroll', 'Payroll', 'user/modules/payroll/index.php', 1, '2026-04-21 05:29:25', 'single'),
(79, 9, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-04-21 05:29:25', 'single'),
(80, 9, 'reports', 'Reports', 'user/modules/reports/index.php', 1, '2026-04-21 05:29:25', 'single'),
(81, 9, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-04-21 05:29:25', 'single'),
(82, 9, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-04-21 05:29:25', 'single'),
(83, 9, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-04-21 05:29:25', 'single'),
(84, 9, 'kitchen_ready', 'Ready Orders', 'user/modules/kitchen_ready/index.php', 1, '2026-04-21 05:29:25', 'single'),
(85, 9, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-04-21 05:29:25', 'single'),
(86, 9, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-04-21 05:29:25', 'single'),
(87, 9, 'waiter_order', 'New Order', 'user/modules/waiter_order/index.php', 1, '2026-04-21 05:29:25', 'single'),
(88, 9, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-04-21 05:29:25', 'single'),
(89, 9, 'waiter_profile', 'Profile', 'user/modules/waiter_profile/index.php', 1, '2026-04-21 05:29:25', 'single'),
(90, 9, 'user_home', 'Home', 'user/modules/user_home/index.php', 1, '2026-04-21 05:29:25', 'single'),
(91, 9, 'user_menu', 'Menu', 'user/modules/user_menu/index.php', 1, '2026-04-21 05:29:25', 'single'),
(92, 9, 'user_cart', 'Cart', 'user/modules/user_cart/index.php', 1, '2026-04-21 05:29:25', 'single'),
(93, 9, 'user_book', 'Book Table', 'user/modules/user_book/index.php', 1, '2026-04-21 05:29:25', 'single'),
(94, 9, 'user_orders', 'Orders', 'user/modules/user_orders/index.php', 1, '2026-04-21 05:29:25', 'single'),
(95, 9, 'kitchen_usage', '', '', 1, '2026-04-21 06:09:12', 'single'),
(96, 32, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-04-23 06:45:32', 'single'),
(97, 32, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-04-23 06:45:32', 'single'),
(98, 32, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-04-23 06:45:32', 'single'),
(99, 32, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-04-23 06:45:32', 'single'),
(100, 32, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-04-23 06:45:32', 'single'),
(101, 32, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-04-23 06:45:32', 'single'),
(102, 32, 'payroll', 'Payroll', 'user/modules/payroll/index.php', 1, '2026-04-23 06:45:32', 'single'),
(103, 32, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-04-23 06:45:32', 'single'),
(104, 32, 'reports', 'Reports', 'user/modules/reports/index.php', 1, '2026-04-23 06:45:32', 'single'),
(105, 32, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-04-23 06:45:32', 'single'),
(106, 32, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-04-23 06:45:32', 'single'),
(107, 32, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-04-23 06:45:32', 'single'),
(108, 32, 'kitchen_ready', 'Ready Orders', 'user/modules/kitchen_ready/index.php', 1, '2026-04-23 06:45:32', 'single'),
(109, 32, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-04-23 06:45:32', 'single'),
(110, 32, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-04-23 06:45:32', 'single'),
(111, 32, 'waiter_order', 'New Order', 'user/modules/waiter_order/index.php', 1, '2026-04-23 06:45:32', 'single'),
(112, 32, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-04-23 06:45:32', 'single'),
(113, 32, 'waiter_profile', 'Profile', 'user/modules/waiter_profile/index.php', 1, '2026-04-23 06:45:32', 'single'),
(114, 32, 'user_home', 'Home', 'user/modules/user_home/index.php', 1, '2026-04-23 06:45:32', 'single'),
(115, 32, 'user_menu', 'Menu', 'user/modules/user_menu/index.php', 1, '2026-04-23 06:45:32', 'single'),
(116, 32, 'user_cart', 'Cart', 'user/modules/user_cart/index.php', 1, '2026-04-23 06:45:32', 'single'),
(117, 32, 'user_book', 'Book Table', 'user/modules/user_book/index.php', 1, '2026-04-23 06:45:32', 'single'),
(118, 32, 'user_orders', 'Orders', 'user/modules/user_orders/index.php', 1, '2026-04-23 06:45:32', 'single'),
(119, 32, 'kitchen_usage', 'Daily Usage', 'user/modules/kitchen_usage/index.php', 1, '2026-04-23 06:45:32', 'single'),
(120, 35, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-04-24 07:34:49', 'single'),
(121, 35, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-04-24 07:34:49', 'single'),
(122, 35, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-04-24 07:34:49', 'single'),
(123, 35, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-04-24 07:34:49', 'single'),
(124, 35, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-04-24 07:34:49', 'single'),
(125, 35, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-04-24 07:34:49', 'single'),
(126, 35, 'payroll', 'Payroll', 'user/modules/payroll/index.php', 1, '2026-04-24 07:34:49', 'single'),
(127, 35, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-04-24 07:34:49', 'single'),
(128, 35, 'reports', 'Reports', 'user/modules/reports/index.php', 1, '2026-04-24 07:34:49', 'single'),
(129, 35, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-04-24 07:34:49', 'single'),
(130, 35, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-04-24 07:34:49', 'single'),
(131, 35, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-04-24 07:34:49', 'single'),
(132, 35, 'kitchen_ready', 'Ready Orders', 'user/modules/kitchen_ready/index.php', 1, '2026-04-24 07:34:49', 'single'),
(133, 35, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-04-24 07:34:49', 'single'),
(134, 35, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-04-24 07:34:49', 'single'),
(135, 35, 'waiter_order', 'New Order', 'user/modules/waiter_order/index.php', 1, '2026-04-24 07:34:49', 'single'),
(136, 35, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-04-24 07:34:49', 'single'),
(137, 35, 'waiter_profile', 'Profile', 'user/modules/waiter_profile/index.php', 1, '2026-04-24 07:34:49', 'single'),
(138, 35, 'user_home', 'Home', 'user/modules/user_home/index.php', 1, '2026-04-24 07:34:49', 'single'),
(139, 35, 'user_menu', 'Menu', 'user/modules/user_menu/index.php', 1, '2026-04-24 07:34:49', 'single'),
(140, 35, 'user_cart', 'Cart', 'user/modules/user_cart/index.php', 1, '2026-04-24 07:34:49', 'single'),
(141, 35, 'user_book', 'Book Table', 'user/modules/user_book/index.php', 1, '2026-04-24 07:34:49', 'single'),
(142, 35, 'user_orders', 'Orders', 'user/modules/user_orders/index.php', 1, '2026-04-24 07:34:49', 'single'),
(143, 35, 'kitchen_usage', 'Daily Usage', 'user/modules/kitchen_usage/index.php', 1, '2026-04-24 07:34:49', 'single'),
(144, 38, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-05-06 06:02:54', 'single'),
(145, 38, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-05-06 06:02:54', 'single'),
(146, 38, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-05-06 06:02:54', 'single'),
(147, 38, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-05-06 06:02:54', 'single'),
(148, 38, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-05-06 06:02:54', 'single'),
(149, 38, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-05-06 06:02:54', 'single'),
(150, 38, 'payroll', 'Payroll', 'user/modules/payroll/index.php', 1, '2026-05-06 06:02:54', 'single'),
(151, 38, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-05-06 06:02:54', 'single'),
(152, 38, 'reports', 'Reports', 'user/modules/reports/index.php', 1, '2026-05-06 06:02:54', 'single'),
(153, 38, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-05-06 06:02:54', 'single'),
(154, 38, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-05-06 06:02:54', 'single'),
(155, 38, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-05-06 06:02:54', 'single'),
(156, 38, 'kitchen_ready', 'Ready Orders', 'user/modules/kitchen_ready/index.php', 1, '2026-05-06 06:02:54', 'single'),
(157, 38, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-05-06 06:02:54', 'single'),
(158, 38, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-05-06 06:02:54', 'single'),
(159, 38, 'waiter_order', 'New Order', 'user/modules/waiter_order/index.php', 1, '2026-05-06 06:02:54', 'single'),
(160, 38, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-05-06 06:02:54', 'single'),
(161, 38, 'waiter_profile', 'Profile', 'user/modules/waiter_profile/index.php', 1, '2026-05-06 06:02:54', 'single'),
(162, 38, 'user_home', 'Home', 'user/modules/user_home/index.php', 1, '2026-05-06 06:02:54', 'single'),
(163, 38, 'user_menu', 'Menu', 'user/modules/user_menu/index.php', 1, '2026-05-06 06:02:54', 'single'),
(164, 38, 'user_cart', 'Cart', 'user/modules/user_cart/index.php', 1, '2026-05-06 06:02:54', 'single'),
(165, 38, 'user_book', 'Book Table', 'user/modules/user_book/index.php', 1, '2026-05-06 06:02:54', 'single'),
(166, 38, 'user_orders', 'Orders', 'user/modules/user_orders/index.php', 1, '2026-05-06 06:02:54', 'single'),
(167, 38, 'kitchen_usage', 'Daily Usage', 'user/modules/kitchen_usage/index.php', 1, '2026-05-06 06:02:54', 'single'),
(168, 38, 'coupons', 'Coupon Module', 'user/modules/coupons/index.php', 1, '2026-05-06 06:02:54', 'single'),
(169, 39, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-05-06 06:49:12', 'single'),
(170, 39, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-05-06 06:49:12', 'single'),
(171, 39, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-05-06 06:49:12', 'single'),
(172, 39, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-05-06 06:49:12', 'single'),
(173, 39, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-05-06 06:49:12', 'single'),
(174, 39, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-05-06 06:49:12', 'single'),
(175, 39, 'payroll', 'Payroll', 'user/modules/payroll/index.php', 1, '2026-05-06 06:49:12', 'single'),
(176, 39, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-05-06 06:49:12', 'single'),
(177, 39, 'reports', 'Reports', 'user/modules/reports/index.php', 1, '2026-05-06 06:49:12', 'single'),
(178, 39, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-05-06 06:49:12', 'single'),
(179, 39, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-05-06 06:49:12', 'single'),
(180, 39, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-05-06 06:49:12', 'single'),
(181, 39, 'kitchen_ready', 'Ready Orders', 'user/modules/kitchen_ready/index.php', 1, '2026-05-06 06:49:12', 'single'),
(182, 39, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-05-06 06:49:12', 'single'),
(183, 39, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-05-06 06:49:12', 'single'),
(184, 39, 'waiter_order', 'New Order', 'user/modules/waiter_order/index.php', 1, '2026-05-06 06:49:12', 'single'),
(185, 39, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-05-06 06:49:12', 'single'),
(186, 39, 'waiter_profile', 'Profile', 'user/modules/waiter_profile/index.php', 1, '2026-05-06 06:49:12', 'single'),
(187, 39, 'user_home', 'Home', 'user/modules/user_home/index.php', 1, '2026-05-06 06:49:12', 'single'),
(188, 39, 'user_menu', 'Menu', 'user/modules/user_menu/index.php', 1, '2026-05-06 06:49:12', 'single'),
(189, 39, 'user_cart', 'Cart', 'user/modules/user_cart/index.php', 1, '2026-05-06 06:49:12', 'single'),
(190, 39, 'user_book', 'Book Table', 'user/modules/user_book/index.php', 1, '2026-05-06 06:49:12', 'single'),
(191, 39, 'user_orders', 'Orders', 'user/modules/user_orders/index.php', 1, '2026-05-06 06:49:12', 'single'),
(192, 39, 'kitchen_usage', 'Daily Usage', 'user/modules/kitchen_usage/index.php', 1, '2026-05-06 06:49:12', 'single'),
(193, 39, 'coupons', 'Coupon Module', 'user/modules/coupons/index.php', 1, '2026-05-06 06:49:12', 'single'),
(194, 40, 'dashboard_main', 'Dashboard', 'user/modules/dashboard_main/index.php', 1, '2026-05-07 09:34:30', 'single'),
(195, 40, 'tables', 'Tables', 'user/modules/tables/index.php', 1, '2026-05-07 09:34:30', 'single'),
(196, 40, 'menu', 'Menu Items', 'user/modules/menu/index.php', 1, '2026-05-07 09:34:30', 'single'),
(197, 40, 'inventory', 'Inventory', 'user/modules/inventory/index.php', 1, '2026-05-07 09:34:30', 'single'),
(198, 40, 'kitchen_kds', 'Kitchen (KDS)', 'user/modules/kitchen_kds/index.php', 1, '2026-05-07 09:34:30', 'single'),
(199, 40, 'staff', 'Staff', 'user/modules/staff/index.php', 1, '2026-05-07 09:34:30', 'single'),
(200, 40, 'payroll', 'Payroll', 'user/modules/payroll/index.php', 1, '2026-05-07 09:34:30', 'single'),
(201, 40, 'expenses', 'Expenses', 'user/modules/expenses/index.php', 1, '2026-05-07 09:34:30', 'single'),
(202, 40, 'reports', 'Reports', 'user/modules/reports/index.php', 1, '2026-05-07 09:34:30', 'single'),
(203, 40, 'tax', 'Tax', 'user/modules/tax/index.php', 1, '2026-05-07 09:34:30', 'single'),
(204, 40, 'kitchen_dashboard', 'Dashboard', 'user/modules/kitchen_dashboard/index.php', 1, '2026-05-07 09:34:30', 'single'),
(205, 40, 'kitchen_orders', 'New Orders', 'user/modules/kitchen_orders/index.php', 1, '2026-05-07 09:34:30', 'single'),
(206, 40, 'kitchen_ready', 'Ready Orders', 'user/modules/kitchen_ready/index.php', 1, '2026-05-07 09:34:30', 'single'),
(207, 40, 'waiter_dashboard', 'Dashboard', 'user/modules/waiter_dashboard/index.php', 1, '2026-05-07 09:34:30', 'single'),
(208, 40, 'waiter_tables', 'Tables', 'user/modules/waiter_tables/index.php', 1, '2026-05-07 09:34:30', 'single'),
(209, 40, 'waiter_order', 'New Order', 'user/modules/waiter_order/index.php', 1, '2026-05-07 09:34:30', 'single'),
(210, 40, 'waiter_billing', 'Billing', 'user/modules/waiter_billing/index.php', 1, '2026-05-07 09:34:30', 'single'),
(211, 40, 'waiter_profile', 'Profile', 'user/modules/waiter_profile/index.php', 1, '2026-05-07 09:34:30', 'single'),
(212, 40, 'user_home', 'Home', 'user/modules/user_home/index.php', 1, '2026-05-07 09:34:30', 'single'),
(213, 40, 'user_menu', 'Menu', 'user/modules/user_menu/index.php', 1, '2026-05-07 09:34:30', 'single'),
(214, 40, 'user_cart', 'Cart', 'user/modules/user_cart/index.php', 1, '2026-05-07 09:34:30', 'single'),
(215, 40, 'user_book', 'Book Table', 'user/modules/user_book/index.php', 1, '2026-05-07 09:34:30', 'single'),
(216, 40, 'user_orders', 'Orders', 'user/modules/user_orders/index.php', 1, '2026-05-07 09:34:30', 'single'),
(217, 40, 'kitchen_usage', 'Daily Usage', 'user/modules/kitchen_usage/index.php', 1, '2026-05-07 09:34:30', 'single'),
(218, 40, 'coupons', 'Coupon Module', 'user/modules/coupons/index.php', 1, '2026-05-07 09:34:30', 'single'),
(219, 9, 'order', 'order', '/order', 1, '2026-06-29 10:53:35', 'single'),
(220, 9, 'billing', 'Billing', '/src/pages/Billing.php', 1, '2026-06-29 12:13:46', 'single'),
(221, 9, 'business_information', 'Business Information', '/src/pages/business_information.php', 1, '2026-06-30 06:04:54', 'single');

-- --------------------------------------------------------

--
-- Table structure for table `coupons`
--

CREATE TABLE `coupons` (
  `id` int(11) NOT NULL,
  `code` varchar(100) NOT NULL,
  `discount_type` enum('percent','flat') NOT NULL,
  `discount_value` decimal(10,2) NOT NULL,
  `max_usage` int(11) NOT NULL DEFAULT 1,
  `used_count` int(11) NOT NULL DEFAULT 0,
  `plan_name` varchar(100) DEFAULT NULL,
  `expiry_date` date NOT NULL,
  `status` enum('active','inactive') DEFAULT 'active',
  `description` text DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `coupons`
--

INSERT INTO `coupons` (`id`, `code`, `discount_type`, `discount_value`, `max_usage`, `used_count`, `plan_name`, `expiry_date`, `status`, `description`, `created_at`, `admin_id`) VALUES
(3, 'HAPPY37', 'percent', 5.00, 99, 0, 'One Time Plan', '2026-05-09', 'active', '', '2026-05-06 12:23:11', 0),
(4, 'HAPPY37', 'percent', 10.00, 100, 0, '', '2026-05-09', 'active', '', '2026-05-07 15:29:29', 39);

-- --------------------------------------------------------

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `category` varchar(100) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `date` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `expenses`
--

INSERT INTO `expenses` (`id`, `title`, `category`, `amount`, `date`, `created_at`, `admin_id`) VALUES
(1, 'Table 15 Sale', 'Sales', 947.10, '2025-12-25', '2025-12-25 07:43:00', 0),
(2, 'Table 2 Sale', 'Sales', 2310.00, '2025-12-25', '2025-12-25 08:06:03', 0),
(3, 'Table 13 Sale', 'Sales', 1062.60, '2025-12-29', '2025-12-29 07:26:21', 0),
(4, 'Table 10 Sale', 'Sales', 1176.00, '2025-12-29', '2025-12-29 09:29:28', 0),
(5, 'Table 15 Sale', 'Sales', 323.40, '2025-12-30', '2025-12-30 10:45:51', 0),
(6, 'Table 2 Sale', 'Sales', 441.00, '2026-01-05', '2026-01-05 08:20:27', 0),
(7, 'Table 2 Sale', 'Sales', 1333.50, '2026-01-05', '2026-01-05 08:20:41', 0),
(8, 'Table 15 Sale', 'Sales', 1041.81, '2026-01-05', '2026-01-05 08:24:58', 0),
(9, 'Table 13 Sale', 'Sales', 462.00, '2026-04-16', '2026-04-16 10:22:15', 0),
(10, 'Table 4 Sale', 'Sales', 118.00, '2026-05-27', '2026-05-27 07:40:22', 0),
(11, 'Table 4 Sale', 'Sales', 118.00, '2026-05-27', '2026-05-27 07:58:10', 0),
(12, 'Table 4 Sale', 'Sales', 118.00, '2026-05-27', '2026-05-27 07:59:04', 0),
(13, 'Table 4 Sale', 'Sales', 236.00, '2026-05-27', '2026-05-27 08:04:11', 0),
(14, 'Table 1 Sale', 'Sales', 118.00, '2026-05-27', '2026-05-27 08:05:12', 0),
(15, 'Table 1 Sale', 'Sales', 118.00, '2026-05-27', '2026-05-27 08:40:55', 9),
(16, 'Table 4 Sale', 'Sales', 118.00, '2026-05-27', '2026-05-27 09:13:19', 9),
(17, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 06:14:16', 9),
(18, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 06:16:42', 9),
(19, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 06:23:58', 9),
(20, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 06:24:34', 9),
(21, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 06:24:34', 9),
(22, 'Table 4 Sale', 'Sales', 236.00, '2026-05-28', '2026-05-28 06:41:45', 9),
(23, 'Table 4 Sale', 'Sales', 236.00, '2026-05-28', '2026-05-28 07:17:12', 9),
(24, 'Table 4 Sale', 'Sales', 236.00, '2026-05-28', '2026-05-28 07:20:12', 9),
(25, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:27:08', 9),
(26, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:29:08', 9),
(27, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:29:49', 9),
(28, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:30:43', 9),
(29, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:34:10', 9),
(30, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:35:37', 9),
(31, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:36:19', 9),
(32, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:36:19', 9),
(33, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:36:41', 9),
(34, 'Table 4 Sale', 'Sales', 118.00, '2026-05-28', '2026-05-28 07:41:30', 9),
(35, 'Table 4 Sale', 'Sales', 116.00, '2026-05-28', '2026-05-28 09:28:28', 9),
(36, 'Table 4 Sale', 'Sales', 116.00, '2026-05-28', '2026-05-28 09:31:48', 9),
(37, 'Table 1 Sale', 'Sales', 116.00, '2026-05-28', '2026-05-28 10:19:00', 9),
(38, 'Table 4 Sale', 'Sales', 116.00, '2026-05-28', '2026-05-28 10:29:53', 9),
(39, 'Table 4 Sale', 'Sales', 116.00, '2026-05-28', '2026-05-28 10:32:40', 9),
(40, 'Table 1 Sale', 'Sales', 232.00, '2026-05-28', '2026-05-28 10:38:20', 9),
(41, 'Table 1 Sale', 'Sales', 232.00, '2026-05-28', '2026-05-28 10:41:57', 9),
(42, 'Table 4 Sale', 'Sales', 116.00, '2026-05-28', '2026-05-28 12:01:40', 9),
(43, 'Table 4 Sale', 'Sales', 116.00, '2026-05-28', '2026-05-28 12:02:24', 9),
(44, 'Table 5 Sale', 'Sales', 116.00, '2026-05-28', '2026-05-28 12:05:53', 9),
(45, 'Table 4 Sale', 'Sales', 116.00, '2026-05-29', '2026-05-29 06:30:51', 9),
(46, 'Table 2 Sale', 'Sales', 212.40, '2026-06-02', '2026-06-02 08:29:34', 9),
(47, 'Table 5 Sale', 'Sales', 177.00, '2026-06-12', '2026-06-12 09:14:41', 9),
(48, 'Table 5 Sale', 'Sales', 531.00, '2026-06-12', '2026-06-12 09:47:29', 9),
(49, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 06:11:41', 9),
(50, 'Table 4 Sale', 'Sales', 413.00, '2026-06-18', '2026-06-18 06:12:29', 9),
(51, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 09:07:38', 9),
(52, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 09:07:51', 9),
(53, 'Table 1 Sale', 'Sales', 118.00, '2026-06-18', '2026-06-18 09:11:13', 9),
(54, 'Table 4 Sale', 'Sales', 413.00, '2026-06-18', '2026-06-18 09:19:23', 9),
(55, 'Table 4 Sale', 'Sales', 531.00, '2026-06-18', '2026-06-18 09:20:17', 9),
(56, 'Table 4 Sale', 'Sales', 531.00, '2026-06-18', '2026-06-18 09:22:15', 9),
(57, 'Table 1 Sale', 'Sales', 295.00, '2026-06-18', '2026-06-18 09:26:16', 9),
(58, 'Table 5 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 09:36:14', 9),
(59, 'Table 5 Sale', 'Sales', 354.00, '2026-06-18', '2026-06-18 09:36:28', 9),
(60, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 09:38:19', 9),
(61, 'Table 9 Sale', 'Sales', 295.00, '2026-06-18', '2026-06-18 09:43:36', 9),
(62, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 09:44:01', 9),
(63, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 09:51:32', 9),
(64, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 09:51:39', 9),
(65, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 10:06:59', 9),
(66, 'Table 4 Sale', 'Sales', 118.00, '2026-06-18', '2026-06-18 10:07:05', 9),
(67, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 10:22:32', 9),
(68, 'Table 4 Sale', 'Sales', 236.00, '2026-06-18', '2026-06-18 10:22:36', 9),
(69, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 10:22:39', 9),
(70, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 10:22:43', 9),
(71, 'Table 4 Sale', 'Sales', 118.00, '2026-06-18', '2026-06-18 10:26:19', 9),
(72, 'Table 4 Sale', 'Sales', 118.00, '2026-06-18', '2026-06-18 10:26:40', 9),
(73, 'Table 4 Sale', 'Sales', 177.00, '2026-06-18', '2026-06-18 11:00:24', 9),
(74, 'Table 4 Sale', 'Sales', 177.00, '2026-06-19', '2026-06-19 05:28:05', 9),
(75, 'Table 4 Sale', 'Sales', 472.00, '2026-06-19', '2026-06-19 05:28:11', 9),
(76, 'Table 4 Sale', 'Sales', 177.00, '2026-06-19', '2026-06-19 05:36:15', 9),
(77, 'Table 4 Sale', 'Sales', 354.00, '2026-06-19', '2026-06-19 05:48:10', 9),
(78, 'Table 4 Sale', 'Sales', 177.00, '2026-06-19', '2026-06-19 05:59:58', 9);

-- --------------------------------------------------------

--
-- Table structure for table `inventory_categories`
--

CREATE TABLE `inventory_categories` (
  `id` int(11) NOT NULL,
  `category_name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `inventory_categories`
--

INSERT INTO `inventory_categories` (`id`, `category_name`, `created_at`, `admin_id`) VALUES
(2, 'Vegetables', '2025-12-30 08:08:56', 0),
(3, 'Grains & Staples', '2025-12-30 08:09:47', 0),
(4, 'Spices & Masala', '2025-12-30 08:10:10', 0),
(5, 'Oils & Fats', '2025-12-30 08:10:21', 0),
(6, 'Dairy Products', '2025-12-30 08:10:29', 0),
(7, 'Others / Essentials', '2025-12-30 08:10:49', 0),
(12, 'Dairy Products', '2026-05-07 07:42:19', 39),
(14, 'veg', '2026-05-20 10:47:11', 9),
(15, 'non-veg', '2026-05-20 10:52:30', 9),
(19, 'starter', '2026-06-12 09:33:20', 9);

-- --------------------------------------------------------

--
-- Table structure for table `inventory_items`
--

CREATE TABLE `inventory_items` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `current_stock` decimal(10,2) DEFAULT NULL,
  `unit` varchar(20) DEFAULT NULL,
  `category` varchar(100) DEFAULT NULL,
  `min_stock` decimal(10,2) DEFAULT 5.00,
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `inventory_items`
--

INSERT INTO `inventory_items` (`id`, `name`, `current_stock`, `unit`, `category`, `min_stock`, `admin_id`) VALUES
(1, 'Basmati Rice', 4.00, 'kg', '', 5.00, 0),
(6, 'Onions', 50.00, 'kg', NULL, 5.00, 0),
(10, 'Cooking Oil', 5.00, 'L', '', 10.00, 0),
(16, 'paneer', 5.00, 'kg', '', 5.00, 0),
(17, 'Regular Rice', 20.00, 'kg', 'Grains & Staples', 5.00, 0),
(18, 'Potatoes', 4.00, 'kg', 'Vegetables', 5.00, 0),
(19, 'Garam Masala', 1.00, 'g', 'Spices & Masala', 5.00, 0),
(21, 'milk', 30.00, 'L', 'Dairy Products', 5.00, 39),
(22, 'pasta', 10.00, 'kg', 'veg', 5.00, 9),
(24, 'raice', 40.00, 'kg', '', 5.00, 9),
(26, 'Suop', 50.00, 'L', 'starter', 5.00, 9),
(31, 'Paubhaji', 1.00, 'kg', 'veg', 5.00, 9);

-- --------------------------------------------------------

--
-- Table structure for table `kitchen_usage`
--

CREATE TABLE `kitchen_usage` (
  `id` int(11) NOT NULL,
  `item_id` int(11) DEFAULT NULL,
  `used_qty` decimal(10,2) DEFAULT NULL,
  `used_date` datetime DEFAULT NULL,
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `kitchen_usage`
--

INSERT INTO `kitchen_usage` (`id`, `item_id`, `used_qty`, `used_date`, `admin_id`) VALUES
(1, 18, 1.00, '2026-04-21 12:25:47', 0),
(2, 18, 1.00, '2026-04-21 12:47:45', 0),
(3, 18, 1.00, '2026-04-21 13:04:43', 0),
(4, 18, 1.00, '2026-04-21 13:05:25', 0),
(5, 18, 1.00, '2026-04-21 13:05:43', 0),
(6, 22, 10.00, '2026-06-02 08:07:46', 9),
(7, 24, 10.00, '2026-06-02 08:28:41', 9),
(8, 27, 5.00, '2026-08-10 09:57:42', 9),
(9, 22, 10.00, '2026-08-19 10:17:50', 9);

-- --------------------------------------------------------

--
-- Table structure for table `menu_items`
--

CREATE TABLE `menu_items` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `price` int(11) DEFAULT NULL,
  `image` text DEFAULT NULL,
  `category` varchar(255) DEFAULT NULL,
  `prep_time` int(11) DEFAULT 5,
  `admin_id` int(11) NOT NULL DEFAULT 0,
  `image_size_kb` varchar(20) DEFAULT NULL,
  `image_size_mb` varchar(20) DEFAULT NULL,
  `image_width` int(11) DEFAULT NULL,
  `image_height` int(11) DEFAULT NULL,
  `unit` varchar(20) DEFAULT 'Plate',
  `gram` decimal(10,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `menu_items`
--

INSERT INTO `menu_items` (`id`, `name`, `price`, `image`, `category`, `prep_time`, `admin_id`, `image_size_kb`, `image_size_mb`, `image_width`, `image_height`, `unit`, `gram`) VALUES
(53, 'Khaman', 400, '1782714543_khaman.jpg', 'Snacks', 5, 9, '9.41', '0.01', 270, 148, 'Kg', 0.00),
(73, 'Bread', 5, 'bread.jpg', 'Bakery', 5, 9, NULL, NULL, NULL, NULL, 'Piece', 0.00),
(74, 'Rotla', 40, 'rotla.jpg', 'Roti', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(75, 'Papad', 15, 'papad.jpg', 'Snacks', 5, 9, NULL, NULL, NULL, NULL, 'Piece', 0.00),
(76, 'Dahi', 20, 'dahi.jpg', 'Dairy', 5, 9, NULL, NULL, NULL, NULL, 'Piece', 0.00),
(77, 'Butter Milk', 20, 'buttermilk.jpg', 'Beverages', 5, 9, NULL, NULL, NULL, NULL, 'Piece', 0.00),
(78, 'Lasan nu Saak', 220, 'lasan_nu_saak.jpg', 'Vegetable', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(79, 'Cheese Aloo Parotha', 100, 'cheese_aloo_parotha.jpg', 'Paratha', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(80, 'Aloo Parotha', 80, 'aloo_parotha.jpg', 'Paratha', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(81, 'Totha Ni Plate', 160, 'totha_plate.jpg', 'Gujarati', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(82, 'French Fries', 70, 'french_fries.jpg', 'Fast Food', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(83, 'Bharela Marcha Na Bhajiya', 70, 'bharela_marcha.jpg', 'Snacks', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(84, 'Marcha Na Patti Bhajiya', 70, 'marcha_patti.jpg', 'Snacks', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(85, 'Patri Na Bhajiya', 70, 'patri_bhajiya.jpg', 'Snacks', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(86, 'Methi Na Bhajiya', 70, 'methi_bhajiya.jpg', 'Snacks', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(87, 'Thepla Bhaji', 85, 'thepla_bhaji.jpg', 'Gujarati', 5, 9, NULL, NULL, NULL, NULL, 'Plate', 0.00),
(88, 'Gathiya', 80, 'gathiya.jpg', 'Snacks', 5, 9, NULL, NULL, NULL, NULL, 'Kg', 0.00),
(90, 'Paubhaji', 100, '1786351179_Paubhaji.jpg', 'Veg', 5, 9, '40.99', '0.04', 452, 678, 'Plate', 0.00);

-- --------------------------------------------------------

--
-- Table structure for table `module_catalog`
--

CREATE TABLE `module_catalog` (
  `id` int(11) NOT NULL,
  `module_key` varchar(100) NOT NULL,
  `module_name` varchar(150) NOT NULL,
  `module_desc` text DEFAULT NULL,
  `module_path` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `panel_name` varchar(30) NOT NULL DEFAULT 'main',
  `icon` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `module_catalog`
--

INSERT INTO `module_catalog` (`id`, `module_key`, `module_name`, `module_desc`, `module_path`, `is_active`, `created_at`, `panel_name`, `icon`) VALUES
(1, 'dashboard_main', 'Dashboard', 'Main admin dashboard', 'src/pages/Dashboard.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\"/></svg>'),
(2, 'tables', 'Tables', 'Table management', 'src/pages/Tables.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><rect x=\"3\" y=\"6\" width=\"18\" height=\"12\"/><path d=\"M3 10h18\"/></svg>'),
(3, 'menu', 'Menu Items', 'Menu management', 'src/pages/Menu.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><path d=\"M4 6h16\"/><path d=\"M4 12h16\"/><path d=\"M4 18h16\"/></svg>'),
(4, 'inventory', 'Inventory', 'Stock management', 'src/pages/Inventory.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\"/><path d=\"M3 9h18\"/></svg>'),
(5, 'kitchen_kds', 'Kitchen (KDS)', 'Kitchen display screen', 'src/pages/Kitchen.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><path d=\"M6 3v18\"/><path d=\"M10 3v18\"/><path d=\"M14 8h7\"/><path d=\"M14 12h7\"/><path d=\"M14 16h7\"/></svg>'),
(6, 'staff', 'Staff', 'Staff management', 'src/pages/Staff.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><circle cx=\"12\" cy=\"7\" r=\"4\"/><path d=\"M5 21c0-4 14-4 14 0\"/></svg>'),
(7, 'payroll', 'Payroll', 'Salary management', 'src/pages/Payroll.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><path d=\"M12 1v22\"/><path d=\"M17 5H9a4 4 0 0 0 0 8h6a4 4 0 0 1 0 8H7\"/></svg>'),
(8, 'expenses', 'Expenses', 'Expense tracking', 'src/pages/Expenses.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><path d=\"M12 1v22\"/><path d=\"M17 5H9a4 4 0 0 0 0 8h6a4 4 0 0 1 0 8H7\"/></svg>'),
(9, 'reports', 'Reports', 'Business reports', 'src/pages/Reports.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><path d=\"M4 19V5\"/><path d=\"M10 19V9\"/><path d=\"M16 19V3\"/><path d=\"M22 19H2\"/></svg>'),
(10, 'tax', 'Tax', 'Tax settings', 'src/pages/SET_TAX.php', 1, '2026-04-17 07:04:58', 'main', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M12 7v5l3 3\"/></svg>'),
(11, 'kitchen_dashboard', 'Dashboard', 'Kitchen dashboard', 'kitchen/dashboard.php', 1, '2026-04-17 07:04:58', 'kitchen', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\"/></svg>'),
(12, 'kitchen_orders', 'New Orders', 'Incoming kitchen orders', 'kitchen/orders.php', 1, '2026-04-17 07:04:58', 'kitchen', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><path d=\"M4 6h16M4 12h16M4 18h16\"/></svg>'),
(13, 'kitchen_ready', 'Ready Orders', 'Ready orders list', 'kitchen/ready_orders.php', 1, '2026-04-17 07:04:58', 'kitchen', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M12 7v5l3 3\"/></svg>'),
(14, 'waiter_dashboard', 'Dashboard', 'Waiter dashboard', 'waiter/waiter_dashboard.php', 1, '2026-04-17 07:04:58', 'waiter', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\"/></svg>'),
(15, 'waiter_tables', 'Tables', 'Assigned tables', 'waiter/waiter_tables.php', 1, '2026-04-17 07:04:58', 'waiter', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><rect x=\"3\" y=\"6\" width=\"18\" height=\"12\"/></svg>'),
(16, 'waiter_order', 'New Order', 'Create order', 'waiter/waiter_order.php', 1, '2026-04-17 07:04:58', 'waiter', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><path d=\"M4 6h16M4 12h16\"/></svg>'),
(17, 'waiter_billing', 'Billing', 'Billing screen', 'waiter/waiter_billing.php', 1, '2026-04-17 07:04:58', 'waiter', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><path d=\"M12 1v22\"/></svg>'),
(18, 'waiter_profile', 'Profile', 'Waiter profile', 'waiter/waiter_profile.php', 1, '2026-04-17 07:04:58', 'waiter', '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><circle cx=\"12\" cy=\"7\" r=\"4\"/><path d=\"M5 21c0-4 14-4 14 0\"/></svg>'),
(19, 'user_home', 'Home', 'Customer home', 'user/pages/Home.php', 1, '2026-04-17 07:04:58', 'user', NULL),
(20, 'user_menu', 'Menu', 'Customer menu', 'user/pages/Menu.php', 1, '2026-04-17 07:04:58', 'user', NULL),
(21, 'user_cart', 'Cart', 'Customer cart', 'user/pages/Cart.php', 1, '2026-04-17 07:04:58', 'user', NULL),
(22, 'user_book', 'Book Table', 'Table booking', 'user/pages/BookTable.php', 1, '2026-04-17 07:04:58', 'user', NULL),
(23, 'user_orders', 'Orders', 'Customer orders', 'user/pages/Orders.php', 1, '2026-04-17 07:04:58', 'user', NULL),
(24, 'kitchen_usage', 'Daily Usage', 'Track daily kitchen item usage and stock deduction', '', 1, '2026-04-21 06:38:49', 'kitchen', '📊'),
(25, 'coupons', 'Coupon Module', 'Add and manage coupon codes for plan discounts', '', 1, '2026-05-06 06:00:22', 'main', '🎟️'),
(26, 'business_information', 'Business Information', 'Manage store details, GST, FSSAI and contact information', '', 1, '2026-05-27 10:41:24', 'main', '<i data-lucide=\"building-2\"></i>'),
(27, 'waste_report', 'Waste Report', 'Manage kitchen waste and wastage reports', '', 1, '2026-05-29 09:28:22', 'main', '🗑️');

-- --------------------------------------------------------

--
-- Table structure for table `module_requests`
--

CREATE TABLE `module_requests` (
  `id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `module_key` varchar(100) NOT NULL,
  `module_name` varchar(150) NOT NULL,
  `request_status` enum('pending','approved','rejected') NOT NULL DEFAULT 'pending',
  `requested_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `approved_by` int(11) DEFAULT NULL,
  `approved_at` timestamp NULL DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `access_mode` enum('single','all') NOT NULL DEFAULT 'single',
  `batch_id` varchar(50) DEFAULT NULL,
  `panel_name` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `module_requests`
--

INSERT INTO `module_requests` (`id`, `client_id`, `module_key`, `module_name`, `request_status`, `requested_at`, `approved_by`, `approved_at`, `notes`, `access_mode`, `batch_id`, `panel_name`) VALUES
(1, 12, '', 'billing', 'approved', '2026-04-17 06:20:49', 13, '2026-04-17 06:50:22', NULL, 'single', NULL, NULL),
(2, 12, '', 'billing', 'rejected', '2026-04-17 06:42:06', 13, '2026-04-17 06:48:43', NULL, 'single', NULL, NULL),
(3, 14, 'dashboard_main', 'Dashboard', 'approved', '2026-04-17 08:35:00', 13, '2026-04-17 08:40:33', NULL, 'single', NULL, NULL),
(4, 14, 'tables', 'Tables', 'approved', '2026-04-17 08:35:00', 13, '2026-04-17 08:40:33', NULL, 'single', NULL, NULL),
(5, 14, 'staff', 'Staff', 'approved', '2026-04-17 08:35:00', 13, '2026-04-17 08:40:33', NULL, 'single', NULL, NULL),
(6, 14, 'tax', 'Tax', 'approved', '2026-04-17 08:35:01', 13, '2026-04-17 08:40:33', NULL, 'single', NULL, NULL),
(7, 15, 'all', 'All Modules', 'approved', '2026-04-17 09:37:11', 13, '2026-04-17 09:52:39', NULL, 'all', NULL, NULL),
(8, 21, 'dashboard_main', 'Dashboard', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'main'),
(9, 21, 'tables', 'Tables', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'main'),
(10, 21, 'menu', 'Menu Items', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'main'),
(11, 21, 'inventory', 'Inventory', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'main'),
(12, 21, 'kitchen_kds', 'Kitchen (KDS)', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'main'),
(13, 21, 'staff', 'Staff', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'main'),
(14, 21, 'payroll', 'Payroll', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'main'),
(15, 21, 'expenses', 'Expenses', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'main'),
(16, 21, 'tax', 'Tax', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'main'),
(17, 21, 'kitchen_dashboard', 'Dashboard', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'kitchen'),
(18, 21, 'kitchen_orders', 'New Orders', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'kitchen'),
(19, 21, 'waiter_dashboard', 'Dashboard', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'waiter'),
(20, 21, 'waiter_tables', 'Tables', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'waiter'),
(21, 21, 'waiter_order', 'New Order', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'waiter'),
(22, 21, 'waiter_billing', 'Billing', 'approved', '2026-04-17 10:42:52', 13, '2026-04-17 10:44:35', NULL, 'single', 'req_69e20eac338951.04718413', 'waiter'),
(23, 23, 'dashboard_main', 'Dashboard', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'main'),
(24, 23, 'tables', 'Tables', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'main'),
(25, 23, 'menu', 'Menu Items', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'main'),
(26, 23, 'inventory', 'Inventory', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'main'),
(27, 23, 'kitchen_kds', 'Kitchen (KDS)', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'main'),
(28, 23, 'staff', 'Staff', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'main'),
(29, 23, 'payroll', 'Payroll', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'main'),
(30, 23, 'expenses', 'Expenses', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'main'),
(31, 23, 'tax', 'Tax', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'main'),
(32, 23, 'kitchen_dashboard', 'Dashboard', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'kitchen'),
(33, 23, 'kitchen_orders', 'New Orders', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'kitchen'),
(34, 23, 'waiter_dashboard', 'Dashboard', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'waiter'),
(35, 23, 'waiter_tables', 'Tables', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'waiter'),
(36, 23, 'waiter_order', 'New Order', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'waiter'),
(37, 23, 'waiter_billing', 'Billing', 'approved', '2026-04-17 10:50:30', 13, '2026-04-17 10:51:15', NULL, 'single', 'req_69e21076102479.32772259', 'waiter'),
(38, 26, 'all', 'All Modules', 'rejected', '2026-04-17 12:00:39', 13, '2026-04-20 06:54:47', NULL, 'all', 'req_69e220e7860444.19366183', 'all'),
(39, 26, 'dashboard_main', 'Dashboard', 'rejected', '2026-04-17 12:01:45', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(40, 26, 'tables', 'Tables', 'rejected', '2026-04-17 12:01:45', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(41, 26, 'menu', 'Menu Items', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(42, 26, 'inventory', 'Inventory', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(43, 26, 'kitchen_kds', 'Kitchen (KDS)', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(44, 26, 'staff', 'Staff', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(45, 26, 'payroll', 'Payroll', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(46, 26, 'expenses', 'Expenses', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(47, 26, 'reports', 'Reports', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(48, 26, 'tax', 'Tax', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'main'),
(49, 26, 'kitchen_dashboard', 'Dashboard', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'kitchen'),
(50, 26, 'kitchen_orders', 'New Orders', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'kitchen'),
(51, 26, 'kitchen_ready', 'Ready Orders', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'kitchen'),
(52, 26, 'waiter_dashboard', 'Dashboard', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'waiter'),
(53, 26, 'waiter_tables', 'Tables', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'waiter'),
(54, 26, 'waiter_order', 'New Order', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'waiter'),
(55, 26, 'waiter_billing', 'Billing', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'waiter'),
(56, 26, 'waiter_profile', 'Profile', 'rejected', '2026-04-17 12:01:46', 13, '2026-04-20 06:54:45', NULL, 'single', 'req_69e22129f1e050.66168238', 'waiter'),
(57, 27, 'dashboard_main', 'Dashboard', 'approved', '2026-04-20 06:54:19', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'main'),
(58, 27, 'tables', 'Tables', 'approved', '2026-04-20 06:54:19', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'main'),
(59, 27, 'menu', 'Menu Items', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'main'),
(60, 27, 'inventory', 'Inventory', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'main'),
(61, 27, 'kitchen_kds', 'Kitchen (KDS)', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'main'),
(62, 27, 'staff', 'Staff', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'main'),
(63, 27, 'expenses', 'Expenses', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'main'),
(64, 27, 'tax', 'Tax', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'main'),
(65, 27, 'kitchen_dashboard', 'Dashboard', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'kitchen'),
(66, 27, 'kitchen_orders', 'New Orders', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'kitchen'),
(67, 27, 'waiter_dashboard', 'Dashboard', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'waiter'),
(68, 27, 'waiter_tables', 'Tables', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'waiter'),
(69, 27, 'waiter_billing', 'Billing', 'approved', '2026-04-20 06:54:20', 13, '2026-04-20 06:54:44', NULL, 'single', 'req_69e5cd9bee7d73.48522469', 'waiter'),
(70, 9, 'all', 'All Modules', 'approved', '2026-04-21 05:28:49', 13, '2026-04-21 05:29:25', NULL, 'all', 'req_69e70b11c273e2.30967742', 'all'),
(71, 32, 'all', 'All Modules', 'approved', '2026-04-23 06:26:29', 13, '2026-04-23 06:45:32', NULL, 'all', 'req_69e9bb954a9603.33081476', 'all'),
(72, 33, 'all', 'All Modules', 'rejected', '2026-04-23 06:47:17', 13, '2026-04-24 07:34:53', NULL, 'all', 'req_69e9c0752ab298.85249483', 'all'),
(73, 34, 'all', 'All Modules', 'rejected', '2026-04-24 05:34:57', 13, '2026-04-24 07:34:52', NULL, 'all', 'req_69eb0101446ee5.47521881', 'all'),
(74, 35, 'all', 'All Modules', 'approved', '2026-04-24 06:06:21', 13, '2026-04-24 07:34:49', NULL, 'all', 'req_69eb085dd23cb1.17514970', 'all'),
(75, 36, 'all', 'All Modules', 'rejected', '2026-04-27 06:35:39', 13, '2026-05-06 06:02:57', NULL, 'all', 'req_69ef03bb689de3.69598056', 'all'),
(76, 37, 'all', 'All Modules', 'rejected', '2026-05-06 04:52:44', 13, '2026-05-06 06:02:56', NULL, 'all', 'req_69fac91c98df73.97402964', 'all'),
(77, 38, 'all', 'All Modules', 'approved', '2026-05-06 06:01:22', 13, '2026-05-06 06:02:54', NULL, 'all', 'req_69fad9327048b2.72622547', 'all'),
(78, 39, 'all', 'All Modules', 'approved', '2026-05-06 06:46:33', 13, '2026-05-06 06:49:12', NULL, 'all', 'req_69fae3c9986d44.16709519', 'all'),
(79, 40, 'all', 'All Modules', 'approved', '2026-05-06 06:54:54', 13, '2026-05-07 09:34:30', NULL, 'all', 'req_69fae5be3e3359.98196657', 'all'),
(80, 43, 'all', 'All Modules', 'pending', '2026-05-29 09:28:43', NULL, NULL, NULL, 'all', 'req_6a195c4bcc42c1.10344373', 'all'),
(81, 44, 'all', 'All Modules', 'pending', '2026-05-29 09:32:37', NULL, NULL, NULL, 'all', 'req_6a195d359b6b07.80717131', 'all'),
(82, 46, 'all', 'All Modules', 'pending', '2026-06-04 16:50:01', NULL, NULL, NULL, 'all', 'req_6a21acb9069727.97841968', 'all'),
(83, 46, 'dashboard_main', 'Dashboard', 'pending', '2026-06-04 16:50:01', NULL, NULL, NULL, 'single', 'req_6a21acb9069727.97841968', 'main'),
(84, 46, 'tables', 'Tables', 'pending', '2026-06-04 16:50:01', NULL, NULL, NULL, 'single', 'req_6a21acb9069727.97841968', 'main'),
(85, 46, 'menu', 'Menu Items', 'pending', '2026-06-04 16:50:01', NULL, NULL, NULL, 'single', 'req_6a21acb9069727.97841968', 'main'),
(86, 46, 'inventory', 'Inventory', 'pending', '2026-06-04 16:50:01', NULL, NULL, NULL, 'single', 'req_6a21acb9069727.97841968', 'main'),
(87, 46, 'kitchen_kds', 'Kitchen (KDS)', 'pending', '2026-06-04 16:50:01', NULL, NULL, NULL, 'single', 'req_6a21acb9069727.97841968', 'main'),
(88, 46, 'staff', 'Staff', 'pending', '2026-06-04 16:50:01', NULL, NULL, NULL, 'single', 'req_6a21acb9069727.97841968', 'main'),
(89, 46, 'payroll', 'Payroll', 'pending', '2026-06-04 16:50:01', NULL, NULL, NULL, 'single', 'req_6a21acb9069727.97841968', 'main'),
(90, 46, 'waiter_order', 'New Order', 'pending', '2026-06-04 16:50:01', NULL, NULL, NULL, 'single', 'req_6a21acb9069727.97841968', 'waiter'),
(91, 47, 'dashboard_main', 'Dashboard', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'main'),
(92, 47, 'tables', 'Tables', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'main'),
(93, 47, 'menu', 'Menu Items', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'main'),
(94, 47, 'inventory', 'Inventory', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'main'),
(95, 47, 'staff', 'Staff', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'main'),
(96, 47, 'reports', 'Reports', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'main'),
(97, 47, 'kitchen_usage', 'Daily Usage', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'kitchen'),
(98, 47, 'waiter_dashboard', 'Dashboard', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'waiter'),
(99, 47, 'waiter_tables', 'Tables', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'waiter'),
(100, 47, 'waiter_order', 'New Order', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'waiter'),
(101, 47, 'waiter_billing', 'Billing', 'pending', '2026-06-10 21:20:01', NULL, NULL, NULL, 'single', 'req_6a29d5012e8902.90054342', 'waiter'),
(102, 48, 'all', 'All Modules', 'pending', '2026-06-12 08:47:54', NULL, NULL, NULL, 'all', 'req_6a2bc7ba326ca6.41298349', 'all'),
(103, 9, 'business_information', 'Business Information', 'approved', '2026-06-18 05:49:57', 13, '2026-05-07 09:34:30', NULL, 'single', 'req_6a33870534e181.43112858', 'main'),
(104, 52, 'all', 'All Modules', 'pending', '2026-07-08 07:26:47', NULL, NULL, NULL, 'all', 'req_6a4dfbb776c688.69548920', 'all'),
(105, 55, 'all', 'All Modules', 'rejected', '2026-08-20 06:57:21', 13, '2026-08-20 07:04:02', NULL, 'all', 'req_6a86a55197eca4.85221726', 'all'),
(106, 55, 'staff', 'Staff', 'rejected', '2026-08-20 06:57:21', 13, '2026-08-20 07:04:02', NULL, 'single', 'req_6a86a55197eca4.85221726', 'main');

-- --------------------------------------------------------

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` int(11) NOT NULL,
  `kot_no` varchar(20) DEFAULT NULL,
  `table_no` varchar(20) DEFAULT NULL,
  `status` enum('Preparing','Ready','Delivered') DEFAULT 'Preparing',
  `created_at` datetime DEFAULT current_timestamp(),
  `paid` tinyint(4) DEFAULT 0,
  `estimated_minutes` int(11) DEFAULT NULL,
  `ready_at` datetime DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `area_surcharge` decimal(10,2) NOT NULL DEFAULT 0.00,
  `waiter_notified` tinyint(4) DEFAULT 0,
  `admin_id` int(11) NOT NULL DEFAULT 0,
  `waiter_id` int(11) NOT NULL DEFAULT 0,
  `client_uuid` varchar(64) DEFAULT NULL,
  `device_id` varchar(64) DEFAULT NULL,
  `order_type` enum('dine_in','parcel') NOT NULL DEFAULT 'dine_in',
  `customer_name` varchar(100) DEFAULT NULL,
  `customer_mobile` varchar(20) DEFAULT NULL,
  `current_kot_no` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `orders`
--

INSERT INTO `orders` (`id`, `kot_no`, `table_no`, `status`, `created_at`, `paid`, `estimated_minutes`, `ready_at`, `updated_at`, `area_surcharge`, `waiter_notified`, `admin_id`, `waiter_id`, `client_uuid`, `device_id`, `order_type`, `customer_name`, `customer_mobile`, `current_kot_no`) VALUES
(53, 'KOT1779869095431', '1', 'Delivered', '2026-05-27 08:04:54', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1779869095431_0', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(56, 'KOT1779870287078', '1', 'Delivered', '2026-05-27 08:24:46', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1779870287078_5003', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(64, 'KOT1779963531368', '1', 'Delivered', '2026-05-28 10:18:50', 1, NULL, NULL, NULL, 0.00, 0, 9, 31, 'ord_1779963531367_7769', 'waiter-device-31', 'dine_in', NULL, NULL, NULL),
(66, 'KOT1779964316119', '1', 'Delivered', '2026-05-28 10:31:55', 1, NULL, NULL, NULL, 0.00, 0, 9, 31, 'ord_1779964316119_6854', 'waiter-device-31', 'dine_in', NULL, NULL, NULL),
(69, 'KOT1779964685983', '1', 'Delivered', '2026-05-28 10:38:05', 1, NULL, NULL, NULL, 0.00, 0, 9, 31, 'ord_1779964685983_3681', 'waiter-device-31', 'dine_in', NULL, NULL, NULL),
(74, 'KOT1780388860292', '2', 'Delivered', '2026-06-02 08:27:38', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1780388860291_5217', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(75, 'KOT1781255449864', '5', 'Delivered', '2026-06-12 09:10:48', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781255449864_5413', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(77, 'KOT1781255582304', '5', 'Delivered', '2026-06-12 09:13:00', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781255582304_3246', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(79, 'KOT1781255911625', '5', 'Delivered', '2026-06-12 09:18:30', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781255911625_607', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(85, 'KOT1781762785689', '4', 'Delivered', '2026-06-18 06:06:25', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781762785689_6274', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(86, 'KOT1781763881791', '4', 'Delivered', '2026-06-18 06:24:41', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781763881791_3004', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(87, 'KOT1781765770179', '9', 'Delivered', '2026-06-18 06:56:10', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781765770179_8340', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(88, 'KOT1781765871171', '9', 'Delivered', '2026-06-18 06:57:51', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781765871171_5150', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(90, 'KOT1781771184291', '5', 'Delivered', '2026-06-18 08:26:23', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781771184291_7612', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(92, 'KOT1781771945393', '4', 'Delivered', '2026-06-18 08:39:05', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781771945393_7161', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(93, 'KOT1781772928863', '4', '', '2026-06-18 08:55:28', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781772928863_3472', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(94, 'KOT1781773627606', '4', '', '2026-06-18 09:07:07', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781773627606_600', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(95, 'KOT1781773830173', '1', '', '2026-06-18 09:10:29', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781773830173_1870', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(96, 'KOT1781774301036', '4', 'Delivered', '2026-06-18 09:18:20', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781774301036_499', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(97, 'KOT1781774301052', '4', 'Delivered', '2026-06-18 09:18:20', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781774301052_8310', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(98, 'KOT1781774510348', '4', 'Delivered', '2026-06-18 09:21:49', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781774510348_472', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(99, 'KOT1781774754972', '1', 'Delivered', '2026-06-18 09:25:54', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781774754971_8708', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(100, 'KOT1781775158451', '5', 'Delivered', '2026-06-18 09:32:38', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781775158451_387', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(101, 'KOT1781775203850', '5', 'Delivered', '2026-06-18 09:33:23', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781775203850_9499', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(102, 'KOT1781775487578', '4', 'Delivered', '2026-06-18 09:38:07', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781775487578_7231', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(103, 'KOT1781775801281', '9', 'Delivered', '2026-06-18 09:43:20', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781775801281_3357', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(104, 'KOT1781775834361', '4', 'Delivered', '2026-06-18 09:43:53', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781775834361_4625', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(105, 'KOT1781776258360', '4', 'Delivered', '2026-06-18 09:50:57', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781776258360_2395', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(106, 'KOT1781776266832', '4', 'Delivered', '2026-06-18 09:51:06', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781776266832_641', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(107, 'KOT1781776695687', '4', 'Delivered', '2026-06-18 09:58:15', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781776695687_4840', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(108, 'KOT1781776703295', '4', 'Delivered', '2026-06-18 09:58:22', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781776703295_9688', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(111, 'KOT1781777237273', '4', 'Delivered', '2026-06-18 10:07:16', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781777237272_7270', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(112, 'KOT1781777245128', '4', 'Delivered', '2026-06-18 10:07:24', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781777245128_1625', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(113, 'KOT1781777439810', '4', 'Delivered', '2026-06-18 10:10:39', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781777439810_6860', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(114, 'KOT1781777576923', '4', 'Delivered', '2026-06-18 10:12:56', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781777576923_367', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(115, 'KOT1781778174226', '4', 'Delivered', '2026-06-18 10:22:53', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781778174226_9632', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(116, 'KOT1781778180826', '4', 'Delivered', '2026-06-18 10:23:00', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781778180826_5942', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(117, 'KOT1781778385690', '4', 'Delivered', '2026-06-18 10:26:25', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_edit_115', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(118, 'KOT1781781943516', '4', 'Delivered', '2026-06-18 11:25:43', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781781943516_5246', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(119, 'KOT1781781973186', '4', '', '2026-06-18 11:26:13', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781781973186_8920', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(120, 'KOT1781847304981', '4', '', '2026-06-19 05:35:04', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781847304981_1681', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(121, 'KOT1781848066166', '4', '', '2026-06-19 05:47:45', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781848066166_7746', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(122, 'KOT1781848776968', '4', '', '2026-06-19 05:59:36', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781848776968_356', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(123, 'KOT1781850432161', '4', 'Delivered', '2026-06-19 06:27:12', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781850432161_5043', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(124, 'KOT1781855064120', '4', 'Delivered', '2026-06-19 07:44:24', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781855064120_8449', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(125, 'KOT1781859117395', '5', 'Delivered', '2026-06-19 08:51:57', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781859117395_6703', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(126, 'KOT1781860563352', '9', 'Delivered', '2026-06-19 09:16:03', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1781860563352_3943', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(127, 'KOT1782111687361', '4', 'Delivered', '2026-06-22 07:01:27', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1782111687361_4384', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(128, 'KOT1782193109462', '5', 'Delivered', '2026-06-23 05:38:28', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1782193109462_3148', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(129, 'KOT1782716217553', '5', 'Delivered', '2026-06-29 06:56:58', 0, NULL, '2026-06-29 07:06:07', '2026-06-29 07:06:07', 0.00, 0, 9, 45, 'ord_1782716217553_8600', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(130, 'KOT1782719152746', '4', 'Delivered', '2026-06-29 07:45:53', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782719152746_1696', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(131, 'KOT1782719179538', '4', 'Delivered', '2026-06-29 07:46:20', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782719179538_1817', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(132, 'KOT1782719446194', '6', 'Delivered', '2026-06-29 07:50:46', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782719446194_823', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(133, 'KOT1782719499113', '4', 'Delivered', '2026-06-29 07:51:39', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782719499113_469', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(135, 'KOT1782720283296', '1', 'Delivered', '2026-06-29 08:04:43', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782720283296_7495', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(136, 'KOT1782721136310', '4', 'Delivered', '2026-06-29 08:18:56', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782721136310_3280', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(137, 'KOT1782721764836', '5', 'Delivered', '2026-06-29 08:29:25', 0, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782721764836_7576', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(138, 'KOT1782721979652', '4', 'Delivered', '2026-06-29 08:33:00', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782721979652_8820', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(139, 'KOT1782722222644', '9', 'Delivered', '2026-06-29 08:37:03', 0, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782722222643_3378', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(140, 'KOT1782722584883', '2', 'Delivered', '2026-06-29 08:43:05', 0, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782722584883_8560', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(141, 'KOT1782722785035', '4', 'Delivered', '2026-06-29 08:46:25', 1, NULL, NULL, NULL, 0.00, 0, 9, 30, 'ord_1782722785035_868', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(142, 'KOT20260629173041312', '1', 'Delivered', '2026-06-29 12:00:41', 1, NULL, '2026-06-29 12:01:44', '2026-06-29 12:21:26', 0.00, 0, 9, 0, 'admin_9_20260629173041_1753', 'admin-panel', 'dine_in', '', '', NULL),
(143, 'KOT20260629173128379', NULL, 'Delivered', '2026-06-29 12:01:28', 1, NULL, '2026-06-29 12:29:17', '2026-06-30 05:59:36', 0.00, 0, 9, 0, 'admin_9_20260629173128_3999', 'admin-panel', 'parcel', 'yash', '8320775403', NULL),
(144, 'KOT20260630113750238', NULL, 'Delivered', '2026-06-30 06:07:50', 1, NULL, '2026-06-30 06:08:00', '2026-06-30 06:12:27', 0.00, 0, 9, 0, 'admin_9_20260630113750_8442', 'admin-panel', 'parcel', 'aryan', '9023079729', NULL),
(145, 'KOT20260630131922182', '1', 'Delivered', '2026-06-30 07:49:22', 1, NULL, '2026-06-30 07:49:32', '2026-06-30 07:49:41', 0.00, 0, 9, 0, 'admin_9_20260630131922_9928', 'admin-panel', 'dine_in', '', '', NULL),
(146, 'KOT1782808058414', '4', 'Delivered', '2026-06-30 08:27:38', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1782808058414_2922', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(147, 'KOT1782808672598', '4', 'Delivered', '2026-06-30 08:37:52', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1782808672598_7752', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(148, 'KOT1782810255901', '4', 'Delivered', '2026-06-30 09:04:15', 1, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1782810255901_4957', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(149, 'KOT1782811213421', '4', 'Delivered', '2026-06-30 09:20:13', 0, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1782811213421_5794', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(150, 'KOT1782813049213', '5', 'Delivered', '2026-06-30 09:50:49', 0, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1782813049213_9053', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(151, 'KOT1782813771580', '9', 'Delivered', '2026-06-30 10:02:51', 1, NULL, '2026-06-30 10:04:53', '2026-06-30 10:07:09', 0.00, 0, 9, 45, 'ord_1782813771580_2032', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(152, 'KOT1782813974476', '4', 'Delivered', '2026-06-30 10:06:14', 1, NULL, '2026-06-30 10:06:27', '2026-06-30 10:36:56', 0.00, 0, 9, 45, 'ord_1782813974476_3378', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(153, 'KOT1782816456831', '4', 'Delivered', '2026-06-30 10:47:36', 0, NULL, '2026-06-30 10:47:45', '2026-06-30 10:47:45', 0.00, 0, 9, 45, 'ord_1782816456831_3118', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(154, 'KOT20260630161822802', '1', 'Delivered', '2026-06-30 10:48:22', 1, NULL, '2026-06-30 10:48:26', '2026-06-30 12:03:13', 0.00, 0, 9, 0, 'admin_9_20260630161822_2082', 'admin-panel', 'dine_in', '', '', NULL),
(155, 'KOT20260630170031593', '3', 'Delivered', '2026-06-30 11:30:31', 0, NULL, '2026-06-30 11:38:10', '2026-06-30 11:38:10', 0.00, 0, 9, 0, 'admin_9_20260630170031_6533', 'admin-panel', 'dine_in', '', '', NULL),
(157, 'KOT20260630170623383', '2', 'Delivered', '2026-06-30 11:36:23', 0, NULL, '2026-06-30 11:38:11', '2026-06-30 11:38:11', 0.00, 0, 9, 0, 'admin_9_20260630170623_9716', 'admin-panel', 'dine_in', '', '', NULL),
(158, 'KOT20260630173639278', '1', 'Delivered', '2026-06-30 12:06:39', 0, NULL, '2026-06-30 12:07:01', '2026-06-30 12:07:01', 0.00, 0, 9, 0, 'admin_9_20260630173639_3335', 'admin-panel', 'dine_in', '', '', NULL),
(159, 'KOT1782821672021', '4', 'Delivered', '2026-06-30 12:14:32', 1, NULL, NULL, '2026-07-01 05:37:41', 0.00, 0, 9, 45, 'ord_1782821672021_2802', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(160, 'KOT20260701110609941', NULL, 'Delivered', '2026-07-01 05:36:09', 1, NULL, '2026-07-01 05:36:27', '2026-07-01 05:50:54', 0.00, 0, 9, 0, 'admin_9_20260701110609_7888', 'admin-panel', 'parcel', 'yash', '8320775403', NULL),
(161, 'KOT20260701113703695', '1', 'Delivered', '2026-07-01 06:07:03', 1, NULL, '2026-07-01 06:07:35', '2026-07-01 06:43:43', 0.00, 0, 9, 0, 'admin_9_20260701113703_8164', 'admin-panel', 'dine_in', '', '', NULL),
(162, 'KOT20260701113724426', '1', 'Delivered', '2026-07-01 06:07:24', 1, NULL, '2026-07-01 06:07:34', '2026-07-01 06:07:50', 0.00, 0, 9, 0, 'admin_9_20260701113724_9085', 'admin-panel', 'dine_in', '', '', NULL),
(163, 'KOT20260701121354895', '3', 'Delivered', '2026-07-01 06:43:54', 1, NULL, '2026-07-01 07:27:12', '2026-07-01 07:27:37', 0.00, 0, 9, 0, 'admin_9_20260701121354_9553', 'admin-panel', 'dine_in', '', '', NULL),
(164, 'KOT1782890869372', '4', 'Delivered', '2026-07-01 07:27:49', 1, NULL, '2026-07-01 07:28:25', '2026-07-01 07:28:48', 0.00, 0, 9, 30, 'ord_1782890869372_2998', 'waiter-device-30', 'dine_in', NULL, NULL, NULL),
(165, 'KOT20260701131802344', '4', 'Delivered', '2026-07-01 07:48:02', 1, NULL, '2026-07-01 07:48:12', '2026-07-01 08:36:32', 0.00, 0, 9, 0, 'admin_9_20260701131802_5506', 'admin-panel', 'dine_in', '', '', NULL),
(166, 'KOT20260709114115717', '1', 'Delivered', '2026-07-09 06:11:15', 1, NULL, '2026-07-09 06:57:42', '2026-07-09 06:58:32', 0.00, 0, 9, 0, 'admin_9_20260709114115_4055', 'admin-panel', 'dine_in', '', '', NULL),
(167, 'KOT1783580766245', '4', '', '2026-07-09 07:06:05', 0, NULL, NULL, '2026-08-18 09:22:19', 0.00, 0, 9, 51, 'ord_1783580766244_8595', 'waiter-device-51', 'dine_in', NULL, NULL, NULL),
(168, 'KOT20260810141829221', '1', 'Delivered', '2026-08-10 08:48:29', 1, NULL, '2026-08-10 09:56:36', '2026-08-10 10:08:07', 0.00, 0, 9, 0, 'admin_9_20260810141829_3551', 'admin-panel', 'dine_in', 'Abc', '9876543210', NULL),
(169, 'KOT20260810141902703', NULL, '', '2026-08-10 08:49:02', 0, NULL, NULL, '2026-08-10 08:49:02', 0.00, 0, 9, 0, 'admin_9_20260810141902_2097', 'admin-panel', 'parcel', 'Abc', '9876543210', NULL),
(170, 'KOT20260810142611831', NULL, '', '2026-08-10 08:56:11', 0, NULL, NULL, '2026-08-10 08:56:11', 0.00, 0, 9, 0, 'admin_9_20260810142611_3917', 'admin-panel', 'parcel', 'Abc', '9876543210', NULL),
(171, 'KOT1786355098611', '5', '', '2026-08-10 09:45:02', 0, NULL, NULL, '2026-08-19 09:41:42', 0.00, 0, 9, 45, 'ord_1786355098611_4682', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(172, 'KOT1786355401433', '9', '', '2026-08-10 09:50:05', 0, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1786355401433_3793', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(173, 'KOT1786356159153', '6', 'Delivered', '2026-08-10 10:02:42', 1, NULL, '2026-08-10 10:02:51', '2026-08-10 10:08:02', 0.00, 0, 9, 45, 'ord_1786356159153_8747', 'waiter-device-45', 'dine_in', NULL, NULL, NULL),
(174, 'KOT20260811142506239', '1', '', '2026-08-11 08:55:06', 0, NULL, NULL, '2026-08-11 08:55:06', 0.00, 0, 9, 0, 'admin_9_20260811142506_4260', 'admin-panel', 'dine_in', '', '', NULL),
(175, 'KOT20260811142538995', NULL, '', '2026-08-11 08:55:38', 0, NULL, NULL, '2026-08-11 08:55:38', 0.00, 0, 9, 0, 'admin_9_20260811142538_3893', 'admin-panel', 'parcel', 'Abc', '9876543210', NULL),
(176, 'KOT20260818144838611', '2', '', '2026-08-18 09:18:38', 0, NULL, NULL, '2026-08-18 09:18:38', 0.00, 0, 9, 0, 'admin_9_20260818144838_8765', 'admin-panel', 'dine_in', '', '', NULL),
(177, 'KOT20260818145237585', NULL, '', '2026-08-18 09:22:37', 0, NULL, NULL, '2026-08-18 09:22:37', 0.00, 0, 9, 0, 'admin_9_20260818145237_5476', 'admin-panel', 'parcel', 'yash', '8320775403', NULL),
(178, 'KOT20260819151217376', NULL, 'Ready', '2026-08-19 09:42:17', 0, NULL, '2026-08-19 10:13:34', '2026-08-19 10:13:34', 0.00, 0, 9, 0, 'admin_9_20260819151217_1603', 'admin-panel', 'parcel', 'Abc', '9876543210', NULL),
(179, 'KOT1787133731896', '8', 'Preparing', '2026-08-19 10:02:13', 0, NULL, NULL, NULL, 0.00, 0, 9, 45, 'ord_1787133731896_6167', 'waiter-device-45', 'dine_in', NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `order_items`
--

CREATE TABLE `order_items` (
  `id` int(11) NOT NULL,
  `order_id` int(11) DEFAULT NULL,
  `item_name` varchar(255) DEFAULT NULL,
  `extra` varchar(255) DEFAULT NULL,
  `price` int(11) DEFAULT NULL,
  `qty` int(11) DEFAULT NULL,
  `status` enum('active','cancelled') NOT NULL DEFAULT 'active',
  `cancelled_at` datetime DEFAULT NULL,
  `cancelled_by` varchar(100) DEFAULT NULL,
  `cancelled_reason` varchar(255) DEFAULT NULL,
  `admin_id` int(11) NOT NULL DEFAULT 0,
  `client_item_uuid` varchar(64) DEFAULT NULL,
  `unit` varchar(20) DEFAULT 'Plate',
  `gram` decimal(10,2) DEFAULT 0.00,
  `kitchen_status` enum('new','preparing','ready') DEFAULT 'new'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `order_items`
--

INSERT INTO `order_items` (`id`, `order_id`, `item_name`, `extra`, `price`, `qty`, `status`, `cancelled_at`, `cancelled_by`, `cancelled_reason`, `admin_id`, `client_item_uuid`, `unit`, `gram`, `kitchen_status`) VALUES
(267, 163, 'Butter Milk', '', 20, 1, 'active', NULL, NULL, NULL, 9, 'itm_163_1_579', 'Piece', 0.00, 'ready'),
(268, 163, 'Totha Ni Plate', '', 160, 1, 'active', NULL, NULL, NULL, 9, 'itm_163_1_766', 'Plate', 0.00, 'ready'),
(269, 163, 'Khaman', '', 400, 1, 'active', NULL, NULL, NULL, 9, 'itm_163_1_935', 'Kg', 250.00, 'ready'),
(270, 164, 'Gathiya (250 gm)', NULL, 20, 1, 'active', NULL, NULL, NULL, 9, 'itm_1782890869372_0', 'Plate', 0.00, 'ready'),
(271, 164, 'Thepla Bhaji', NULL, 85, 1, 'active', NULL, NULL, NULL, 9, 'itm_1782890895372_0', 'Plate', 0.00, 'ready'),
(272, 165, 'Butter Milk', '', 20, 1, 'active', NULL, NULL, NULL, 9, 'itm_165_1_287', 'Piece', 0.00, 'ready'),
(273, 166, 'Thepla Bhaji', '', 85, 1, 'active', NULL, NULL, NULL, 9, 'itm_166_1_667', 'Plate', 0.00, 'ready'),
(274, 166, 'Totha Ni Plate', '', 160, 1, 'active', NULL, NULL, NULL, 9, 'itm_166_2_449', 'Plate', 0.00, 'ready'),
(275, 167, 'Thepla Bhaji', NULL, 85, 1, 'active', NULL, NULL, NULL, 9, 'itm_1783580766245_0', 'Plate', 0.00, 'new'),
(276, 168, 'Bread', '', 5, 2, 'active', NULL, NULL, NULL, 9, 'itm_168_1_518', 'Piece', 0.00, 'ready'),
(277, 169, 'Butter Milk', '', 20, 1, 'active', NULL, NULL, NULL, 9, 'itm_169_1_504', 'Piece', 0.00, 'new'),
(278, 169, 'Thepla Bhaji', '', 85, 1, 'active', NULL, NULL, NULL, 9, 'itm_169_2_504', 'Plate', 0.00, 'new'),
(279, 169, 'Aloo Parotha', '', 80, 1, 'active', NULL, NULL, NULL, 9, 'itm_169_3_703', 'Plate', 0.00, 'new'),
(280, 169, 'Khaman', '', 400, 1, 'active', NULL, NULL, NULL, 9, 'itm_169_4_960', 'Kg', 0.00, 'new'),
(281, 168, 'Aloo Parotha', '', 80, 1, 'active', NULL, NULL, NULL, 9, 'itm_168_1_589', 'Plate', 0.00, 'ready'),
(282, 168, 'Rotla', '', 40, 1, 'active', NULL, NULL, NULL, 9, 'itm_168_2_122', 'Plate', 0.00, 'ready'),
(283, 170, 'Bharela Marcha Na Bhajiya', '', 70, 1, 'cancelled', '2026-08-10 09:55:00', 'Aryan', '', 9, 'itm_170_1_770', 'Plate', 0.00, 'new'),
(284, 170, 'Khaman', '', 400, 1, 'cancelled', '2026-08-10 09:55:03', 'Aryan', '', 9, 'itm_170_2_353', 'Kg', 0.00, 'new'),
(285, 170, 'Methi Na Bhajiya', '', 70, 1, 'cancelled', '2026-08-10 09:55:05', 'Aryan', '', 9, 'itm_170_3_333', 'Plate', 0.00, 'new'),
(286, 171, 'Paubhaji (chees)', NULL, 120, 1, 'cancelled', '2026-08-10 09:49:08', 'Aryan', '', 9, 'itm_1786355098611_0', 'Plate', 0.00, 'new'),
(287, 172, 'French Fries', NULL, 70, 1, 'cancelled', '2026-08-10 09:50:12', 'Aryan', '', 9, 'itm_1786355401434_0', 'Plate', 0.00, 'new'),
(288, 172, 'Gathiya (250 gm)', NULL, 20, 1, 'active', NULL, NULL, NULL, 9, 'itm_1786355435869_0', 'Plate', 0.00, 'new'),
(289, 172, 'Bharela Marcha Na Bhajiya', NULL, 70, 1, 'active', NULL, NULL, NULL, 9, 'itm_1786355435869_1', 'Plate', 0.00, 'new'),
(290, 172, 'Dahi', NULL, 20, 1, 'active', NULL, NULL, NULL, 9, 'itm_1786355435869_2', 'Plate', 0.00, 'new'),
(291, 173, 'Paubhaji', NULL, 100, 1, 'active', NULL, NULL, NULL, 9, 'itm_1786356159153_0', 'Plate', 0.00, 'ready'),
(292, 174, 'Bread', '', 5, 1, 'active', NULL, NULL, NULL, 9, 'itm_174_1_628', 'Piece', 0.00, 'new'),
(293, 175, 'Butter Milk', '', 20, 1, 'active', NULL, NULL, NULL, 9, 'itm_175_1_862', 'Piece', 0.00, 'new'),
(294, 176, 'Bread', '', 5, 1, 'active', NULL, NULL, NULL, 9, 'itm_176_1_284', 'Piece', 0.00, 'new'),
(295, 176, 'Butter Milk', '', 20, 1, 'active', NULL, NULL, NULL, 9, 'itm_176_2_654', 'Piece', 0.00, 'new'),
(296, 167, 'Dahi', '', 20, 1, 'active', NULL, NULL, NULL, 9, 'itm_167_1_507', 'Piece', 0.00, 'new'),
(297, 177, 'Totha Ni Plate', '', 160, 1, 'active', NULL, NULL, NULL, 9, 'itm_177_1_337', 'Plate', 0.00, 'new'),
(298, 171, 'Cheese Aloo Parotha', '', 100, 1, 'active', NULL, NULL, NULL, 9, 'itm_171_1_928', 'Plate', 0.00, 'new'),
(299, 171, 'French Fries', '', 70, 1, 'active', NULL, NULL, NULL, 9, 'itm_171_2_528', 'Plate', 0.00, 'new'),
(300, 178, 'Methi Na Bhajiya', '', 70, 1, 'active', NULL, NULL, NULL, 9, 'itm_178_1_975', 'Plate', 0.00, 'ready'),
(301, 178, 'Papad', '', 15, 1, 'active', NULL, NULL, NULL, 9, 'itm_178_2_357', 'Piece', 0.00, 'ready'),
(302, 178, 'Paubhaji', '', 100, 1, 'active', NULL, NULL, NULL, 9, 'itm_178_3_668', 'Plate', 0.00, 'ready'),
(303, 178, 'Patri Na Bhajiya', '', 70, 1, 'active', NULL, NULL, NULL, 9, 'itm_178_4_449', 'Plate', 0.00, 'ready'),
(304, 178, 'Marcha Na Patti Bhajiya', '', 70, 1, 'active', NULL, NULL, NULL, 9, 'itm_178_5_228', 'Plate', 0.00, 'ready'),
(305, 179, 'Gathiya (250 gm)', NULL, 20, 1, 'cancelled', '2026-08-19 10:02:47', 'Aryan', '', 9, 'itm_1787133731896_0', 'Plate', 0.00, 'new'),
(306, 179, 'Methi Na Bhajiya', NULL, 70, 1, 'cancelled', '2026-08-19 10:02:51', 'Aryan', '', 9, 'itm_1787133731896_1', 'Plate', 0.00, 'new');

-- --------------------------------------------------------

--
-- Table structure for table `payroll_items`
--

CREATE TABLE `payroll_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `payroll_run_id` int(10) UNSIGNED NOT NULL,
  `staff_id` int(10) UNSIGNED NOT NULL,
  `base_salary` decimal(12,2) NOT NULL DEFAULT 0.00,
  `allowances` decimal(12,2) NOT NULL DEFAULT 0.00,
  `deductions` decimal(12,2) NOT NULL DEFAULT 0.00,
  `tax` decimal(12,2) NOT NULL DEFAULT 0.00,
  `net_pay` decimal(12,2) NOT NULL DEFAULT 0.00,
  `note` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `payroll_items`
--

INSERT INTO `payroll_items` (`id`, `payroll_run_id`, `staff_id`, `base_salary`, `allowances`, `deductions`, `tax`, `net_pay`, `note`, `created_at`) VALUES
(5, 3, 30, 10000.00, 0.00, 0.00, 0.00, 10000.00, NULL, '2026-05-29 07:09:37'),
(6, 4, 45, 15000.00, 0.00, 0.00, 0.00, 15000.00, NULL, '2026-06-02 08:24:26'),
(7, 5, 30, 10000.00, 0.00, 0.00, 0.00, 10000.00, NULL, '2026-06-12 08:58:38'),
(8, 6, 30, 10000.00, 0.00, 0.00, 0.00, 10000.00, NULL, '2026-06-12 09:40:31'),
(9, 7, 30, 10000.00, 0.00, 0.00, 0.00, 10000.00, NULL, '2026-06-12 09:41:44'),
(10, 8, 30, 10000.00, 0.00, 0.00, 0.00, 10000.00, NULL, '2026-06-12 09:42:46'),
(11, 9, 30, 10000.00, 0.00, 0.00, 0.00, 10000.00, NULL, '2026-06-12 09:43:04'),
(12, 10, 30, 10000.00, 0.00, 0.00, 0.00, 10000.00, NULL, '2026-06-18 05:58:33'),
(13, 11, 30, 10000.00, 0.00, 0.00, 0.00, 10000.00, NULL, '2026-06-18 05:59:03'),
(14, 12, 30, 10000.00, 0.00, 0.00, 0.00, 10000.00, NULL, '2026-08-10 09:01:35');

-- --------------------------------------------------------

--
-- Table structure for table `payroll_runs`
--

CREATE TABLE `payroll_runs` (
  `id` int(10) UNSIGNED NOT NULL,
  `run_code` varchar(50) NOT NULL,
  `total_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_items` int(11) NOT NULL DEFAULT 0,
  `status` enum('pending','completed','failed') NOT NULL DEFAULT 'pending',
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `payroll_runs`
--

INSERT INTO `payroll_runs` (`id`, `run_code`, `total_amount`, `total_items`, `status`, `created_by`, `created_at`, `admin_id`) VALUES
(3, 'PR-202605-1780038577', 10000.00, 1, 'completed', NULL, '2026-05-29 07:09:37', 9),
(4, 'PR-202606-1780388666', 15000.00, 1, 'completed', NULL, '2026-06-02 08:24:26', 9),
(5, 'PR-202606-1781254718', 10000.00, 1, 'completed', NULL, '2026-06-12 08:58:38', 9),
(6, 'PR-202606-1781257231', 10000.00, 1, 'completed', NULL, '2026-06-12 09:40:31', 9),
(7, 'PR-202606-1781257304', 10000.00, 1, 'completed', NULL, '2026-06-12 09:41:44', 9),
(8, 'PR-202606-1781257366', 10000.00, 1, 'completed', NULL, '2026-06-12 09:42:46', 9),
(9, 'PR-202606-1781257384', 10000.00, 1, 'completed', NULL, '2026-06-12 09:43:04', 9),
(10, 'PR-202606-1781762313', 10000.00, 1, 'completed', NULL, '2026-06-18 05:58:33', 9),
(11, 'PR-202606-1781762343', 10000.00, 1, 'completed', NULL, '2026-06-18 05:59:03', 9),
(12, 'PR-202608-1786352495', 10000.00, 1, 'completed', NULL, '2026-08-10 09:01:35', 9);

-- --------------------------------------------------------

--
-- Table structure for table `recent_activity`
--

CREATE TABLE `recent_activity` (
  `id` int(11) NOT NULL,
  `action` varchar(255) DEFAULT NULL,
  `table_name` varchar(100) DEFAULT NULL,
  `time` varchar(50) DEFAULT NULL,
  `type` varchar(50) DEFAULT NULL,
  `admin_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `recent_activity`
--

INSERT INTO `recent_activity` (`id`, `action`, `table_name`, `time`, `type`, `admin_id`) VALUES
(1, 'New Order Created', 'Table 4', '07:21 AM', 'order', 9),
(2, 'New Order Created', 'Table 4', '07:24 AM', 'order', 9),
(3, 'New Order Created', 'Table 4', '07:33 AM', 'order', 9),
(4, 'New Order Created', 'Table 5', '07:34 AM', 'order', 9),
(5, 'New Order Created', 'Table 4', '07:39 AM', 'order', 9),
(6, 'New Order Created', 'Table 4', '07:41 AM', 'order', 9),
(7, 'New Order Created', 'Table 5', '07:51 AM', 'order', 9),
(8, 'New Order Created', 'Table 4', '10:59 AM', 'order', 9);

-- --------------------------------------------------------

--
-- Table structure for table `restaurant_tables`
--

CREATE TABLE `restaurant_tables` (
  `id` int(11) NOT NULL,
  `admin_id` int(11) NOT NULL,
  `table_name` varchar(50) NOT NULL,
  `status` enum('available','occupied') DEFAULT 'available',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Table structure for table `staff`
--

CREATE TABLE `staff` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `role` varchar(100) NOT NULL,
  `base_salary` decimal(12,2) NOT NULL DEFAULT 0.00,
  `email` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `parent_admin_id` int(11) DEFAULT NULL,
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `staff`
--

INSERT INTO `staff` (`id`, `name`, `role`, `base_salary`, `email`, `password`, `phone`, `image`, `status`, `created_at`, `parent_admin_id`, `admin_id`) VALUES
(9, 'yash1', 'admin', 12000.00, 'admin@gmail.com', '$2y$10$YM78Hu7tWPg.rDld2kdQaujksMwffXyesk1Q0S/zkrqqRbvOKqGwu', '8320775403', 'uploads/staff/1767003155_69525413b2e3e.jpg', 'active', '2025-12-29 10:12:35', NULL, 0),
(13, 'Super Admin', 'super_admin', 0.00, 'superadmin@gmail.com', '$2y$10$zQa2U1s98OWEdCFCnju2x.E0LtxqV/hdkgWL1Bbg939q4HoP2OcSW', '', NULL, 'active', '2026-04-17 06:39:12', NULL, 0),
(30, 'aryan', 'kitchen', 10000.00, 'kitchen30@gmail.com', '$2y$10$EKXntZaTdWxxg3nlWkrryOzcEu2VrplnyBdUWS6VKCJS5wzXUJ2K6', '', NULL, 'active', '2026-04-21 05:34:18', 9, 0),
(39, 'janshi', 'admin', 0.00, 'janshi@gmail.com', '$2y$10$LjD2DVkkzjp1hi6MdFMCTuaTB14YwHTmHOwgpfLlAD1.pQ34qQEfG', NULL, NULL, 'active', '2026-05-06 06:46:14', NULL, 0),
(41, 'yash prajapati', 'waiter', 10000.00, 'prajapatiyash44444@gmail.com', '$2y$10$4.BPk31XXObawAnlRHn10ureXk.OIv2eIYzS/dqPotyAgc.g2avom', '08320775403', NULL, 'active', '2026-05-07 10:10:40', 39, 0),
(42, 'saurabh', 'kitchen', 15000.00, 'saurabh@gmail.com', '$2y$10$5hp4V9lQD5tA.LXNqH8nn..LoDw2goLYkWDeVrY.6TP1vH7R7O.Ge', '8320775403', NULL, 'active', '2026-05-07 10:26:31', 39, 0),
(45, 'Aryan', 'waiter', 12000.00, 'waiter18@gmail.com', '$2y$10$3x1cfdH9.Tne6xB5Vs7MxOGhvmkDJJ2NtmpBTxdtHf8HK0CpZdkpS', '+91 92658 17249', 'uploads/profile/staff_45_20260819095947_d6385fd4.jpg', 'active', '2026-05-29 11:25:05', 9, 0),
(46, 'Vishwam amraniya', 'admin', 0.00, 'vishwamamraniya621@gmail.com', '$2y$10$rPEcPpuW6IDJb6ymy1BRnOy6EFwny39QqDWlEmQBL3P2AuEq2g9n.', NULL, NULL, 'active', '2026-06-04 16:47:50', NULL, 0),
(47, 'Radhe Gathiya', 'admin', 0.00, 'radhegathiya1@gmail.com', '$2y$10$bN7Kms5dpnIFHf6rKScpce0/iPYONbos6QLjClMW8BwpGYFDVsi2q', NULL, NULL, 'active', '2026-06-10 21:16:38', NULL, 0),
(48, 'Aryan', 'admin', 0.00, 'solankiaryan0011@gmail.com', '$2y$10$hxzN.GvwnUSfFSu8AUlBtuYEAZpkknYk6o.phur7x/eUldbvOh472', NULL, NULL, 'active', '2026-06-12 08:47:11', NULL, 0),
(49, 'vishal', 'admin', 0.00, 'vishal@bionick.com', '$2y$10$PYlQ92fdMXpW2nNG0/hiMu5HqfNo2/TAKcuraCZxmr/oDMbRsfRom', NULL, NULL, 'active', '2026-06-18 05:46:34', NULL, 0),
(50, 'yash1', 'admin', 0.00, 'bsyp403@gmail.com', '$2y$10$ZpeyKR4cAtPsR7Dy8hpa9.NTLXWg.kLovErm/6Z0neyrIp3S05xZa', NULL, NULL, 'active', '2026-06-22 07:27:04', NULL, 0),
(51, 'Raj thakor', 'waiter', 12000.00, 'Waiter@gmail.com', '$2y$10$otSOz.KBosjNONKtgOyZLOgnUABMJRvKzOsN72DVI1FIgo6k0GN1u', '+91 63515 43385', NULL, 'active', '2026-06-23 19:33:34', 9, 0),
(52, 'VISHAL', 'admin', 0.00, 'vishal@bionick.co.in', '$2y$10$cWZ5yWJu9q4sKNVz0ptAcOtIn1d7q4EFJ5YiJ/kLwjnt5JQWAvu0a', NULL, NULL, 'active', '2026-07-08 07:26:23', NULL, 0),
(55, 'raj trivedi', 'admin', 0.00, 'work.rajtrivedi@gmail.com', '$2y$10$iN1P59JgvWM8F4lmMiU6Me8XdrbeUaMkdQDMZj4tWBjM/zXbHm/lO', NULL, NULL, 'active', '2026-08-20 06:55:28', NULL, 0);

-- --------------------------------------------------------

--
-- Table structure for table `staff_attendance`
--

CREATE TABLE `staff_attendance` (
  `id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `attendance_date` date NOT NULL,
  `status` enum('Present','Absent') NOT NULL DEFAULT 'Present',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `staff_attendance`
--

INSERT INTO `staff_attendance` (`id`, `staff_id`, `attendance_date`, `status`, `created_at`, `admin_id`) VALUES
(1, 31, '2026-05-04', 'Present', '2026-05-04 09:29:20', 0),
(2, 30, '2026-05-04', 'Present', '2026-05-04 09:37:45', 0),
(3, 31, '2026-05-05', 'Present', '2026-05-05 10:10:13', 0),
(4, 31, '2026-05-18', 'Present', '2026-05-18 11:51:17', 0),
(5, 31, '2026-05-20', 'Present', '2026-05-20 06:43:00', 0),
(6, 30, '2026-05-25', 'Present', '2026-05-25 10:54:23', 9),
(7, 31, '2026-05-26', 'Present', '2026-05-26 07:09:41', 0),
(8, 31, '2026-05-28', 'Present', '2026-05-28 10:26:07', 9),
(9, 31, '2026-05-29', 'Present', '2026-05-29 05:34:57', 9),
(10, 45, '2026-06-02', 'Present', '2026-06-02 08:26:48', 9),
(11, 30, '2026-06-02', 'Present', '2026-06-02 08:28:19', 9),
(12, 45, '2026-06-12', 'Present', '2026-06-12 09:06:45', 9),
(13, 45, '2026-06-19', 'Present', '2026-06-19 08:43:36', 9),
(14, 30, '2026-06-19', 'Present', '2026-06-19 08:52:24', 9),
(15, 45, '2026-06-22', 'Present', '2026-06-22 06:49:53', 9),
(16, 30, '2026-06-22', 'Present', '2026-06-22 07:00:39', 9),
(17, 45, '2026-08-10', 'Absent', '2026-08-10 09:42:55', 9),
(18, 30, '2026-08-10', 'Absent', '2026-08-10 09:57:25', 9),
(19, 45, '2026-08-19', 'Absent', '2026-08-19 10:00:07', 9),
(20, 30, '2026-08-19', 'Present', '2026-08-19 10:13:46', 9);

-- --------------------------------------------------------

--
-- Table structure for table `stock_alerts`
--

CREATE TABLE `stock_alerts` (
  `item_name` varchar(255) NOT NULL,
  `min_stock` decimal(10,2) DEFAULT NULL,
  `notified` tinyint(1) DEFAULT 0,
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `stock_alerts`
--

INSERT INTO `stock_alerts` (`item_name`, `min_stock`, `notified`, `admin_id`) VALUES
('Basmati Rice', 10.00, 0, 0),
('chicken', 4.00, 0, 9),
('Cooking Oil', 5.00, 0, 0),
('Garam Masala', 0.50, 0, 0),
('milk', 25.00, 0, 39),
('Onions', 20.00, 0, 0),
('paneer', 10.00, 0, 0),
('pasta', 5.00, 0, 9),
('Paubhaji', 3.00, 0, 9),
('Potatoes', 10.00, 0, 0),
('raice', 25.00, 0, 9),
('Regular Rice', 15.00, 0, 0),
('Suop', 10.00, 0, 9);

-- --------------------------------------------------------

--
-- Table structure for table `stock_alert_acks`
--

CREATE TABLE `stock_alert_acks` (
  `id` int(11) NOT NULL,
  `item_name` varchar(255) DEFAULT NULL,
  `ack_time` datetime DEFAULT current_timestamp(),
  `note` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `stock_alert_acks`
--

INSERT INTO `stock_alert_acks` (`id`, `item_name`, `ack_time`, `note`) VALUES
(1, 'Basmati Rice', '2025-12-15 16:28:33', ''),
(2, 'Basmati Rice', '2025-12-15 16:28:34', ''),
(3, 'Basmati Rice', '2025-12-15 16:28:34', ''),
(4, 'Basmati Rice', '2025-12-15 16:28:34', '');

-- --------------------------------------------------------

--
-- Table structure for table `tables_list`
--

CREATE TABLE `tables_list` (
  `id` int(11) NOT NULL,
  `table_number` int(11) NOT NULL,
  `capacity` int(11) NOT NULL,
  `status` enum('free','occupied','reserved') DEFAULT 'free',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `ac_type` enum('ac','non-ac') NOT NULL DEFAULT 'non-ac',
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `admin_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tables_list`
--

INSERT INTO `tables_list` (`id`, `table_number`, `capacity`, `status`, `created_at`, `ac_type`, `updated_at`, `admin_id`) VALUES
(2, 1, 4, 'occupied', '2025-12-10 10:00:03', 'non-ac', '2025-12-30 04:54:33', 0),
(4, 2, 6, 'free', '2025-12-10 10:20:40', 'non-ac', '2025-12-31 05:11:11', 0),
(5, 3, 2, 'occupied', '2025-12-10 10:20:47', 'non-ac', '2025-12-29 11:39:11', 0),
(6, 4, 4, 'free', '2025-12-10 10:20:55', 'non-ac', '2025-12-29 11:38:48', 0),
(7, 5, 6, 'occupied', '2025-12-10 10:21:06', 'non-ac', '2025-12-29 11:39:39', 0),
(8, 6, 2, 'free', '2025-12-10 10:21:21', 'non-ac', '2025-12-29 11:37:51', 0),
(9, 8, 5, 'occupied', '2025-12-10 10:22:07', 'non-ac', '2025-12-29 11:37:51', 0),
(10, 9, 2, 'free', '2025-12-10 10:22:41', 'non-ac', '2025-12-29 11:39:50', 0),
(11, 10, 2, 'free', '2025-12-10 10:22:46', 'non-ac', '2025-12-29 11:37:51', 0),
(12, 11, 8, 'occupied', '2025-12-10 10:48:46', 'non-ac', '2025-12-29 11:37:51', 0),
(13, 12, 6, 'free', '2025-12-15 08:48:20', 'non-ac', '2025-12-29 11:37:51', 0),
(14, 13, 6, 'free', '2025-12-23 08:00:40', 'ac', '2025-12-29 11:37:51', 0),
(15, 14, 4, 'free', '2025-12-23 08:16:46', 'non-ac', '2025-12-29 11:37:51', 0),
(16, 15, 4, 'free', '2025-12-23 10:22:51', 'ac', '2025-12-30 10:43:45', 0),
(18, 1, 4, 'free', '2026-05-07 07:15:34', 'ac', '2026-05-07 07:15:34', 39),
(19, 2, 6, 'free', '2026-05-07 11:17:01', 'ac', '2026-05-07 11:17:01', 39),
(25, 9, 4, 'free', '2026-05-20 05:18:39', 'ac', '2026-08-10 09:52:35', 9),
(26, 1, 4, 'free', '2026-05-20 09:13:07', 'non-ac', '2026-08-18 07:36:54', 9),
(27, 2, 4, 'free', '2026-05-20 09:19:24', 'non-ac', '2026-08-19 10:01:02', 9),
(28, 3, 4, 'free', '2026-05-20 09:19:37', 'non-ac', '2026-07-01 07:27:03', 9),
(29, 4, 6, 'free', '2026-05-20 09:20:05', 'ac', '2026-08-19 10:00:46', 9),
(30, 5, 6, 'free', '2026-05-28 11:32:47', 'ac', '2026-08-19 10:00:25', 9),
(32, 7, 3, 'free', '2026-06-02 08:21:04', 'non-ac', '2026-08-10 09:45:34', 9),
(33, 6, 4, 'free', '2026-06-23 18:03:40', 'ac', '2026-08-19 10:00:42', 9),
(34, 8, 6, 'free', '2026-08-10 07:48:12', 'ac', '2026-08-19 10:02:21', 9),
(35, 10, 3, 'free', '2026-08-19 09:54:01', 'non-ac', '2026-08-19 10:01:05', 9);

-- --------------------------------------------------------

--
-- Table structure for table `tax_rates`
--

CREATE TABLE `tax_rates` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `percent` decimal(6,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `admin_id` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tax_rates`
--

INSERT INTO `tax_rates` (`id`, `name`, `percent`, `created_at`, `admin_id`) VALUES
(2, 'tax', 18.00, '2026-01-12 07:35:17', 0),
(3, 'gst', 18.00, '2026-05-07 10:25:10', 39),
(6, '18', 18.00, '2026-06-02 08:26:14', 9);

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `role` enum('admin','waiter','kitchen') NOT NULL DEFAULT 'waiter',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `image` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `name`, `email`, `password`, `role`, `created_at`, `image`) VALUES
(9, 'yash', 'bittuyp37@gmail.com', '123456', 'admin', '2025-12-05 10:55:10', NULL),
(10, 'yahs2', 'yash@bionick.co.in', '123456', '', '2025-12-05 10:58:04', NULL),
(19, 'vishal', 'VISHAL@BIONICK.CO.IN', '$2y$10$S0g0FfzcBiUaBVAP6Q4IauQxXnBw6oikI3hw1D8ljUQMETs9z8PHy', 'kitchen', '2025-12-16 05:09:27', 'uploads/waiters/waiter_6940e9879d6c8.jpg'),
(20, 'yash prajapatii', 'prajapatiyash44444@gmail.com', '$2y$10$x7a0QqPDjL6ViSwSOxcBx./yG4NCBqtOBuXv8g0p0dbW1OMo7A/vq', 'waiter', '2025-12-16 05:11:19', '1766994692_69523304c5149.jpg'),
(21, 'Aryan', 'solankiaryan0011@gmail.com', '$2y$10$Jnj5SOqbYjdo9Zf5ZA9Loe2X81z6r9afoDTbOjE/aJI/rteMB.ezS', 'waiter', '2025-12-16 05:12:35', 'uploads/waiters/waiter_6940ea43ac183.jpg');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bills`
--
ALTER TABLE `bills`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `business_information`
--
ALTER TABLE `business_information`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_admin_category` (`admin_id`,`category_name`);

--
-- Indexes for table `client_modules`
--
ALTER TABLE `client_modules`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `coupons`
--
ALTER TABLE `coupons`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_admin_coupon` (`admin_id`,`code`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `inventory_categories`
--
ALTER TABLE `inventory_categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_admin_inventory_category` (`admin_id`,`category_name`),
  ADD UNIQUE KEY `unique_admin_category` (`admin_id`,`category_name`);

--
-- Indexes for table `inventory_items`
--
ALTER TABLE `inventory_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_admin_inventory_item` (`admin_id`,`name`);

--
-- Indexes for table `kitchen_usage`
--
ALTER TABLE `kitchen_usage`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `menu_items`
--
ALTER TABLE `menu_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `module_catalog`
--
ALTER TABLE `module_catalog`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `module_key` (`module_key`);

--
-- Indexes for table `module_requests`
--
ALTER TABLE `module_requests`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_kot` (`kot_no`),
  ADD UNIQUE KEY `uniq_client_uuid` (`client_uuid`);

--
-- Indexes for table `order_items`
--
ALTER TABLE `order_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`order_id`);

--
-- Indexes for table `payroll_items`
--
ALTER TABLE `payroll_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `payroll_run_id` (`payroll_run_id`),
  ADD KEY `staff_id` (`staff_id`);

--
-- Indexes for table `payroll_runs`
--
ALTER TABLE `payroll_runs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `run_code` (`run_code`);

--
-- Indexes for table `recent_activity`
--
ALTER TABLE `recent_activity`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `restaurant_tables`
--
ALTER TABLE `restaurant_tables`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `staff`
--
ALTER TABLE `staff`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `staff_attendance`
--
ALTER TABLE `staff_attendance`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_staff_date` (`staff_id`,`attendance_date`);

--
-- Indexes for table `stock_alerts`
--
ALTER TABLE `stock_alerts`
  ADD PRIMARY KEY (`item_name`),
  ADD UNIQUE KEY `unique_admin_item` (`admin_id`,`item_name`);

--
-- Indexes for table `stock_alert_acks`
--
ALTER TABLE `stock_alert_acks`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tables_list`
--
ALTER TABLE `tables_list`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_admin_table` (`admin_id`,`table_number`);

--
-- Indexes for table `tax_rates`
--
ALTER TABLE `tax_rates`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bills`
--
ALTER TABLE `bills`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=126;

--
-- AUTO_INCREMENT for table `business_information`
--
ALTER TABLE `business_information`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44;

--
-- AUTO_INCREMENT for table `client_modules`
--
ALTER TABLE `client_modules`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=222;

--
-- AUTO_INCREMENT for table `coupons`
--
ALTER TABLE `coupons`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=79;

--
-- AUTO_INCREMENT for table `inventory_categories`
--
ALTER TABLE `inventory_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `inventory_items`
--
ALTER TABLE `inventory_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT for table `kitchen_usage`
--
ALTER TABLE `kitchen_usage`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `menu_items`
--
ALTER TABLE `menu_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=95;

--
-- AUTO_INCREMENT for table `module_catalog`
--
ALTER TABLE `module_catalog`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `module_requests`
--
ALTER TABLE `module_requests`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=107;

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=180;

--
-- AUTO_INCREMENT for table `order_items`
--
ALTER TABLE `order_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=307;

--
-- AUTO_INCREMENT for table `payroll_items`
--
ALTER TABLE `payroll_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `payroll_runs`
--
ALTER TABLE `payroll_runs`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `recent_activity`
--
ALTER TABLE `recent_activity`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `restaurant_tables`
--
ALTER TABLE `restaurant_tables`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `staff`
--
ALTER TABLE `staff`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;

--
-- AUTO_INCREMENT for table `staff_attendance`
--
ALTER TABLE `staff_attendance`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `stock_alert_acks`
--
ALTER TABLE `stock_alert_acks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `tables_list`
--
ALTER TABLE `tables_list`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;

--
-- AUTO_INCREMENT for table `tax_rates`
--
ALTER TABLE `tax_rates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `order_items`
--
ALTER TABLE `order_items`
  ADD CONSTRAINT `order_items_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `payroll_items`
--
ALTER TABLE `payroll_items`
  ADD CONSTRAINT `payroll_items_ibfk_1` FOREIGN KEY (`payroll_run_id`) REFERENCES `payroll_runs` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `payroll_items_ibfk_2` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE;
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 */;
