-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `restaurant_rms`
--

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

--
-- Table structure for table `activity_logs`
--

CREATE TABLE `activity_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `action` varchar(120) NOT NULL,
  `meta_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`meta_json`)),
  `ip_address` varchar(64) DEFAULT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `activity_logs`
--

INSERT INTO `activity_logs` (`id`, `user_id`, `action`, `meta_json`, `ip_address`, `user_agent`, `created_at`) VALUES
(1, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-27 15:49:11'),
(2, 1, 'tables.status.update', '{\"table_id\":1,\"status\":\"Available\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-27 15:49:36'),
(3, 1, 'orders.create', '{\"order_id\":1,\"order_no\":\"ORD-20260427-0001\",\"table_id\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-27 16:43:46'),
(4, 1, 'orders.create', '{\"order_id\":2,\"order_no\":\"ORD-20260427-0002\",\"table_id\":2}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-27 16:44:30'),
(5, 1, 'orders.create', '{\"order_id\":3,\"order_no\":\"ORD-20260427-0003\",\"table_id\":3}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-27 16:45:05'),
(6, 1, 'orders.create', '{\"order_id\":4,\"order_no\":\"ORD-20260427-0004\",\"table_id\":5}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-27 16:45:30'),
(7, 1, 'orders.create', '{\"order_id\":5,\"order_no\":\"ORD-20260427-0005\",\"table_id\":5}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-27 16:55:36'),
(8, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 12:57:31'),
(9, 1, 'kitchen.status.update', '{\"order_id\":5,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 12:58:51'),
(10, 1, 'kitchen.status.update', '{\"order_id\":5,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 12:59:34'),
(11, 1, 'billing.invoice.create', '{\"invoice_id\":1,\"invoice_no\":\"INV-20260428-0001\",\"order_id\":5}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 12:59:51'),
(12, 1, 'billing.payment.create', '{\"invoice_id\":1,\"amount\":3,\"method\":\"Cash\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 13:00:18'),
(13, 1, 'kitchen.status.update', '{\"order_id\":4,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 13:25:27'),
(14, 1, 'kitchen.status.update', '{\"order_id\":4,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 13:25:40'),
(15, 1, 'billing.invoice.create', '{\"invoice_id\":2,\"invoice_no\":\"INV-20260428-0002\",\"order_id\":4}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 13:25:57'),
(16, 1, 'kitchen.status.update', '{\"order_id\":3,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 14:30:35'),
(17, 1, 'kitchen.status.update', '{\"order_id\":3,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 14:30:42'),
(18, 1, 'billing.invoice.create', '{\"invoice_id\":3,\"invoice_no\":\"INV-20260428-0003\",\"order_id\":3}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 14:30:53'),
(19, 1, 'orders.create', '{\"order_id\":6,\"order_no\":\"ORD-20260428-0001\",\"table_id\":2,\"customer_id\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 15:50:09'),
(20, 1, 'kitchen.status.update', '{\"order_id\":6,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 15:50:59'),
(21, 1, 'kitchen.status.update', '{\"order_id\":6,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 15:51:06'),
(22, 1, 'orders.mark_served', '{\"order_id\":6}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 15:51:12'),
(23, 1, 'kitchen.status.update', '{\"order_id\":2,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:02:38'),
(24, 1, 'kitchen.status.update', '{\"order_id\":2,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:02:55'),
(25, 1, 'kitchen.status.update', '{\"order_id\":1,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:03:35'),
(26, 1, 'kitchen.status.update', '{\"order_id\":1,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:03:42'),
(27, 1, 'orders.mark_served', '{\"order_id\":2}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:06:42'),
(28, 1, 'orders.create', '{\"order_id\":7,\"order_no\":\"ORD-20260428-0002\",\"table_id\":1,\"customer_id\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:08:00'),
(29, 1, 'kitchen.status.update', '{\"order_id\":7,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:08:05'),
(30, 1, 'kitchen.status.update', '{\"order_id\":7,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:08:13'),
(31, 1, 'orders.create', '{\"order_id\":8,\"order_no\":\"ORD-20260428-0003\",\"table_id\":2,\"customer_id\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:15:24'),
(32, 1, 'kitchen.status.update', '{\"order_id\":8,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:15:30'),
(33, 1, 'kitchen.status.update', '{\"order_id\":8,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:15:32'),
(34, 1, 'billing.invoice.create', '{\"invoice_id\":4,\"invoice_no\":\"INV-20260428-0004\",\"order_ids\":[2,6,8]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:16:40'),
(35, 1, 'billing.payment.create', '{\"invoice_id\":4,\"payments\":[{\"method\":\"Cash\",\"amount\":55,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:16:40'),
(36, 1, 'orders.create', '{\"order_id\":9,\"order_no\":\"ORD-20260428-0004\",\"table_id\":4,\"customer_id\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:27:26'),
(37, 1, 'orders.create', '{\"order_id\":10,\"order_no\":\"ORD-20260428-0005\",\"table_id\":3,\"customer_id\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:32:01'),
(38, 1, 'tables.status.update', '{\"table_id\":2,\"status\":\"Occupied\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:37:06'),
(39, 1, 'tables.status.update', '{\"table_id\":2,\"status\":\"Available\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:37:11'),
(40, 1, 'tables.status.update', '{\"table_id\":2,\"status\":\"Billing\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:37:16'),
(41, 1, 'tables.status.update', '{\"table_id\":2,\"status\":\"Available\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-28 16:37:32'),
(42, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-04 15:50:58'),
(43, 1, 'tables.status.update', '{\"table_id\":1,\"status\":\"Available\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-04 15:51:16'),
(44, 1, 'tables.status.update', '{\"table_id\":1,\"status\":\"Occupied\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-04 15:51:18'),
(45, 1, 'tables.status.update', '{\"table_id\":1,\"status\":\"Billing\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-04 15:51:19'),
(46, 1, 'tables.status.update', '{\"table_id\":1,\"status\":\"Available\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-04 15:51:25'),
(47, 1, 'billing.invoice.create', '{\"invoice_id\":5,\"invoice_no\":\"INV-20260504-0001\",\"order_ids\":[1,7]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-04 16:08:19'),
(48, 1, 'billing.payment.create', '{\"invoice_id\":5,\"payments\":[{\"method\":\"Cash\",\"amount\":10,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-04 16:08:19'),
(49, 1, 'billing.payment.create', '{\"invoice_id\":5,\"payments\":[{\"method\":\"Bkash\",\"amount\":14.97,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-04 16:12:20'),
(50, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-05 16:43:54'),
(51, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-05 20:58:23'),
(52, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-05 23:59:56'),
(53, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 00:47:01'),
(54, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 11:24:09'),
(55, 1, 'menu.item.add', '{\"name\":\"test\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 12:19:47'),
(56, 1, 'menu.item.add', '{\"name\":\"za\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 12:25:00'),
(57, 1, 'menu.item.add', '{\"name\":\"test tr\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 12:29:58'),
(58, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 13:07:30'),
(59, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 14:58:27'),
(60, 1, 'tables.status.update', '{\"table_id\":4,\"status\":\"Available\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 14:58:43'),
(61, 1, 'orders.create', '{\"order_id\":11,\"order_no\":\"ORD-20260506-0001\",\"table_id\":1,\"customer_id\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 15:41:43'),
(62, 1, 'orders.create', '{\"order_id\":12,\"order_no\":\"ORD-20260506-0002\",\"table_id\":2,\"customer_id\":2}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:22:22'),
(63, 1, 'kitchen.status.update', '{\"order_id\":12,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:23:04'),
(64, 1, 'kitchen.status.update', '{\"order_id\":12,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:24:44'),
(65, 1, 'kitchen.urgent.update', '{\"order_id\":11,\"urgent\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:24:48'),
(66, 1, 'kitchen.urgent.update', '{\"order_id\":11,\"urgent\":0}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:25:24'),
(67, 1, 'kitchen.urgent.update', '{\"order_id\":10,\"urgent\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:25:26'),
(68, 1, 'orders.mark_served', '{\"order_id\":12}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:25:46'),
(69, 1, 'billing.invoice.create', '{\"invoice_id\":6,\"invoice_no\":\"INV-20260506-0001\",\"order_ids\":[12]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:26:39'),
(70, 1, 'billing.payment.create', '{\"invoice_id\":6,\"payments\":[{\"method\":\"Cash\",\"amount\":10,\"reference\":\"\"},{\"method\":\"Bkash\",\"amount\":15,\"reference\":\"\"},{\"method\":\"Cash\",\"amount\":4.98,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:26:39'),
(71, 1, 'billing.payment.create', '{\"invoice_id\":6,\"payments\":[{\"method\":\"Cash\",\"amount\":0.02,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:26:55'),
(72, 1, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:28:26'),
(73, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:29:16'),
(74, 1, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:29:42'),
(75, 4, 'auth.login', '{\"email\":\"chef@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:29:48'),
(76, 4, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:30:19'),
(77, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:30:33'),
(78, 1, 'orders.urgent.update', '{\"order_id\":10,\"urgent\":0}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-06 16:42:08'),
(79, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:05:11'),
(80, 1, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:06:11'),
(81, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:06:42'),
(82, 1, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:07:31'),
(83, 5, 'auth.login', '{\"email\":\"cashier@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:07:42'),
(84, 5, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:09:23'),
(85, 2, 'auth.login', '{\"email\":\"manager@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:09:29'),
(86, 2, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:10:43'),
(87, 3, 'auth.login', '{\"email\":\"waiter@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:10:51'),
(88, 3, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:11:33'),
(89, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:11:48'),
(90, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:49:32'),
(91, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:52:11'),
(92, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 12:52:18'),
(93, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 13:16:20'),
(94, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 13:17:04'),
(95, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 13:17:19'),
(96, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 14:05:07'),
(97, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 14:05:14'),
(98, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 14:05:40'),
(99, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 15:15:27'),
(100, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 15:15:36'),
(101, 1, 'tables.status.update', '{\"table_id\":4,\"status\":\"Occupied\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 16:13:38'),
(102, 1, 'tables.status.update', '{\"table_id\":4,\"status\":\"Occupied\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 16:13:42'),
(103, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 16:45:45'),
(104, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 17:33:41'),
(105, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 22:20:49'),
(106, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-07 22:21:01'),
(107, 1, 'menu.item.add', '{\"name\":\"tdd\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-08 00:58:21'),
(108, 1, 'menu.item.add', '{\"name\":\"ddd\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-08 01:01:18'),
(109, 1, 'menu.item.add', '{\"name\":\"ddd\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-08 01:02:12'),
(110, 1, 'menu.item.add', '{\"name\":\"xxx\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-08 01:03:36'),
(111, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 15:21:34'),
(112, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 16:05:36'),
(113, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 16:07:49'),
(114, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 16:08:14'),
(115, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 16:18:23'),
(116, 1, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 16:18:33'),
(117, 1, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 16:58:36'),
(118, 6, 'auth.login', '{\"email\":\"zamanador111@gmail.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 16:58:46'),
(119, 6, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:00:15'),
(120, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:00:27'),
(121, 1, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:00:49'),
(122, 2, 'auth.login', '{\"email\":\"manager@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:00:54'),
(123, 2, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:01:53'),
(124, 6, 'auth.login', '{\"email\":\"zamanador111@gmail.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:02:02'),
(125, 6, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:02:45'),
(126, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:02:56'),
(127, 1, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:33:05'),
(128, 6, 'auth.login', '{\"email\":\"zamanador111@gmail.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:33:10'),
(129, 6, 'kitchen.status.update', '{\"order_id\":11,\"status\":\"Cooking\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 17:45:46'),
(130, 6, 'orders.urgent.update', '{\"order_id\":11,\"urgent\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 18:34:13'),
(131, 6, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 18:42:36'),
(132, 6, 'auth.login', '{\"email\":\"zamanador111@gmail.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 19:20:54'),
(133, 6, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-09 19:20:56'),
(134, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-13 22:48:02'),
(135, 1, 'auth.login', '{\"email\":\"admin@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-06-08 14:12:15'),
(136, 6, 'auth.login', '{\"email\":\"admin@gmail.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', '2026-06-24 17:27:31'),
(137, 6, 'orders.create', '{\"order_id\":13,\"order_no\":\"ORD-20260624-0001\",\"table_id\":1,\"customer_id\":2}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', '2026-06-24 17:34:42'),
(138, 6, 'orders.running.start', '{\"order_id\":13}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', '2026-06-24 17:34:48'),
(139, 6, 'kitchen.status.update', '{\"order_id\":13,\"status\":\"Ready\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', '2026-06-24 17:34:50'),
(140, 6, 'orders.delete', '{\"order_id\":13}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', '2026-06-24 17:59:37'),
(141, 6, 'orders.delete', '{\"order_id\":11}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', '2026-06-24 17:59:40'),
(142, 6, 'orders.delete', '{\"order_id\":10}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', '2026-06-24 17:59:43'),
(143, 6, 'orders.delete', '{\"order_id\":9}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', '2026-06-24 17:59:46'),
(144, 6, 'auth.login', '{\"email\":\"admin@gmail.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 13:55:56'),
(145, 6, 'billing.payment.create', '{\"invoice_id\":7,\"payments\":[{\"method\":\"Cash\",\"amount\":320,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:15:41'),
(146, 6, 'billing.quick_sale', '{\"invoice_id\":7,\"invoice_no\":\"INV-20260714-0001\",\"order_id\":14,\"order_no\":\"ORD-20260714-0001\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:15:41'),
(147, 6, 'billing.payment.create', '{\"invoice_id\":8,\"payments\":[{\"method\":\"Cash\",\"amount\":50,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:17:21'),
(148, 6, 'billing.quick_sale', '{\"invoice_id\":8,\"invoice_no\":\"INV-20260714-0002\",\"order_id\":15,\"order_no\":\"ORD-20260714-0002\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:17:21'),
(149, 6, 'billing.payment.create', '{\"invoice_id\":9,\"payments\":[{\"method\":\"Cash\",\"amount\":250,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:28:01'),
(150, 6, 'billing.quick_sale', '{\"invoice_id\":9,\"invoice_no\":\"INV-20260714-0003\",\"order_id\":16,\"order_no\":\"ORD-20260714-0003\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:28:01'),
(151, 6, 'billing.payment.create', '{\"invoice_id\":10,\"payments\":[{\"method\":\"Cash\",\"amount\":250,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:32:16'),
(152, 6, 'billing.quick_sale', '{\"invoice_id\":10,\"invoice_no\":\"INV-20260714-0004\",\"order_id\":17,\"order_no\":\"ORD-20260714-0004\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:32:16'),
(153, 6, 'billing.payment.create', '{\"invoice_id\":11,\"payments\":[{\"method\":\"Cash\",\"amount\":100,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:32:47'),
(154, 6, 'billing.quick_sale', '{\"invoice_id\":11,\"invoice_no\":\"INV-20260714-0005\",\"order_id\":18,\"order_no\":\"ORD-20260714-0005\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:32:47'),
(155, 6, 'billing.payment.create', '{\"invoice_id\":12,\"payments\":[{\"method\":\"Cash\",\"amount\":50,\"reference\":\"\"}]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:33:20'),
(156, 6, 'billing.quick_sale', '{\"invoice_id\":12,\"invoice_no\":\"INV-20260714-0006\",\"order_id\":19,\"order_no\":\"ORD-20260714-0006\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:33:20'),
(157, 6, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:36:49'),
(158, 2, 'auth.login', '{\"email\":\"manager@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:37:01'),
(159, 2, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:37:17'),
(160, 6, 'auth.login', '{\"email\":\"admin@gmail.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:37:26'),
(161, 6, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:37:44'),
(162, 2, 'auth.login', '{\"email\":\"manager@demo.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:37:52'),
(163, 2, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:38:13'),
(164, 6, 'auth.login', '{\"email\":\"admin@gmail.com\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:42:42'),
(165, 6, 'settings.update', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:42:55'),
(166, 6, 'auth.logout', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-14 14:42:58');

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

--
-- Table structure for table `branches`
--

CREATE TABLE `branches` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(120) NOT NULL,
  `code` varchar(40) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `email` varchar(160) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `branches`
--

INSERT INTO `branches` (`id`, `name`, `code`, `address`, `phone`, `email`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Main Branch', 'MAIN', 'Dhaka,Bangladesh', '01845551055', 'support@softwarehutbd.com', 1, '2026-05-07 23:17:28', '2026-06-24 18:06:22'),
(2, '2nd Branch', 'sub', 'Ck,Gosh road,Mymensingh', '01845551055', 'support@softwarehutbd.com', 1, '2026-05-07 23:19:29', '2026-06-24 18:06:08');

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

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `id` int(10) UNSIGNED NOT NULL,
  `branch_id` int(10) UNSIGNED DEFAULT NULL,
  `name` varchar(120) NOT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `email` varchar(160) DEFAULT NULL,
  `due_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `loyalty_points` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`id`, `branch_id`, `name`, `phone`, `email`, `due_amount`, `loyalty_points`, `created_at`) VALUES
(1, 1, 'Walk In Customer', '', '', 0.00, 0, '2026-04-28 13:25:57'),
(2, 1, 'Mr Zaman', '01751018490', 'zamanador111@gmail.com', 0.00, 0, '2026-05-06 15:47:20'),
(3, 2, 'Walk In Customer', '', '', 0.00, 0, '2026-05-09 15:22:24'),
(4, 1, 'pritom hossainnnnn', '01570236438', 'zamanador111@gmail.com', 0.00, 0, '2026-05-09 17:07:48');

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

--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `salary` decimal(10,2) DEFAULT NULL,
  `joined_date` date DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

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

CREATE TABLE `expenses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` int(10) UNSIGNED DEFAULT NULL,
  `category_id` int(10) UNSIGNED DEFAULT NULL,
  `title` varchar(160) NOT NULL DEFAULT 'General Expense',
  `amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `note` text DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `expense_date` date NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `expenses` (`id`, `branch_id`, `category_id`, `title`, `amount`, `note`, `created_by`, `expense_date`, `created_at`, `updated_at`) VALUES
(1, 1, 1, '\'dd', 500.00, '', 1, '2026-05-05', '2026-05-05 16:44:37', NULL),
(2, 1, 1, 'as', 200.00, '', 1, '2026-05-07', '2026-05-07 23:45:40', NULL),
(3, 2, 1, 'ssss', 200.00, '', 1, '2026-05-07', '2026-05-07 23:46:10', NULL);

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

--
-- Table structure for table `expense_categories`
--

CREATE TABLE `expense_categories` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(120) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `expense_categories`
--

INSERT INTO `expense_categories` (`id`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Salary', 'Employee Salary', 1, '2026-05-04 16:32:10', '2026-05-04 16:32:21');

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

--
-- Table structure for table `food_categories`
--

CREATE TABLE `food_categories` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(80) NOT NULL,
  `parent_id` int(10) UNSIGNED DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `food_categories`
--

INSERT INTO `food_categories` (`id`, `name`, `parent_id`, `created_at`) VALUES
(1, 'Burgers', 3, '2026-04-27 15:47:21'),
(2, 'Pizza', NULL, '2026-04-27 15:47:21'),
(3, 'Drinks', NULL, '2026-04-27 15:47:21'),
(4, 'Fast Food', NULL, '2026-06-24 17:57:03'),
(5, 'Biryani', NULL, '2026-06-24 17:57:11'),
(6, 'Pasta', NULL, '2026-06-24 17:57:18'),
(7, 'Snacks', NULL, '2026-06-24 17:57:26'),
(8, 'Beverages', NULL, '2026-06-24 17:57:33');

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

--
-- Table structure for table `food_items`
--

CREATE TABLE `food_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `branch_id` int(10) UNSIGNED NOT NULL,
  `category_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(120) NOT NULL,
  `price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `regular_price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `offer_price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `is_available` tinyint(1) NOT NULL DEFAULT 1,
  `is_popular` tinyint(1) NOT NULL DEFAULT 0,
  `image_path` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `food_items`
--

INSERT INTO `food_items` (`id`, `branch_id`, `category_id`, `name`, `price`, `regular_price`, `offer_price`, `is_available`, `is_popular`, `image_path`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Classic Beef Burger', 320.00, 320.00, 0.00, 1, 1, 'uploads/food_1782302353_9d12f78a.jpg', '2026-04-27 15:47:21', '2026-06-24 17:59:13'),
(2, 1, 1, 'Chicken Burger', 250.00, 250.00, 0.00, 1, 0, 'uploads/food_1782302309_17a55d88.jpg', '2026-04-27 15:47:21', '2026-06-24 17:58:41'),
(3, 1, 2, 'Margherita Pizza', 750.00, 750.00, 0.00, 1, 1, 'uploads/food_1782302592_e8ea4c12.jpg', '2026-04-27 15:47:21', '2026-06-24 18:03:12'),
(4, 1, 2, 'Pepperoni Pizza', 999.00, 999.00, 0.00, 1, 1, 'uploads/food_1782302687_c403f273.jpg', '2026-04-27 15:47:21', '2026-06-24 18:04:51'),
(5, 1, 3, 'Coca Cola', 100.00, 100.00, 0.00, 1, 0, 'uploads/food_1782302462_aabae72f.jpg', '2026-04-27 15:47:21', '2026-06-24 18:04:59'),
(6, 1, 3, 'Mineral Water', 50.00, 50.00, 0.00, 1, 0, 'uploads/food_1782302494_6ab2d845.jpg', '2026-04-27 15:47:21', '2026-06-24 18:05:02'),
(30, 2, 3, 'ddd', 40.00, 60.00, 40.00, 1, 0, NULL, '2026-05-08 01:01:18', '2026-05-08 01:02:28'),
(48, 2, 1, 'xxx', 50.00, 60.00, 50.00, 1, 0, NULL, '2026-05-08 01:03:36', '2026-05-08 01:03:47'),
(58, 1, 2, 'Chicken Pizza (Medium)', 750.00, 750.00, 0.00, 1, 1, 'uploads/food_1782302568_762ecf82.jpg', '2026-06-24 18:02:39', '2026-06-24 18:02:48'),
(63, 1, 2, 'BBQ Pizza (Large)', 1200.00, 1200.00, 0.00, 1, 1, 'uploads/food_1782302646_7a6dfc3f.jpg', '2026-06-24 18:03:33', '2026-06-24 18:04:06');

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

--
-- Table structure for table `invoices`
--

CREATE TABLE `invoices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` int(10) UNSIGNED NOT NULL,
  `invoice_no` varchar(30) NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` int(10) UNSIGNED DEFAULT NULL,
  `subtotal` decimal(10,2) NOT NULL DEFAULT 0.00,
  `discount_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `tax_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `service_charge` decimal(10,2) NOT NULL DEFAULT 0.00,
  `total_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `paid_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `due_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `status` varchar(20) NOT NULL DEFAULT 'Due',
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `invoices`
--

INSERT INTO `invoices` (`id`, `branch_id`, `invoice_no`, `order_id`, `customer_id`, `subtotal`, `discount_amount`, `tax_amount`, `service_charge`, `total_amount`, `paid_amount`, `due_amount`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'INV-20260428-0001', 5, NULL, 3.00, 0.00, 0.00, 0.00, 3.00, 3.00, 0.00, 'Paid', '2026-04-28 12:59:51', '2026-04-28 13:00:18'),
(2, 1, 'INV-20260428-0002', 4, 1, 7.99, 0.00, 0.00, 0.00, 7.99, 0.00, 7.99, 'Due', '2026-04-28 13:25:57', NULL),
(3, 1, 'INV-20260428-0003', 3, 1, 6.99, 0.00, 0.00, 0.00, 6.99, 0.00, 6.99, 'Due', '2026-04-28 14:30:53', NULL),
(4, 1, 'INV-20260428-0004', 2, 1, 56.93, 1.93, 0.00, 0.00, 55.00, 55.00, 0.00, 'Paid', '2026-04-28 16:16:40', '2026-04-28 16:16:40'),
(5, 1, 'INV-20260504-0001', 1, 1, 24.97, 0.00, 0.00, 0.00, 24.97, 24.97, 0.00, 'Paid', '2026-05-04 16:08:19', '2026-05-04 16:12:20'),
(6, 1, 'INV-20260506-0001', 12, 2, 10.49, 0.49, 0.00, 20.00, 30.00, 30.00, 0.00, 'Paid', '2026-05-06 16:26:39', '2026-05-06 16:26:55'),
(7, 1, 'INV-20260714-0001', 14, 1, 320.00, 0.00, 0.00, 0.00, 320.00, 320.00, 0.00, 'Paid', '2026-07-14 14:15:41', '2026-07-14 14:15:41'),
(8, 1, 'INV-20260714-0002', 15, 1, 50.00, 0.00, 0.00, 0.00, 50.00, 50.00, 0.00, 'Paid', '2026-07-14 14:17:21', '2026-07-14 14:17:21'),
(9, 1, 'INV-20260714-0003', 16, 1, 250.00, 0.00, 0.00, 0.00, 250.00, 250.00, 0.00, 'Paid', '2026-07-14 14:28:01', '2026-07-14 14:28:01'),
(10, 1, 'INV-20260714-0004', 17, 1, 250.00, 0.00, 0.00, 0.00, 250.00, 250.00, 0.00, 'Paid', '2026-07-14 14:32:16', '2026-07-14 14:32:16'),
(11, 1, 'INV-20260714-0005', 18, 1, 100.00, 0.00, 0.00, 0.00, 100.00, 100.00, 0.00, 'Paid', '2026-07-14 14:32:47', '2026-07-14 14:32:47'),
(12, 1, 'INV-20260714-0006', 19, 1, 50.00, 0.00, 0.00, 0.00, 50.00, 50.00, 0.00, 'Paid', '2026-07-14 14:33:20', '2026-07-14 14:33:20');

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

--
-- Table structure for table `invoice_orders`
--

CREATE TABLE `invoice_orders` (
  `invoice_id` bigint(20) UNSIGNED NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `invoice_orders`
--

INSERT INTO `invoice_orders` (`invoice_id`, `order_id`, `created_at`) VALUES
(1, 5, '2026-04-28 12:59:51'),
(2, 4, '2026-04-28 13:25:57'),
(3, 3, '2026-04-28 14:30:53'),
(4, 2, '2026-04-28 16:16:40'),
(4, 6, '2026-04-28 16:16:40'),
(4, 8, '2026-04-28 16:16:40'),
(5, 1, '2026-05-04 16:08:19'),
(5, 7, '2026-05-04 16:08:19'),
(6, 12, '2026-05-06 16:26:39'),
(7, 14, '2026-07-14 14:15:41'),
(8, 15, '2026-07-14 14:17:21'),
(9, 16, '2026-07-14 14:28:01'),
(10, 17, '2026-07-14 14:32:16'),
(11, 18, '2026-07-14 14:32:47'),
(12, 19, '2026-07-14 14:33:20');

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

--
-- Table structure for table `invoice_payments`
--

CREATE TABLE `invoice_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` int(10) UNSIGNED NOT NULL,
  `invoice_id` bigint(20) UNSIGNED NOT NULL,
  `method` varchar(30) NOT NULL,
  `amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `reference` varchar(80) DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `invoice_payments`
--

INSERT INTO `invoice_payments` (`id`, `branch_id`, `invoice_id`, `method`, `amount`, `reference`, `created_at`) VALUES
(1, 1, 1, 'Cash', 3.00, '', '2026-04-28 13:00:18'),
(2, 1, 4, 'Cash', 55.00, '', '2026-04-28 16:16:40'),
(3, 1, 5, 'Cash', 10.00, '', '2026-05-04 16:08:19'),
(4, 1, 5, 'Bkash', 14.97, '', '2026-05-04 16:12:20'),
(5, 1, 6, 'Cash', 10.00, '', '2026-05-06 16:26:39'),
(6, 1, 6, 'Bkash', 15.00, '', '2026-05-06 16:26:39'),
(7, 1, 6, 'Cash', 4.98, '', '2026-05-06 16:26:39'),
(8, 1, 6, 'Cash', 0.02, '', '2026-05-06 16:26:55'),
(9, 1, 7, 'Cash', 320.00, '', '2026-07-14 14:15:41'),
(10, 1, 8, 'Cash', 50.00, '', '2026-07-14 14:17:21'),
(11, 1, 9, 'Cash', 250.00, '', '2026-07-14 14:28:01'),
(12, 1, 10, 'Cash', 250.00, '', '2026-07-14 14:32:16'),
(13, 1, 11, 'Cash', 100.00, '', '2026-07-14 14:32:47'),
(14, 1, 12, 'Cash', 50.00, '', '2026-07-14 14:33:20');

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

--
-- Table structure for table `kitchen_queue`
--

CREATE TABLE `kitchen_queue` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `chef_id` int(10) UNSIGNED DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'Pending',
  `is_urgent` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `kitchen_queue`
--

INSERT INTO `kitchen_queue` (`id`, `order_id`, `chef_id`, `status`, `is_urgent`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'Ready', 0, '2026-04-27 16:43:46', '2026-04-28 16:03:42'),
(2, 2, NULL, 'Ready', 0, '2026-04-27 16:44:30', '2026-04-28 16:02:55'),
(3, 3, NULL, 'Ready', 0, '2026-04-27 16:45:05', '2026-04-28 14:30:42'),
(4, 4, NULL, 'Ready', 0, '2026-04-27 16:45:30', '2026-04-28 13:25:40'),
(5, 5, NULL, 'Ready', 0, '2026-04-27 16:55:36', '2026-04-28 12:59:34'),
(6, 6, NULL, 'Ready', 0, '2026-04-28 15:50:09', '2026-04-28 15:51:06'),
(7, 7, NULL, 'Ready', 0, '2026-04-28 16:08:00', '2026-04-28 16:08:13'),
(8, 8, NULL, 'Ready', 0, '2026-04-28 16:15:24', '2026-04-28 16:15:32'),
(12, 12, NULL, 'Ready', 0, '2026-05-06 16:22:22', '2026-05-06 16:24:44');

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

--
-- Table structure for table `order_details`
--

CREATE TABLE `order_details` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `item_id` int(10) UNSIGNED NOT NULL,
  `qty` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `unit_price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `discount_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `line_total` decimal(10,2) NOT NULL DEFAULT 0.00,
  `item_note` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `order_details`
--

INSERT INTO `order_details` (`id`, `order_id`, `item_id`, `qty`, `unit_price`, `discount_amount`, `line_total`, `item_note`, `created_at`) VALUES
(1, 1, 1, 2, 6.99, 0.00, 13.98, '', '2026-04-27 16:43:46'),
(2, 2, 1, 1, 6.99, 0.00, 6.99, '', '2026-04-27 16:44:30'),
(3, 2, 2, 1, 5.99, 0.00, 5.99, '', '2026-04-27 16:44:30'),
(4, 3, 1, 1, 6.99, 0.00, 6.99, '', '2026-04-27 16:45:05'),
(5, 4, 1, 1, 6.99, 0.00, 6.99, '', '2026-04-27 16:45:30'),
(6, 4, 6, 1, 1.00, 0.00, 1.00, '', '2026-04-27 16:45:30'),
(7, 5, 5, 2, 1.50, 0.00, 3.00, '', '2026-04-27 16:55:36'),
(8, 6, 3, 3, 8.99, 0.00, 26.97, '', '2026-04-28 15:50:09'),
(9, 6, 4, 1, 9.99, 0.00, 9.99, '', '2026-04-28 15:50:09'),
(10, 6, 6, 1, 1.00, 0.00, 1.00, '', '2026-04-28 15:50:09'),
(11, 7, 4, 1, 9.99, 0.00, 9.99, '', '2026-04-28 16:08:00'),
(12, 7, 6, 1, 1.00, 0.00, 1.00, 'haf', '2026-04-28 16:08:00'),
(13, 8, 2, 1, 5.99, 0.00, 5.99, '', '2026-04-28 16:15:24'),
(20, 12, 3, 1, 8.99, 0.00, 8.99, '', '2026-05-06 16:22:22'),
(21, 12, 5, 1, 1.50, 0.00, 1.50, '', '2026-05-06 16:22:22'),
(24, 14, 1, 1, 320.00, 0.00, 320.00, '', '2026-07-14 14:15:41'),
(25, 15, 6, 1, 50.00, 0.00, 50.00, '', '2026-07-14 14:17:21'),
(26, 16, 2, 1, 250.00, 0.00, 250.00, '', '2026-07-14 14:28:01'),
(27, 17, 2, 1, 250.00, 0.00, 250.00, '', '2026-07-14 14:32:16'),
(28, 18, 5, 1, 100.00, 0.00, 100.00, '', '2026-07-14 14:32:47'),
(29, 19, 6, 1, 50.00, 0.00, 50.00, '', '2026-07-14 14:33:20');

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

--
-- Table structure for table `order_master`
--

CREATE TABLE `order_master` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` int(10) UNSIGNED NOT NULL,
  `order_no` varchar(30) NOT NULL,
  `table_id` int(10) UNSIGNED NOT NULL,
  `waiter_id` int(10) UNSIGNED DEFAULT NULL,
  `customer_id` int(10) UNSIGNED DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'Pending',
  `subtotal` decimal(10,2) NOT NULL DEFAULT 0.00,
  `discount_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `total_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `notes` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `order_master`
--

INSERT INTO `order_master` (`id`, `branch_id`, `order_no`, `table_id`, `waiter_id`, `customer_id`, `status`, `subtotal`, `discount_amount`, `total_amount`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 'ORD-20260427-0001', 1, 1, 1, 'Completed', 13.98, 0.00, 13.98, '', '2026-04-27 16:43:46', '2026-05-04 16:08:19'),
(2, 1, 'ORD-20260427-0002', 2, 1, 1, 'Completed', 12.98, 0.64, 12.98, '', '2026-04-27 16:44:30', '2026-04-28 16:16:40'),
(3, 1, 'ORD-20260427-0003', 3, 1, 1, 'Completed', 6.99, 0.00, 6.99, '', '2026-04-27 16:45:05', '2026-04-28 14:30:53'),
(4, 1, 'ORD-20260427-0004', 5, 1, 1, 'Completed', 7.99, 0.00, 7.99, '', '2026-04-27 16:45:30', '2026-04-28 13:25:57'),
(5, 1, 'ORD-20260427-0005', 5, 1, NULL, 'Completed', 3.00, 0.00, 3.00, '', '2026-04-27 16:55:36', '2026-04-28 12:59:51'),
(6, 1, 'ORD-20260428-0001', 2, 1, 1, 'Completed', 37.96, 0.64, 37.96, '', '2026-04-28 15:50:09', '2026-04-28 16:16:40'),
(7, 1, 'ORD-20260428-0002', 1, 1, 1, 'Completed', 10.99, 0.00, 10.99, '', '2026-04-28 16:08:00', '2026-05-04 16:08:19'),
(8, 1, 'ORD-20260428-0003', 2, 1, 1, 'Completed', 5.99, 0.64, 5.99, '', '2026-04-28 16:15:24', '2026-04-28 16:16:40'),
(12, 1, 'ORD-20260506-0002', 2, 1, 2, 'Completed', 10.49, 0.49, 10.49, '', '2026-05-06 16:22:22', '2026-05-06 16:26:39'),
(14, 1, 'ORD-20260714-0001', 9, 6, 1, 'Completed', 320.00, 0.00, 320.00, 'Quick Sale', '2026-07-14 14:15:41', NULL),
(15, 1, 'ORD-20260714-0002', 9, 6, 1, 'Completed', 50.00, 0.00, 50.00, 'Quick Sale', '2026-07-14 14:17:21', NULL),
(16, 1, 'ORD-20260714-0003', 9, 6, 1, 'Completed', 250.00, 0.00, 250.00, 'Quick Sale', '2026-07-14 14:28:01', NULL),
(17, 1, 'ORD-20260714-0004', 9, 6, 1, 'Completed', 250.00, 0.00, 250.00, 'Quick Sale', '2026-07-14 14:32:16', NULL),
(18, 1, 'ORD-20260714-0005', 9, 6, 1, 'Completed', 100.00, 0.00, 100.00, 'Quick Sale', '2026-07-14 14:32:47', NULL),
(19, 1, 'ORD-20260714-0006', 9, 6, 1, 'Completed', 50.00, 0.00, 50.00, 'Quick Sale', '2026-07-14 14:33:20', NULL);

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

--
-- Table structure for table `payment_methods`
--

CREATE TABLE `payment_methods` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(80) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `payment_methods`
--

INSERT INTO `payment_methods` (`id`, `name`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'Cash', 1, 1, '2026-05-07 17:44:37', NULL),
(2, 'Card', 1, 2, '2026-05-07 17:44:37', NULL),
(3, 'Mobile', 1, 3, '2026-05-07 17:44:37', NULL),
(4, 'Bank', 1, 4, '2026-05-07 17:44:37', NULL),
(5, 'Bkash', 1, 5, '2026-05-07 17:44:37', NULL),
(6, 'Rocket', 1, 6, '2026-05-07 17:44:37', NULL),
(7, 'Nagad', 1, 7, '2026-05-07 17:44:37', NULL);

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

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` int(10) UNSIGNED NOT NULL,
  `perm_key` varchar(80) NOT NULL,
  `name` varchar(100) NOT NULL,
  `module` varchar(50) NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `perm_key`, `name`, `module`, `created_at`) VALUES
(1, 'tables.view', 'View tables', 'tables', '2026-04-27 15:47:21'),
(2, 'tables.manage', 'Manage tables', 'tables', '2026-04-27 15:47:21'),
(3, 'menu.manage', 'Manage menu items', 'menu', '2026-04-27 15:47:21'),
(4, 'orders.manage', 'Create and manage orders', 'orders', '2026-04-27 15:47:21'),
(5, 'kitchen.view', 'View kitchen queue', 'kitchen', '2026-04-27 15:47:21'),
(6, 'kitchen.update', 'Update kitchen status', 'kitchen', '2026-04-27 15:47:21'),
(7, 'billing.pos', 'Billing/POS access', 'billing', '2026-04-27 15:47:21'),
(8, 'reports.view', 'View reports', 'reports', '2026-04-27 15:47:21'),
(9, 'settings.manage', 'Manage settings', 'settings', '2026-04-27 15:47:21'),
(10, 'users.manage', 'Manage users', 'users', '2026-04-27 15:47:21');

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

--
-- Table structure for table `purchases`
--

CREATE TABLE `purchases` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `supplier_id` int(10) UNSIGNED DEFAULT NULL,
  `purchase_no` varchar(30) NOT NULL,
  `total_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `paid_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `due_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `purchase_items`
--

CREATE TABLE `purchase_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `purchase_id` bigint(20) UNSIGNED NOT NULL,
  `item_name` varchar(120) NOT NULL,
  `qty` decimal(12,3) NOT NULL DEFAULT 0.000,
  `unit` varchar(30) NOT NULL,
  `unit_cost` decimal(10,2) NOT NULL DEFAULT 0.00,
  `line_total` decimal(10,2) NOT NULL DEFAULT 0.00,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

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

CREATE TABLE `restaurant_tables` (
  `id` int(10) UNSIGNED NOT NULL,
  `branch_id` int(10) UNSIGNED NOT NULL,
  `category_id` int(10) UNSIGNED NOT NULL,
  `floor_id` int(10) UNSIGNED DEFAULT NULL,
  `floor_name` varchar(60) NOT NULL DEFAULT 'Main',
  `table_no` varchar(20) NOT NULL,
  `capacity` int(10) UNSIGNED NOT NULL DEFAULT 4,
  `status` varchar(20) NOT NULL DEFAULT 'Available',
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `restaurant_tables`
--

INSERT INTO `restaurant_tables` (`id`, `branch_id`, `category_id`, `floor_id`, `floor_name`, `table_no`, `capacity`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 'Main', '01', 4, 'Available', '2026-04-27 15:47:21', '2026-06-24 17:59:40'),
(2, 1, 1, 1, 'Main', '02', 4, 'Available', '2026-04-27 15:47:21', '2026-05-06 16:26:55'),
(3, 1, 2, 1, 'Main', '03', 6, 'Available', '2026-04-27 15:47:21', '2026-06-24 17:59:43'),
(4, 1, 3, 3, 'VIP', 'V1', 4, 'Available', '2026-04-27 15:47:21', '2026-06-24 17:59:46'),
(5, 1, 4, 2, 'Outdoor', 'O1', 4, 'Billing', '2026-04-27 15:47:21', '2026-04-28 13:25:57'),
(6, 1, 6, 5, 'Test Floor', 'Test Table', 4, 'Available', '2026-05-06 12:14:26', NULL),
(8, 2, 1, 5, 'Test Floor', 'Test Table 3', 4, 'Available', '2026-05-08 01:14:38', NULL),
(9, 1, 1, NULL, 'Counter', 'QS', 1, 'Available', '2026-07-14 14:15:41', '2026-07-14 14:33:20');

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

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(50) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'Full system access', '2026-04-27 15:47:21', NULL),
(2, 'Manager', 'Operations management', '2026-04-27 15:47:21', NULL),
(3, 'Waiter', 'Table orders', '2026-04-27 15:47:21', NULL),
(4, 'Chef', 'Kitchen display system', '2026-04-27 15:47:21', NULL),
(5, 'Cashier', 'Billing and POS', '2026-04-27 15:47:21', NULL);

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

--
-- Table structure for table `role_permissions`
--

CREATE TABLE `role_permissions` (
  `role_id` int(10) UNSIGNED NOT NULL,
  `permission_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `role_permissions`
--

INSERT INTO `role_permissions` (`role_id`, `permission_id`) VALUES
(2, 1),
(2, 4),
(2, 5),
(2, 7),
(2, 8),
(3, 1),
(3, 4),
(4, 5),
(4, 6),
(5, 1),
(5, 7),
(5, 8);

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

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int(10) UNSIGNED NOT NULL,
  `setting_key` varchar(80) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `setting_key`, `setting_value`, `updated_at`) VALUES
(1, 'restaurant.name', 'Restaurant RMS', '2026-07-14 14:42:55'),
(2, 'currency.code', 'USD', '2026-07-14 14:42:55'),
(3, 'tax.rate', '0', '2026-07-14 14:42:55'),
(4, 'service.charge', '0', '2026-07-14 14:42:55'),
(5, 'restaurant.tagline', 'Fresh Food & Great Service', '2026-07-14 14:42:55'),
(6, 'restaurant.phone', '', '2026-07-14 14:42:55'),
(7, 'restaurant.address', '', '2026-07-14 14:42:55'),
(8, 'restaurant.logo', '', '2026-05-05 20:58:36'),
(9, 'receipt.footer', 'Thank you for visiting.', '2026-07-14 14:42:55'),
(10, 'receipt.default_paper', '80', '2026-07-14 14:42:55'),
(11, 'receipt.auto_print', '1', '2026-07-14 14:42:55'),
(12, 'receipt.powered_by', '1', '2026-05-09 16:18:33'),
(13, 'receipt.powered_by_text', 'Powered by Restaurant RMS Team', '2026-05-09 16:18:33'),
(14, 'menu.item.max', '100', '2026-05-09 16:18:33'),
(54, 'app.language', 'en', '2026-07-14 14:42:55'),
(208, 'app.copyright_text', 'Copyright RMS 2026', '2026-05-09 16:18:33'),
(243, 'restaurant.email', '', '2026-07-14 14:42:55'),
(254, 'invoice.contact.display', 'branch_default', '2026-05-09 16:18:33'),
(278, 'restaurant.website', '', '2026-07-14 14:42:55');

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

--
-- Table structure for table `stock_items`
--

CREATE TABLE `stock_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(120) NOT NULL,
  `unit` varchar(30) NOT NULL,
  `reorder_level` decimal(12,3) NOT NULL DEFAULT 0.000,
  `current_qty` decimal(12,3) NOT NULL DEFAULT 0.000,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `stock_movements`
--

CREATE TABLE `stock_movements` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `stock_item_id` int(10) UNSIGNED NOT NULL,
  `movement_type` varchar(20) NOT NULL,
  `qty` decimal(12,3) NOT NULL DEFAULT 0.000,
  `reference_type` varchar(30) DEFAULT NULL,
  `reference_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `suppliers`
--

CREATE TABLE `suppliers` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(120) NOT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `due_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `table_categories`
--

CREATE TABLE `table_categories` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(60) NOT NULL,
  `color_hex` varchar(10) DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `table_categories`
--

INSERT INTO `table_categories` (`id`, `name`, `color_hex`, `created_at`) VALUES
(1, 'Regular', '#27AE60', '2026-04-27 15:47:21'),
(2, 'Family', '#2980B9', '2026-04-27 15:47:21'),
(3, 'VIP', '#C0392B', '2026-04-27 15:47:21'),
(4, 'Outdoor', '#F39C12', '2026-04-27 15:47:21'),
(6, 'Test', '#27AE60', '2026-05-06 12:14:03');

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

--
-- Table structure for table `table_floors`
--

CREATE TABLE `table_floors` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(60) NOT NULL,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `table_floors`
--

INSERT INTO `table_floors` (`id`, `name`, `sort_order`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Main', 0, 1, '2026-05-06 12:11:55', NULL),
(2, 'Outdoor', 3, 1, '2026-05-06 12:11:55', '2026-05-06 12:13:05'),
(3, 'VIP', 2, 1, '2026-05-06 12:11:55', '2026-05-06 12:12:50'),
(5, 'Test Floor', 1, 1, '2026-05-06 12:12:45', NULL);

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

--
-- Table structure for table `user_branches`
--

CREATE TABLE `user_branches` (
  `user_id` int(10) UNSIGNED NOT NULL,
  `branch_id` int(10) UNSIGNED NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_branches`
--

INSERT INTO `user_branches` (`user_id`, `branch_id`, `created_at`) VALUES
(2, 1, '2026-07-14 14:37:38'),
(3, 1, '2026-05-09 16:57:30'),
(3, 2, '2026-05-09 16:57:30'),
(4, 1, '2026-05-09 16:57:18'),
(4, 2, '2026-05-09 16:57:18'),
(5, 1, '2026-05-09 16:57:25'),
(5, 2, '2026-05-09 16:57:25'),
(6, 1, '2026-05-09 17:00:38'),
(6, 2, '2026-05-09 17:00:38');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `activity_logs`
--
ALTER TABLE `activity_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_activity_user` (`user_id`),
  ADD KEY `idx_activity_created` (`created_at`);

--
-- Indexes for table `branches`
--
ALTER TABLE `branches`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`),
  ADD UNIQUE KEY `code` (`code`);

--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_customers_phone` (`phone`),
  ADD KEY `idx_customers_name` (`name`);

--
-- Indexes for table `employees`
--
ALTER TABLE `employees`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employee_user` (`user_id`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_expenses_date` (`expense_date`),
  ADD KEY `idx_expenses_category` (`category_id`),
  ADD KEY `idx_expenses_created_by` (`created_by`);

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

--
-- Indexes for table `food_categories`
--
ALTER TABLE `food_categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`),
  ADD KEY `fk_foodcat_parent` (`parent_id`);

--
-- Indexes for table `food_items`
--
ALTER TABLE `food_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_item_name` (`branch_id`,`name`),
  ADD KEY `idx_food_category` (`category_id`),
  ADD KEY `idx_food_branch` (`branch_id`);

--
-- Indexes for table `invoices`
--
ALTER TABLE `invoices`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `invoice_no` (`invoice_no`),
  ADD UNIQUE KEY `order_id` (`order_id`),
  ADD KEY `fk_invoice_customer` (`customer_id`),
  ADD KEY `idx_invoices_created_at` (`created_at`),
  ADD KEY `idx_invoice_branch` (`branch_id`);

--
-- Indexes for table `invoice_orders`
--
ALTER TABLE `invoice_orders`
  ADD PRIMARY KEY (`invoice_id`,`order_id`),
  ADD UNIQUE KEY `order_id` (`order_id`),
  ADD KEY `idx_invoice_orders_invoice` (`invoice_id`);

--
-- Indexes for table `invoice_payments`
--
ALTER TABLE `invoice_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_payment_invoice` (`invoice_id`),
  ADD KEY `idx_payment_branch` (`branch_id`);

--
-- Indexes for table `kitchen_queue`
--
ALTER TABLE `kitchen_queue`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `order_id` (`order_id`),
  ADD KEY `idx_kitchen_status` (`status`),
  ADD KEY `idx_kitchen_chef` (`chef_id`);

--
-- Indexes for table `order_details`
--
ALTER TABLE `order_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_order_details_order` (`order_id`),
  ADD KEY `fk_details_item` (`item_id`);

--
-- Indexes for table `order_master`
--
ALTER TABLE `order_master`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `order_no` (`order_no`),
  ADD KEY `idx_order_status` (`status`),
  ADD KEY `idx_order_table` (`table_id`),
  ADD KEY `fk_order_waiter` (`waiter_id`),
  ADD KEY `fk_order_customer` (`customer_id`),
  ADD KEY `idx_order_branch` (`branch_id`);

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

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

--
-- Indexes for table `purchases`
--
ALTER TABLE `purchases`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `purchase_no` (`purchase_no`),
  ADD KEY `fk_purchase_supplier` (`supplier_id`);

--
-- Indexes for table `purchase_items`
--
ALTER TABLE `purchase_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_purchaseitem_purchase` (`purchase_id`);

--
-- Indexes for table `restaurant_tables`
--
ALTER TABLE `restaurant_tables`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_floor_table` (`floor_name`,`table_no`),
  ADD KEY `idx_table_status` (`status`),
  ADD KEY `fk_tables_category` (`category_id`),
  ADD KEY `idx_table_floor_id` (`floor_id`),
  ADD KEY `idx_tables_branch` (`branch_id`);

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

--
-- Indexes for table `role_permissions`
--
ALTER TABLE `role_permissions`
  ADD PRIMARY KEY (`role_id`,`permission_id`),
  ADD KEY `fk_rp_perm` (`permission_id`);

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

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

--
-- Indexes for table `stock_movements`
--
ALTER TABLE `stock_movements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_stock_item` (`stock_item_id`);

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

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

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

--
-- Indexes for table `user_branches`
--
ALTER TABLE `user_branches`
  ADD PRIMARY KEY (`user_id`,`branch_id`),
  ADD KEY `fk_userbranches_branch` (`branch_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `activity_logs`
--
ALTER TABLE `activity_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=167;

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

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

--
-- AUTO_INCREMENT for table `employees`
--
ALTER TABLE `employees`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

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

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

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

--
-- AUTO_INCREMENT for table `invoices`
--
ALTER TABLE `invoices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `invoice_payments`
--
ALTER TABLE `invoice_payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `kitchen_queue`
--
ALTER TABLE `kitchen_queue`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `order_details`
--
ALTER TABLE `order_details`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;

--
-- AUTO_INCREMENT for table `order_master`
--
ALTER TABLE `order_master`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

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

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

--
-- AUTO_INCREMENT for table `purchases`
--
ALTER TABLE `purchases`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `purchase_items`
--
ALTER TABLE `purchase_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

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

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

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

--
-- AUTO_INCREMENT for table `stock_items`
--
ALTER TABLE `stock_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stock_movements`
--
ALTER TABLE `stock_movements`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `suppliers`
--
ALTER TABLE `suppliers`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `activity_logs`
--
ALTER TABLE `activity_logs`
  ADD CONSTRAINT `fk_activity_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `employees`
--
ALTER TABLE `employees`
  ADD CONSTRAINT `fk_employee_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `expenses`
--
ALTER TABLE `expenses`
  ADD CONSTRAINT `fk_expense_category` FOREIGN KEY (`category_id`) REFERENCES `expense_categories` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `food_categories`
--
ALTER TABLE `food_categories`
  ADD CONSTRAINT `fk_foodcat_parent` FOREIGN KEY (`parent_id`) REFERENCES `food_categories` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `food_items`
--
ALTER TABLE `food_items`
  ADD CONSTRAINT `fk_food_category` FOREIGN KEY (`category_id`) REFERENCES `food_categories` (`id`);

--
-- Constraints for table `invoices`
--
ALTER TABLE `invoices`
  ADD CONSTRAINT `fk_invoice_customer` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_invoice_order` FOREIGN KEY (`order_id`) REFERENCES `order_master` (`id`);

--
-- Constraints for table `invoice_orders`
--
ALTER TABLE `invoice_orders`
  ADD CONSTRAINT `fk_invoiceorders_invoice` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_invoiceorders_order` FOREIGN KEY (`order_id`) REFERENCES `order_master` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `invoice_payments`
--
ALTER TABLE `invoice_payments`
  ADD CONSTRAINT `fk_payment_invoice` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `kitchen_queue`
--
ALTER TABLE `kitchen_queue`
  ADD CONSTRAINT `fk_kitchen_chef` FOREIGN KEY (`chef_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_kitchen_order` FOREIGN KEY (`order_id`) REFERENCES `order_master` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `order_details`
--
ALTER TABLE `order_details`
  ADD CONSTRAINT `fk_details_item` FOREIGN KEY (`item_id`) REFERENCES `food_items` (`id`),
  ADD CONSTRAINT `fk_details_order` FOREIGN KEY (`order_id`) REFERENCES `order_master` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `order_master`
--
ALTER TABLE `order_master`
  ADD CONSTRAINT `fk_order_customer` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_order_table` FOREIGN KEY (`table_id`) REFERENCES `restaurant_tables` (`id`),
  ADD CONSTRAINT `fk_order_waiter` FOREIGN KEY (`waiter_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `purchases`
--
ALTER TABLE `purchases`
  ADD CONSTRAINT `fk_purchase_supplier` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `purchase_items`
--
ALTER TABLE `purchase_items`
  ADD CONSTRAINT `fk_purchaseitem_purchase` FOREIGN KEY (`purchase_id`) REFERENCES `purchases` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `restaurant_tables`
--
ALTER TABLE `restaurant_tables`
  ADD CONSTRAINT `fk_tables_category` FOREIGN KEY (`category_id`) REFERENCES `table_categories` (`id`),
  ADD CONSTRAINT `fk_tables_floor` FOREIGN KEY (`floor_id`) REFERENCES `table_floors` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `role_permissions`
--
ALTER TABLE `role_permissions`
  ADD CONSTRAINT `fk_rp_perm` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_rp_role` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `stock_movements`
--
ALTER TABLE `stock_movements`
  ADD CONSTRAINT `fk_stockmove_item` FOREIGN KEY (`stock_item_id`) REFERENCES `stock_items` (`id`);

--
-- Constraints for table `user_branches`
--
ALTER TABLE `user_branches`
  ADD CONSTRAINT `fk_userbranches_branch` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_userbranches_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

