[encoded data, 32845 characters]', '1766173682'),
('AlEIpNIVItkQpxjE8vR7G5DqAobif9MM367YhIUy', '1', '212.104.118.127', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', '[encoded data, 18100 characters]', '1766178285'),
('GUO54uIpYClCP9VHc8kPOJqzsXbINXzy8XYQ0kST', '8', '87.97.194.130', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', '[encoded data, 33080 characters]', '1766168151'),
('KIgZZLftMml8cLugFjgCrhRcM3J83hWXdJFvlupa', NULL, '98.88.142.13', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0', 'YTo3OntzOjY6Il90b2tlbiI7czo0MDoieXlBdlZPZGZ2WUJtV0lqYW84TFBXek9YRWpDVnhGTndhSE5mbHlxVSI7czoyMDoiY2hlY2tfbWlncmF0ZV9zdGF0dXMiO3M6NDoiR29vZCI7czoxNToiY3VzdG9tZXJfaXNfcnRsIjtiOjA7czozMToiZ2xvYmFsX2N1cnJlbmN5X2Zvcm1hdF9zZXR0aW5nNCI7TzoyNToiQXBwXE1vZGVsc1xHbG9iYWxDdXJyZW5jeSI6MzQ6e3M6MTM6IgAqAGNvbm5lY3Rpb24iO3M6NToibXlzcWwiO3M6ODoiACoAdGFibGUiO3M6MTc6Imdsb2JhbF9jdXJyZW5jaWVzIjtzOjEzOiIAKgBwcmltYXJ5S2V5IjtzOjI6ImlkIjtzOjEwOiIAKgBrZXlUeXBlIjtzOjM6ImludCI7czoxMjoiaW5jcmVtZW50aW5nIjtiOjE7czo3OiIAKgB3aXRoIjthOjA6e31zOjEyOiIAKgB3aXRoQ291bnQiO2E6MDp7fXM6MTk6InByZXZlbnRzTGF6eUxvYWRpbmciO2I6MDtzOjEwOiIAKgBwZXJQYWdlIjtpOjE1O3M6NjoiZXhpc3RzIjtiOjE7czoxODoid2FzUmVjZW50bHlDcmVhdGVkIjtiOjA7czoyODoiACoAZXNjYXBlV2hlbkNhc3RpbmdUb1N0cmluZyI7YjowO3M6MTM6IgAqAGF0dHJpYnV0ZXMiO2E6MTU6e3M6MjoiaWQiO2k6NDtzOjEzOiJjdXJyZW5jeV9uYW1lIjtzOjU6IkV1cm9zIjtzOjE1OiJjdXJyZW5jeV9zeW1ib2wiO3M6Mzoi4oKsIjtzOjEzOiJjdXJyZW5jeV9jb2RlIjtzOjM6IkVVUiI7czoxMzoiZXhjaGFuZ2VfcmF0ZSI7TjtzOjk6InVzZF9wcmljZSI7TjtzOjE3OiJpc19jcnlwdG9jdXJyZW5jeSI7czoyOiJubyI7czoxNzoiY3VycmVuY3lfcG9zaXRpb24iO3M6NDoibGVmdCI7czoxMzoibm9fb2ZfZGVjaW1hbCI7aToyO3M6MTg6InRob3VzYW5kX3NlcGFyYXRvciI7czoxOiIsIjtzOjE3OiJkZWNpbWFsX3NlcGFyYXRvciI7czoxOiIuIjtzOjY6InN0YXR1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', '1766172161'),
('Ose0MyEdaz5qeV7Kn2qHrZjN4Fclkt1MbsIattz4', NULL, '212.39.86.103', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36', 'YTo3OntzOjY6Il90b2tlbiI7czo0MDoiZHZBYXZ4ZDRHeUFkcG56SmNDelFCM1dZTnEzNWVUcHk5Rk96T29iUCI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czo0NToiaHR0cHM6Ly9oZWxsb3Bvcy5vbmxpbmUvc3VwZXItYWRtaW4tZGFzaGJvYXJkIjt9czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mzc6Imh0dHBzOi8vaGVsbG9wb3Mub25saW5lL21hbmlmZXN0Lmpzb24iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjIwOiJjaGVja19taWdyYXRlX3N0YXR1cyI7czo0OiJHb29kIjtzOjE1OiJjdXN0b21lcl9pc19ydGwiO2k6MDtzOjQ6InVzZXIiO047fQ==', '1766178249'),
('Qw0xPeAurscsbgy0NduhZKtGua98AFWNaCDMtrQp', NULL, '185.4.81.132', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', 'YTo2OntzOjY6Il90b2tlbiI7czo0MDoiTHJiSXprcHhCT3FEd3A2REtxWjh4eGw5ZHZMY2lQWnhpZXVSNHBUViI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mzc6Imh0dHBzOi8vaGVsbG9wb3Mub25saW5lL21hbmlmZXN0Lmpzb24iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjIwOiJjaGVja19taWdyYXRlX3N0YXR1cyI7czo0OiJHb29kIjtzOjE1OiJjdXN0b21lcl9pc19ydGwiO2k6MDtzOjQ6InVzZXIiO047fQ==', '1766178249'),
('rvxyhlzoHiz4wGjDddHaeTbzCv6sxCKY26GT55H2', '7', '212.91.160.203', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', '[encoded data, 213524 characters]', '1766173509'),
('snWGArVXNoJHnfli0quPbLjXgV9n0EHy9kZOpWGR', NULL, '212.39.82.133', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', 'YTo2OntzOjY6Il90b2tlbiI7czo0MDoiSDRxZDFHTGpQd2xYblMxRzdSekMyOGlQWGlYZENFanNQSkhZbXI5MiI7czoyMDoiY2hlY2tfbWlncmF0ZV9zdGF0dXMiO3M6NDoiR29vZCI7czoxNToiY3VzdG9tZXJfaXNfcnRsIjtpOjA7czo0OiJ1c2VyIjtOO3M6OToiX3ByZXZpb3VzIjthOjE6e3M6MzoidXJsIjtzOjM3OiJodHRwczovL2hlbGxvcG9zLm9ubGluZS9tYW5pZmVzdC5qc29uIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', '1766178240'),
('SyLuukQiYHGi4WqGdi1JNCz7hXcFUIopGXh6ue3V', NULL, '212.104.118.127', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', '[encoded data, 15352 characters]', '1766167974');


-- Table structure for table `sms_global_settings`
CREATE TABLE `sms_global_settings` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `license_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchased_on` timestamp NULL DEFAULT NULL,
  `supported_until` timestamp NULL DEFAULT NULL,
  `notify_update` tinyint(1) NOT NULL DEFAULT '1',
  `vonage_api_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vonage_api_secret` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vonage_from_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `msg91_auth_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `msg91_from` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vonage_status` tinyint(1) NOT NULL DEFAULT '0',
  `msg91_status` tinyint(1) NOT NULL DEFAULT '0',
  `phone_verification_status` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `sms_global_settings`
INSERT INTO `sms_global_settings` VALUES
('1', NULL, '384c0006-c196-4a86-bfa0-4a1d78192734', NULL, '2026-05-28 03:22:34', '1', NULL, NULL, NULL, NULL, NULL, '0', '0', '0', '2025-11-27 01:00:55', '2025-11-27 01:00:56');


-- Table structure for table `sms_notification_settings`
CREATE TABLE `sms_notification_settings` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `restaurant_id` bigint unsigned DEFAULT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `send_sms` enum('yes','no') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'no',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sms_notification_settings_restaurant_id_foreign` (`restaurant_id`),
  CONSTRAINT `sms_notification_settings_restaurant_id_foreign` FOREIGN KEY (`restaurant_id`) REFERENCES `restaurants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `sms_notification_settings`
INSERT INTO `sms_notification_settings` VALUES
('1', '2', 'reservation_confirmed', 'no', NULL, NULL),
('2', '2', 'order_bill_sent', 'no', NULL, NULL),
('3', '2', 'send_otp', 'no', NULL, NULL),
('4', '3', 'reservation_confirmed', 'no', NULL, NULL),
('5', '3', 'order_bill_sent', 'no', NULL, NULL),
('6', '3', 'send_otp', 'no', NULL, NULL),
('7', '4', 'reservation_confirmed', 'no', NULL, NULL),
('8', '4', 'order_bill_sent', 'no', NULL, NULL),
('9', '4', 'send_otp', 'no', NULL, NULL);


-- Table structure for table `sms_templates`
CREATE TABLE `sms_templates` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `flow_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `sms_templates_type_unique` (`type`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `sms_templates`
INSERT INTO `sms_templates` VALUES
('1', 'reservation_confirmed', NULL, '2025-11-27 01:00:55', '2025-11-27 01:00:55'),
('2', 'order_bill_sent', NULL, '2025-11-27 01:00:55', '2025-11-27 01:00:55'),
('3', 'send_otp', NULL, '2025-11-27 01:00:55', '2025-11-27 01:00:55'),
('4', 'send_verify_otp', NULL, '2025-11-27 01:00:55', '2025-11-27 01:00:55');


-- Table structure for table `sms_usage_logs`
CREATE TABLE `sms_usage_logs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `restaurant_id` bigint unsigned DEFAULT NULL,
  `branch_id` bigint unsigned DEFAULT NULL,
  `date` datetime NOT NULL,
  `gateway` enum('vonage','msg91') COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('reservation_confirmed','order_bill_sent','send_otp') COLLATE utf8mb4_unicode_ci NOT NULL,
  `count` int NOT NULL DEFAULT '1',
  `package_id` bigint unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `sms_usage_unique` (`restaurant_id`,`branch_id`,`type`,`gateway`,`date`),
  KEY `sms_usage_logs_branch_id_foreign` (`branch_id`),
  KEY `sms_usage_logs_restaurant_id_date_index` (`restaurant_id`,`date`),
  KEY `sms_usage_logs_gateway_type_index` (`gateway`,`type`),
  KEY `sms_usage_logs_date_gateway_index` (`date`,`gateway`),
  KEY `sms_usage_logs_package_id_date_index` (`package_id`,`date`),
  CONSTRAINT `sms_usage_logs_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `sms_usage_logs_package_id_foreign` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `sms_usage_logs_restaurant_id_foreign` FOREIGN KEY (`restaurant_id`) REFERENCES `restaurants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- Table structure for table `split_order_items`
CREATE TABLE `split_order_items` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `split_order_id` bigint unsigned NOT NULL,
  `order_item_id` bigint unsigned NOT NULL,
  `quantity` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `split_order_items_split_order_id_foreign` (`split_order_id`),
  KEY `split_order_items_order_item_id_foreign` (`order_item_id`),
  CONSTRAINT `split_order_items_order_item_id_foreign` FOREIGN KEY (`order_item_id`) REFERENCES `order_items` (`id`) ON DELETE CASCADE,
  CONSTRAINT `split_order_items_split_order_id_foreign` FOREIGN KEY (`split_order_id`) REFERENCES `split_orders` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- Table structure for table `split_orders`
CREATE TABLE `split_orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `amount` decimal(16,2) NOT NULL,
  `status` enum('pending','paid') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `payment_method` enum('cash','upi','card','bank_transfer','due','stripe','razorpay') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cash',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `split_orders_order_id_foreign` (`order_id`),
  CONSTRAINT `split_orders_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- Table structure for table `stripe_payments`
CREATE TABLE `stripe_payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `payment_date` datetime DEFAULT NULL,
  `amount` decimal(16,2) DEFAULT NULL,
  `payment_status` enum('pending','requested','declined','completed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `payment_error_response` text COLLATE utf8mb4_unicode_ci,
  `stripe_payment_intent` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `stripe_session_id` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `stripe_payments_order_id_foreign` (`order_id`),
  CONSTRAINT `stripe_payments_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- Table structure for table `sub_domain_module_settings`
CREATE TABLE `sub_domain_module_settings` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `license_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchased_on` timestamp NULL DEFAULT NULL,
  `supported_until` timestamp NULL DEFAULT NULL,
  `banned_subdomain` longtext COLLATE utf8mb4_unicode_ci,
  `notify_update` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `sub_domain_module_settings`
INSERT INTO `sub_domain_module_settings` VALUES
('1', NULL, '384c0006-c196-4a86-bfa0-4a1d78192734', NULL, '2026-05-28 03:22:34', '[\"admin\"]', '1', '2025-11-27 01:00:12', '2025-11-27 01:07:53');


-- Table structure for table `superadmin_payment_gateways`
CREATE TABLE `superadmin_payment_gateways` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `razorpay_type` enum('test','live') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'test',
  `test_razorpay_key` text COLLATE utf8mb4_unicode_ci,
  `test_razorpay_secret` text COLLATE utf8mb4_unicode_ci,
  `razorpay_test_webhook_key` text COLLATE utf8mb4_unicode_ci,
  `live_razorpay_key` text COLLATE utf8mb4_unicode_ci,
  `live_razorpay_secret` text COLLATE utf8mb4_unicode_ci,
  `razorpay_live_webhook_key` text COLLATE utf8mb4_unicode_ci,
  `razorpay_status` tinyint(1) NOT NULL DEFAULT '0',
  `stripe_type` enum('test','live') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'test',
  `test_stripe_key` text COLLATE utf8mb4_unicode_ci,
  `test_stripe_secret` text COLLATE utf8mb4_unicode_ci,
  `stripe_test_webhook_key` text COLLATE utf8mb4_unicode_ci,
  `live_stripe_key` text COLLATE utf8mb4_unicode_ci,
  `live_stripe_secret` text COLLATE utf8mb4_unicode_ci,
  `stripe_live_webhook_key` text COLLATE utf8mb4_unicode_ci,
  `stripe_status` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `flutterwave_status` tinyint(1) NOT NULL DEFAULT '0',
  `flutterwave_type` enum('test','live') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'test',
  `test_flutterwave_key` text COLLATE utf8mb4_unicode_ci,
  `test_flutterwave_secret` text COLLATE utf8mb4_unicode_ci,
  `test_flutterwave_hash` text COLLATE utf8mb4_unicode_ci,
  `flutterwave_test_webhook_key` text COLLATE utf8mb4_unicode_ci,
  `live_flutterwave_key` text COLLATE utf8mb4_unicode_ci,
  `live_flutterwave_secret` text COLLATE utf8mb4_unicode_ci,
  `live_flutterwave_hash` text COLLATE utf8mb4_unicode_ci,
  `flutterwave_live_webhook_key` text COLLATE utf8mb4_unicode_ci,
  `live_paypal_client_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_paypal_secret` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_paypal_client_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_paypal_secret` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `paypal_status` tinyint(1) NOT NULL DEFAULT '0',
  `paypal_mode` enum('sandbox','live') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sandbox',
  `live_payfast_merchant_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_payfast_merchant_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_payfast_passphrase` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_payfast_merchant_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_payfast_merchant_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_payfast_passphrase` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payfast_mode` enum('sandbox','live') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sandbox',
  `payfast_status` tinyint(1) NOT NULL DEFAULT '0',
  `live_paystack_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_paystack_secret` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_paystack_merchant_email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_paystack_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_paystack_secret` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_paystack_merchant_email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `paystack_payment_url` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT 'https://api.paystack.co',
  `paystack_status` tinyint(1) NOT NULL DEFAULT '0',
  `paystack_mode` enum('sandbox','live') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sandbox',
  `xendit_status` tinyint(1) NOT NULL DEFAULT '0',
  `xendit_mode` enum('sandbox','live') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sandbox',
  `test_xendit_public_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_xendit_secret_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_xendit_public_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_xendit_secret_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_xendit_webhook_token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_xendit_webhook_token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `paddle_status` tinyint(1) NOT NULL DEFAULT '0',
  `paddle_mode` enum('sandbox','live') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sandbox',
  `test_paddle_vendor_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_paddle_api_key` text COLLATE utf8mb4_unicode_ci,
  `test_paddle_public_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_paddle_client_token` text COLLATE utf8mb4_unicode_ci,
  `live_paddle_vendor_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_paddle_api_key` text COLLATE utf8mb4_unicode_ci,
  `live_paddle_public_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_paddle_client_token` text COLLATE utf8mb4_unicode_ci,
  `paddle_webhook_secret` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `superadmin_payment_gateways`
INSERT INTO `superadmin_payment_gateways` VALUES
('1', 'test', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'live', NULL, NULL, NULL, 'pk_live_51SXhz0DgHRHlOzDsoEuwiBR5Dh4rmyYi84yXcF4UAbm0eR43SvmyXlin8BXsOh2eisPCTnixYUgt7Zxket6dfxwS00cl8iMnDb', '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', 'whsec_ieWLqOoMFdLF2xY9GJEKaZZWC1ZOU7uH', '1', '2025-11-27 00:00:25', '2025-11-27 00:44:19', '0', 'test', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', 'sandbox', NULL, NULL, NULL, NULL, NULL, NULL, 'sandbox', '0', NULL, NULL, NULL, NULL, NULL, NULL, 'https://api.paystack.co', '0', 'sandbox', '0', 'sandbox', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'sandbox', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('2', 'test', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'test', NULL, NULL, NULL, NULL, NULL, NULL, '0', '2025-11-27 00:00:54', '2025-11-27 00:00:54', '0', 'test', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', 'sandbox', NULL, NULL, NULL, NULL, NULL, NULL, 'sandbox', '0', NULL, NULL, NULL, NULL, NULL, NULL, 'https://api.paystack.co', '0', 'sandbox', '0', 'sandbox', NULL, NULL, NULL, NULL, NULL, NULL, '0', 'sandbox', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);


-- Table structure for table `suppliers`
CREATE TABLE `suppliers` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `restaurant_id` bigint unsigned NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `suppliers_restaurant_id_foreign` (`restaurant_id`),
  CONSTRAINT `suppliers_restaurant_id_foreign` FOREIGN KEY (`restaurant_id`) REFERENCES `restaurants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- Table structure for table `table_sessions`
CREATE TABLE `table_sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `branch_id` bigint unsigned NOT NULL,
  `table_id` bigint unsigned NOT NULL,
  `locked_by_user_id` bigint unsigned DEFAULT NULL,
  `locked_at` datetime DEFAULT NULL,
  `last_activity_at` datetime DEFAULT NULL,
  `session_token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `table_sessions_session_token_unique` (`session_token`),
  KEY `table_sessions_branch_id_foreign` (`branch_id`),
  KEY `table_sessions_locked_by_user_id_foreign` (`locked_by_user_id`),
  KEY `table_sessions_table_id_locked_by_user_id_index` (`table_id`,`locked_by_user_id`),
  KEY `table_sessions_last_activity_at_index` (`last_activity_at`),
  CONSTRAINT `table_sessions_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `table_sessions_locked_by_user_id_foreign` FOREIGN KEY (`locked_by_user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `table_sessions_table_id_foreign` FOREIGN KEY (`table_id`) REFERENCES `tables` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `table_sessions`
INSERT INTO `table_sessions` VALUES
('1', '3', '1', NULL, NULL, NULL, NULL, '2025-11-27 05:34:56', '2025-12-11 05:48:47'),
('2', '3', '10', NULL, NULL, NULL, NULL, '2025-11-27 10:24:32', '2025-12-19 18:32:59'),
('3', '4', '6', NULL, NULL, NULL, NULL, '2025-11-27 11:27:07', '2025-11-27 16:07:15'),
('4', '4', '2', NULL, NULL, NULL, NULL, '2025-11-27 16:52:10', '2025-12-11 19:27:44'),
('5', '4', '3', NULL, NULL, NULL, NULL, '2025-11-27 18:21:41', '2025-12-05 21:30:14'),
('6', '4', '12', NULL, NULL, NULL, NULL, '2025-11-27 18:47:35', '2025-12-11 23:16:31'),
('7', '4', '4', NULL, NULL, NULL, NULL, '2025-11-27 19:37:18', '2025-11-27 23:50:39'),
('8', '3', '14', NULL, NULL, NULL, NULL, '2025-11-30 08:48:56', '2025-12-01 05:47:10'),
('9', '4', '5', NULL, NULL, NULL, NULL, '2025-12-06 20:25:23', '2025-12-11 19:30:42'),
('10', '4', '13', NULL, NULL, NULL, NULL, '2025-12-06 20:25:28', '2025-12-07 19:33:12'),
('11', '4', '9', NULL, NULL, NULL, NULL, '2025-12-06 20:50:06', '2025-12-06 21:15:33'),
('12', '4', '7', NULL, NULL, NULL, NULL, '2025-12-06 20:50:32', '2025-12-06 20:50:35'),
('13', '4', '8', NULL, NULL, NULL, NULL, '2025-12-06 23:06:19', '2025-12-07 00:18:57');


-- Table structure for table `tables`
CREATE TABLE `tables` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `branch_id` bigint unsigned DEFAULT NULL,
  `table_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `hash` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `available_status` enum('available','reserved','running') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'available',
  `area_id` bigint unsigned NOT NULL,
  `seating_capacity` tinyint unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `tables_area_id_foreign` (`area_id`),
  KEY `tables_branch_id_foreign` (`branch_id`),
  CONSTRAINT `tables_area_id_foreign` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `tables_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `tables`
INSERT INTO `tables` VALUES
('1', '3', 'T1', 'eb8d1c3aeb7aee26ed882cdd45d1597b', 'active', 'available', '1', '6', '2025-11-27 01:34:08', '2025-12-11 05:48:47'),
('2', '4', '1', 'a2ffc30f0bcb174db0cbe493f4904187', 'active', 'available', '2', '6', '2025-11-27 10:21:47', '2025-12-11 19:27:44'),
('3', '4', '2', 'b4080a0a05bd5835bc870767767f2d3b', 'active', 'available', '2', '6', '2025-11-27 10:22:54', '2025-12-02 18:22:16'),
('4', '4', '3', '1383d0450c4127580f1999f64f018c10', 'active', 'available', '2', '6', '2025-11-27 10:23:04', '2025-12-02 18:21:48'),
('5', '4', '4', '59e0356d205876647df30d3a4c40537e', 'active', 'available', '2', '6', '2025-11-27 10:23:14', '2025-12-11 19:30:42'),
('6', '4', '5', 'a84f59b9a9efafade4e31ef1a3544750', 'active', 'available', '2', '6', '2025-11-27 10:23:24', '2025-11-27 10:23:24'),
('7', '4', '6', 'bd255fdd5e2d6a0a0378015b1fb6b668', 'active', 'available', '2', '4', '2025-11-27 10:23:38', '2025-11-27 10:23:38'),
('8', '4', '7', '56165606f53b7b28d69ec2d4236e87d7', 'active', 'available', '2', '4', '2025-11-27 10:24:03', '2025-12-07 00:18:57'),
('9', '4', '8', '87cad8dd99979cdc267ccb1ce6b60154', 'active', 'available', '2', '4', '2025-11-27 10:24:22', '2025-11-27 10:24:22'),
('10', '3', 'T2', 'd763636295cb049faad61d2955348028', 'active', 'available', '1', '4', '2025-11-27 10:24:23', '2025-12-11 05:51:33'),
('11', '4', '9', '10dd42b6e6a992afef88bf3bc960b8eb', 'active', 'available', '2', '4', '2025-11-27 10:24:53', '2025-11-27 10:24:53'),
('12', '4', '10', 'd922dbc300b2953a9137d8818d94d84b', 'active', 'running', '2', '4', '2025-11-27 10:25:42', '2025-12-11 21:28:12'),
('13', '4', '11', '724af6f56ac61f67b62e746f466d7bc0', 'active', 'available', '2', '4', '2025-11-27 10:25:54', '2025-12-07 19:33:12'),
('14', '3', 'T3', '41dac1b2b242782e26978c19e44ab229', 'active', 'available', '1', '6', '2025-11-30 08:47:49', '2025-12-11 05:55:18'),
('15', '5', 'T1', 'e180895147ed81fee6e2515ff742ec34', 'active', 'available', '3', '3', '2025-12-01 11:36:39', '2025-12-01 11:36:39'),
('16', '5', 'T2', '99938a5f9ac02fb1db439675f6d63ee1', 'active', 'available', '3', '4', '2025-12-01 11:37:10', '2025-12-01 11:37:10'),
('17', '5', 'T3', '744d2325cae07330f9796750783d21bd', 'active', 'available', '3', '4', '2025-12-01 11:37:27', '2025-12-01 11:37:27'),
('18', '5', 'T4', 'ccca7de3c3640c7970418f426a4eb1b2', 'active', 'available', '3', '2', '2025-12-01 11:38:10', '2025-12-01 11:38:10'),
('19', '5', 'T5', '2c6f96cbf9fb682ae5595b2689f9e391', 'active', 'available', '3', '5', '2025-12-01 11:38:28', '2025-12-01 11:38:28'),
('20', '5', 'T6', '5f0709bff4c473d3f735d2e5ccbcd379', 'active', 'available', '3', '5', '2025-12-01 11:38:41', '2025-12-01 11:38:41'),
('21', '5', 'T7', '51f78d3e7872bfe494d25236391a7b30', 'active', 'available', '3', '1', '2025-12-01 11:39:05', '2025-12-01 11:39:05'),
('22', '5', 'T8', '002809e53dbdbb7de3ca2c7b0461ca39', 'active', 'available', '3', '1', '2025-12-01 11:39:23', '2025-12-01 11:39:23'),
('23', '5', 'T9', 'cc63129cbbf3ca2791ff6394dcfb439b', 'active', 'available', '3', '1', '2025-12-01 11:39:36', '2025-12-01 11:39:36'),
('24', '5', 't10', '2996ff8efde44b7c766c36dba451c9b7', 'active', 'available', '3', '1', '2025-12-01 11:39:52', '2025-12-01 11:39:52'),
('25', '5', 'TB1', 'b8efa1713fafcc299812b7dd10d725d5', 'active', 'available', '3', '3', '2025-12-01 11:40:21', '2025-12-01 11:40:21'),
('26', '5', 'TB2', '1f82efd737f4bf271280ccd1b7a8ffc9', 'active', 'available', '3', '3', '2025-12-01 11:40:35', '2025-12-01 11:40:35'),
('27', '5', 'TB3', 'c00ed7d313714e3b742edc49fe4a922b', 'active', 'available', '3', '4', '2025-12-01 11:40:53', '2025-12-01 11:40:53'),
('28', '5', 'TB4', 'cb718c73dd2adbea0591b18fef4dcabf', 'active', 'available', '3', '4', '2025-12-01 11:41:06', '2025-12-01 11:41:06'),
('29', '5', 'TB5', 'f8dd599f693fdcc9eed9f35a005b7f64', 'active', 'available', '3', '5', '2025-12-01 11:41:24', '2025-12-01 11:41:24'),
('30', '5', 'TB6', '9d53d366d2c35b9dad0ed0a8d34b6803', 'active', 'available', '3', '1', '2025-12-01 11:41:41', '2025-12-01 11:41:41'),
('31', '5', 'TB7', '33659e63dabcc19032f87dc78148a6fc', 'active', 'available', '3', '1', '2025-12-01 11:41:57', '2025-12-01 11:41:57'),
('32', '5', 'TB8', '8318b4b73d198db755f85b9aed749a07', 'active', 'available', '3', '1', '2025-12-01 11:42:17', '2025-12-01 11:42:17'),
('33', '5', 'TB9', 'eb6df55dd852b913038251a780ddfc3d', 'active', 'available', '3', '1', '2025-12-01 11:42:27', '2025-12-01 11:42:27');


-- Table structure for table `taxes`
CREATE TABLE `taxes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `restaurant_id` bigint unsigned DEFAULT NULL,
  `tax_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tax_percent` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `taxes_restaurant_id_foreign` (`restaurant_id`),
  CONSTRAINT `taxes_restaurant_id_foreign` FOREIGN KEY (`restaurant_id`) REFERENCES `restaurants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `taxes`
INSERT INTO `taxes` VALUES
('1', '1', 'SGST', '2.5', '2025-11-27 00:00:54', '2025-11-27 00:00:54'),
('2', '1', 'CGST', '2.5', '2025-11-27 00:00:54', '2025-11-27 00:00:54');


-- Table structure for table `units`
CREATE TABLE `units` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `branch_id` bigint unsigned NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `symbol` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `units_branch_id_foreign` (`branch_id`),
  CONSTRAINT `units_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `units`
INSERT INTO `units` VALUES
('1', '1', 'Kilogram', 'kg', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('2', '1', 'Gram', 'g', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('3', '1', 'Liter', 'L', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('4', '1', 'Milliliter', 'ml', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('5', '1', 'Piece', 'pc', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('6', '1', 'Box', 'box', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('7', '1', 'Dozen', 'dz', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('8', '1', 'Bottle', 'btl', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('9', '1', 'Package', 'pkg', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('10', '1', 'Can', 'can', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('11', '2', 'Kilogram', 'kg', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('12', '2', 'Gram', 'g', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('13', '2', 'Liter', 'L', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('14', '2', 'Milliliter', 'ml', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('15', '2', 'Piece', 'pc', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('16', '2', 'Box', 'box', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('17', '2', 'Dozen', 'dz', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('18', '2', 'Bottle', 'btl', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('19', '2', 'Package', 'pkg', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('20', '2', 'Can', 'can', '2025-11-27 01:00:03', '2025-11-27 01:00:03'),
('21', '3', 'Kilogram', 'kg', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('22', '3', 'Gram', 'g', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('23', '3', 'Liter', 'L', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('24', '3', 'Milliliter', 'ml', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('25', '3', 'Piece', 'pc', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('26', '3', 'Box', 'box', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('27', '3', 'Dozen', 'dz', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('28', '3', 'Bottle', 'btl', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('29', '3', 'Package', 'pkg', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('30', '3', 'Can', 'can', '2025-11-27 01:20:35', '2025-11-27 01:20:35'),
('31', '4', 'Kilogram', 'kg', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('32', '4', 'Gram', 'g', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('33', '4', 'Liter', 'L', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('34', '4', 'Milliliter', 'ml', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('35', '4', 'Piece', 'pc', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('36', '4', 'Box', 'box', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('37', '4', 'Dozen', 'dz', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('38', '4', 'Bottle', 'btl', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('39', '4', 'Package', 'pkg', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('40', '4', 'Can', 'can', '2025-11-27 10:17:19', '2025-11-27 10:17:19'),
('41', '5', 'Kilogram', 'kg', '2025-12-01 11:34:12', '2025-12-01 11:34:12'),
('42', '5', 'Gram', 'g', '2025-12-01 11:34:12', '2025-12-01 11:34:12'),
('43', '5', 'Liter', 'L', '2025-12-01 11:34:12', '2025-12-01 11:34:12'),
('44', '5', 'Milliliter', 'ml', '2025-12-01 11:34:12', '2025-12-01 11:34:12'),
('45', '5', 'Piece', 'pc', '2025-12-01 11:34:12', '2025-12-01 11:34:12'),
('46', '5', 'Box', 'box', '2025-12-01 11:34:12', '2025-12-01 11:34:12'),
('47', '5', 'Dozen', 'dz', '2025-12-01 11:34:12', '2025-12-01 11:34:12'),
('48', '5', 'Bottle', 'btl', '2025-12-01 11:34:12', '2025-12-01 11:34:12'),
('49', '5', 'Package', 'pkg', '2025-12-01 11:34:12', '2025-12-01 11:34:12'),
('50', '5', 'Can', 'can', '2025-12-01 11:34:12', '2025-12-01 11:34:12');


-- Table structure for table `universal_bundle_settings`
CREATE TABLE `universal_bundle_settings` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `purchase_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supported_until` timestamp NULL DEFAULT NULL,
  `purchased_on` timestamp NULL DEFAULT NULL,
  `license_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notify_update` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `universal_bundle_settings`
INSERT INTO `universal_bundle_settings` VALUES
('1', '384c0006-c196-4a86-bfa0-4a1d78192734', '2026-05-28 03:22:34', '2025-11-26 12:22:34', 'Regular License', '1', '2025-11-27 00:57:59', '2025-11-27 00:59:23');


-- Table structure for table `universal_module_installs`
CREATE TABLE `universal_module_installs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `module_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `version` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `universal_module_installs`
INSERT INTO `universal_module_installs` VALUES
('1', 'Backup', '1.0.2\n', '2025-11-27 00:59:34', '2025-11-27 00:59:34'),
('2', 'Subdomain', '1.0.2\n', '2025-11-27 01:00:13', '2025-11-27 01:00:13'),
('3', 'Sms', '1.0.0\n', '2025-11-27 01:00:56', '2025-11-27 01:00:56'),
('4', 'MultiPOS', '1.0.0\n', '2025-11-27 01:01:05', '2025-11-27 01:01:05'),
('5', 'LanguagePack', '1.0.7\n', '2025-11-27 01:01:18', '2025-11-27 01:01:18'),
('6', 'Kiosk', '1.0.3\n', '2025-11-27 01:01:26', '2025-11-27 01:01:26'),
('7', 'CashRegister', '1.0.13\n', '2025-11-27 01:01:34', '2025-11-27 01:01:34');


-- Table structure for table `users`
CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `restaurant_id` bigint unsigned DEFAULT NULL,
  `branch_id` bigint unsigned DEFAULT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `terms_and_privacy_accepted` tinyint(1) NOT NULL DEFAULT '0',
  `marketing_emails_accepted` tinyint(1) NOT NULL DEFAULT '0',
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `two_factor_secret` text COLLATE utf8mb4_unicode_ci,
  `two_factor_recovery_codes` text COLLATE utf8mb4_unicode_ci,
  `two_factor_confirmed_at` timestamp NULL DEFAULT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `current_team_id` bigint unsigned DEFAULT NULL,
  `profile_photo_path` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `locale` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en',
  `stripe_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pm_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pm_last_four` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `trial_ends_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`),
  KEY `users_restaurant_id_foreign` (`restaurant_id`),
  KEY `users_stripe_id_index` (`stripe_id`),
  KEY `idx_branch_email` (`branch_id`,`email`),
  CONSTRAINT `users_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `users_restaurant_id_foreign` FOREIGN KEY (`restaurant_id`) REFERENCES `restaurants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `users`
INSERT INTO `users` VALUES
('1', NULL, NULL, 'Halil Sidzhimov', 'hsidzhimov@gmail.com', '0885219072', '359', '0', '0', NULL, '$2y$12$ClO4NIh4WsmASNZlniHmz.2.iI05ucp06aDuhttEeo3MlL6gK.4YG', NULL, NULL, NULL, 'r35ciVsMwbQUzH4zC2dgjmWvzmf0vY8mM9x73gktiLZ6hDtqIC2JXFkZtupC', NULL, NULL, '2025-11-27 00:00:51', '2025-12-03 10:30:02', 'en', NULL, NULL, NULL, NULL),
('2', '1', NULL, 'John Doe', 'admin@example.com', NULL, NULL, '0', '0', NULL, '$2y$12$16ZiNLDcIVyZg0ORbPKC4eqpjYWszI/BrUIeqkmN65hECtonu.RCe', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-27 00:00:54', '2025-11-27 00:21:42', 'en', NULL, NULL, NULL, NULL),
('3', '1', '1', 'Jaquelyn Battle', 'waiter@example.com', NULL, NULL, '0', '0', NULL, '$2y$12$VUTdeQb1h0JbyLSzEIw4L.SMIHzngKyGhjZ35kI7mb/FpnnZmdQtm', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-27 00:00:55', '2025-11-27 00:21:42', 'en', NULL, NULL, NULL, NULL),
('4', '2', '3', 'Halil Sidzhimov', 'hsidzhimov@googlemail.com', '07999973384', '359', '0', '0', NULL, '$2y$12$wMGHtu.QqaPcbrb5EHF8DuNB5Gd8hIId.AEl.W/0ZM8TCFjLTD6/u', NULL, NULL, NULL, 'X1Dl8hwnTXOcpgv9XeczrryI8dC2Z5DEzuaJD3CjP2GGwgmzxQNtCMAUXZxA', NULL, NULL, '2025-11-27 01:20:35', '2025-11-27 01:20:35', 'en', NULL, NULL, NULL, NULL),
('5', '3', '4', 'Kalofer Zakov', 'vip.zakov@gmail.com', '877022773', '359', '0', '0', NULL, '$2y$12$.m8Y7guJRrMasqokkPeq1OiLLXDaMyWki6fDUZ5xjKey/VpIJmUGu', NULL, NULL, NULL, 'fSDUjuiU9Bps5hPjAUcxEbb86EbIhCU7qVsuj1L9aUzJ1epVU1zqTAV0ZZKj', NULL, NULL, '2025-11-27 10:17:23', '2025-11-27 16:23:06', 'en', NULL, NULL, NULL, NULL),
('6', '3', '4', 'Hristo', 'hvuljev@gmail.com', '896933538', '359', '0', '0', NULL, '$2y$12$/yIgsqNQzzzlvg.ZE/vBnegQfCau4dkHxD27J.ZAbkKogjTCpecqu', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-27 14:17:22', '2025-11-27 16:06:00', 'en', NULL, NULL, NULL, NULL),
('7', '4', '5', 'Nicolay Yordanov', 'nicolas@abv.bg', '884909605', '359', '0', '0', NULL, '$2y$12$f9f/L3.VCoL/mGO4Dna34.RwERyC98F7CJVjackjDf4WfsDEWQmW2', NULL, NULL, NULL, 'MwpotdPTTGCBN2mFB6A1pmUS24IykPxxJXGpqgvqU7sBevHmJJqJGphMkaqK', NULL, NULL, '2025-12-01 11:34:16', '2025-12-01 11:34:16', 'en', NULL, NULL, NULL, NULL),
('8', NULL, NULL, 'Kalofer Zakov', 'office@rosie.vodka', NULL, NULL, '0', '0', NULL, '$2y$12$3Zs91TIhePJ7THLZbkjEEO0kV3B8NNmrO8B/P8c8IJCzjWdoxFNCa', NULL, NULL, NULL, 'w8DBrQSIEPwVrOlGqmat6715SqDItgNoc2nn0gPOaXGuRWZsoObHcyUfnVKd', NULL, NULL, '2025-12-03 10:26:41', '2025-12-03 10:26:41', 'en', NULL, NULL, NULL, NULL);


-- Table structure for table `waiter_requests`
CREATE TABLE `waiter_requests` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `branch_id` bigint unsigned NOT NULL,
  `table_id` bigint unsigned NOT NULL,
  `status` enum('pending','completed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `waiter_requests_branch_id_foreign` (`branch_id`),
  KEY `waiter_requests_table_id_foreign` (`table_id`),
  CONSTRAINT `waiter_requests_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE,
  CONSTRAINT `waiter_requests_table_id_foreign` FOREIGN KEY (`table_id`) REFERENCES `tables` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- Table structure for table `xendit_payments`
CREATE TABLE `xendit_payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `payment_date` datetime DEFAULT NULL,
  `amount` decimal(16,2) DEFAULT NULL,
  `payment_status` enum('pending','requested','declined','completed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `payment_error_response` text COLLATE utf8mb4_unicode_ci,
  `xendit_payment_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `xendit_invoice_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `xendit_external_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `xendit_payments_order_id_foreign` (`order_id`),
  CONSTRAINT `xendit_payments_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

