{
    "format": 1,
    "tables": {
        "account_transactions": "CREATE TABLE `account_transactions` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `account_id` int NOT NULL,\n  `type` enum('debit','credit') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `sub_type` enum('opening_balance','fund_transfer','deposit') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `amount` decimal(22,4) NOT NULL,\n  `reff_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `operation_date` datetime NOT NULL,\n  `created_by` int NOT NULL,\n  `transaction_id` int DEFAULT NULL,\n  `transaction_payment_id` int DEFAULT NULL,\n  `transfer_transaction_id` int DEFAULT NULL,\n  `note` text COLLATE utf8mb4_unicode_ci,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `account_transactions_account_id_index` (`account_id`),\n  KEY `account_transactions_transaction_id_index` (`transaction_id`),\n  KEY `account_transactions_transaction_payment_id_index` (`transaction_payment_id`),\n  KEY `account_transactions_transfer_transaction_id_index` (`transfer_transaction_id`),\n  KEY `account_transactions_created_by_index` (`created_by`),\n  KEY `account_transactions_type_index` (`type`),\n  KEY `account_transactions_sub_type_index` (`sub_type`),\n  KEY `account_transactions_operation_date_index` (`operation_date`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "account_types": "CREATE TABLE `account_types` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `parent_account_type_id` int DEFAULT NULL,\n  `business_id` int NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `account_category` enum('asset','liability','equity','revenue','expense','contra_asset','contra_liability') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `normal_balance` enum('debit','credit') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_system` tinyint(1) NOT NULL DEFAULT '0',\n  `sort_order` int NOT NULL DEFAULT '0',\n  `name_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `name_ar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `account_types_parent_account_type_id_index` (`parent_account_type_id`),\n  KEY `account_types_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "accounting_account_mappings": "CREATE TABLE `accounting_account_mappings` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `mapping_key` varchar(60) NOT NULL,\n  `account_id` bigint unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `accounting_account_mappings_business_id_mapping_key_unique` (`business_id`,`mapping_key`),\n  KEY `accounting_account_mappings_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci",
        "accounting_periods": "CREATE TABLE `accounting_periods` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `fiscal_year` int NOT NULL,\n  `starts_on` date NOT NULL,\n  `ends_on` date NOT NULL,\n  `status` enum('open','locked','closed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',\n  `created_by` int DEFAULT NULL,\n  `locked_by` int DEFAULT NULL,\n  `locked_at` datetime DEFAULT NULL,\n  `closed_by` int DEFAULT NULL,\n  `closed_at` datetime DEFAULT NULL,\n  `notes` text COLLATE utf8mb4_unicode_ci,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `accounting_periods_business_name_unique` (`business_id`,`name`),\n  KEY `ap_business_status_idx` (`business_id`,`status`),\n  KEY `ap_business_dates_idx` (`business_id`,`starts_on`,`ends_on`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "accounts": "CREATE TABLE `accounts` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `account_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `account_details` text COLLATE utf8mb4_unicode_ci,\n  `account_type_id` int DEFAULT NULL,\n  `note` text COLLATE utf8mb4_unicode_ci,\n  `created_by` int NOT NULL,\n  `is_closed` tinyint(1) NOT NULL DEFAULT '0',\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `parent_account_id` int DEFAULT NULL,\n  `account_category` enum('asset','liability','equity','revenue','expense','contra_asset','contra_liability') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `normal_balance` enum('debit','credit') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_system` tinyint(1) NOT NULL DEFAULT '0',\n  `is_postable` tinyint(1) NOT NULL DEFAULT '1',\n  `sort_order` int NOT NULL DEFAULT '0',\n  `name_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `name_ar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `accounts_business_id_index` (`business_id`),\n  KEY `accounts_account_type_id_index` (`account_type_id`),\n  KEY `accounts_created_by_index` (`created_by`),\n  KEY `accounts_business_parent_idx` (`business_id`,`parent_account_id`),\n  KEY `accounts_business_category_idx` (`business_id`,`account_category`),\n  KEY `accounts_business_postable_idx` (`business_id`,`is_postable`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "activity_log": "CREATE TABLE `activity_log` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `log_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `subject_id` int DEFAULT NULL,\n  `subject_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `event` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `business_id` int DEFAULT NULL,\n  `causer_id` int DEFAULT NULL,\n  `causer_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `properties` text COLLATE utf8mb4_unicode_ci,\n  `batch_uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `activity_log_log_name_index` (`log_name`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "advanced_report_configurations": "CREATE TABLE `advanced_report_configurations` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `report_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `report_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `columns` longtext COLLATE utf8mb4_unicode_ci,\n  `filters` longtext COLLATE utf8mb4_unicode_ci,\n  `settings` longtext COLLATE utf8mb4_unicode_ci,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `created_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `arc_type_active_idx` (`report_type`,`is_active`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "advanced_report_exports": "CREATE TABLE `advanced_report_exports` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `report_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `file_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `file_path` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `export_format` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'excel',\n  `filters` longtext COLLATE utf8mb4_unicode_ci,\n  `total_records` int NOT NULL DEFAULT '0',\n  `status` enum('pending','processing','completed','failed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',\n  `error_message` longtext COLLATE utf8mb4_unicode_ci,\n  `started_at` timestamp NULL DEFAULT NULL,\n  `completed_at` timestamp NULL DEFAULT NULL,\n  `created_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `are_biz_status_idx` (`business_id`,`status`),\n  KEY `are_created_status_idx` (`created_at`,`status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "advanced_report_saved_filters": "CREATE TABLE `advanced_report_saved_filters` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `user_id` int unsigned NOT NULL,\n  `report_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `filter_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `filter_data` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n  `is_default` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `advanced_report_saved_filters_user_id_foreign` (`user_id`),\n  KEY `arsf_biz_user_type_idx` (`business_id`,`user_id`,`report_type`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "advanced_report_schedules": "CREATE TABLE `advanced_report_schedules` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `report_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `filters` longtext COLLATE utf8mb4_unicode_ci,\n  `frequency` enum('daily','weekly','monthly','quarterly') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `email_recipients` longtext COLLATE utf8mb4_unicode_ci,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `last_run_at` timestamp NULL DEFAULT NULL,\n  `next_run_at` timestamp NULL DEFAULT NULL,\n  `created_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `ars_biz_active_idx` (`business_id`,`is_active`),\n  KEY `ars_next_run_idx` (`next_run_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "ai_assistant_global_settings": "CREATE TABLE `ai_assistant_global_settings` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `is_module_active` tinyint(1) NOT NULL DEFAULT '1',\n  `default_conversations_per_month` int NOT NULL DEFAULT '100',\n  `default_messages_per_conversation` int NOT NULL DEFAULT '50',\n  `default_model` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'claude-haiku-4-5-20251001',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "ai_assistant_user_access": "CREATE TABLE `ai_assistant_user_access` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `user_id` int unsigned NOT NULL,\n  `is_enabled` tinyint(1) NOT NULL DEFAULT '0',\n  `conversations_limit` int DEFAULT NULL,\n  `messages_per_conversation` int DEFAULT NULL,\n  `conversations_used` int NOT NULL DEFAULT '0',\n  `reset_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `ai_assistant_user_access_business_id_user_id_unique` (`business_id`,`user_id`),\n  KEY `ai_assistant_user_access_user_id_foreign` (`user_id`),\n  CONSTRAINT `ai_assistant_user_access_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,\n  CONSTRAINT `ai_assistant_user_access_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "assistant_action_logs": "CREATE TABLE `assistant_action_logs` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `business_location_id` int unsigned DEFAULT NULL,\n  `user_id` int unsigned NOT NULL,\n  `conversation_id` int unsigned DEFAULT NULL,\n  `pending_action_id` int unsigned DEFAULT NULL,\n  `module` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `operation` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `target_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `target_id` int unsigned DEFAULT NULL,\n  `old_data` longtext COLLATE utf8mb4_unicode_ci,\n  `new_data` longtext COLLATE utf8mb4_unicode_ci,\n  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'executed',\n  `message` text COLLATE utf8mb4_unicode_ci,\n  `payload` json DEFAULT NULL,\n  `result` json DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `assistant_action_logs_business_id_index` (`business_id`),\n  KEY `assistant_action_logs_user_id_index` (`user_id`),\n  KEY `assistant_action_logs_conversation_id_index` (`conversation_id`),\n  KEY `assistant_action_logs_pending_action_id_index` (`pending_action_id`),\n  KEY `assistant_action_logs_module_index` (`module`),\n  KEY `assistant_action_logs_operation_index` (`operation`),\n  KEY `assistant_action_logs_target_type_index` (`target_type`),\n  KEY `assistant_action_logs_target_id_index` (`target_id`),\n  KEY `assistant_action_logs_status_index` (`status`),\n  CONSTRAINT `assistant_action_logs_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,\n  CONSTRAINT `assistant_action_logs_conversation_id_foreign` FOREIGN KEY (`conversation_id`) REFERENCES `assistant_conversations` (`id`) ON DELETE SET NULL,\n  CONSTRAINT `assistant_action_logs_pending_action_id_foreign` FOREIGN KEY (`pending_action_id`) REFERENCES `assistant_pending_actions` (`id`) ON DELETE SET NULL,\n  CONSTRAINT `assistant_action_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "assistant_conversations": "CREATE TABLE `assistant_conversations` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `user_id` int unsigned NOT NULL,\n  `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `assistant_conversations_business_id_index` (`business_id`),\n  KEY `assistant_conversations_user_id_index` (`user_id`),\n  KEY `assistant_conversations_status_index` (`status`),\n  CONSTRAINT `assistant_conversations_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,\n  CONSTRAINT `assistant_conversations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "assistant_messages": "CREATE TABLE `assistant_messages` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `conversation_id` int unsigned NOT NULL,\n  `role` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `message` longtext COLLATE utf8mb4_unicode_ci,\n  `metadata` longtext COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `assistant_messages_conversation_id_index` (`conversation_id`),\n  KEY `assistant_messages_role_index` (`role`),\n  CONSTRAINT `assistant_messages_conversation_id_foreign` FOREIGN KEY (`conversation_id`) REFERENCES `assistant_conversations` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "assistant_operation_registry": "CREATE TABLE `assistant_operation_registry` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `module` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `operation` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `permission` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `service_method` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `risk_level` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'medium',\n  `requires_confirmation` tinyint(1) NOT NULL DEFAULT '1',\n  `is_enabled` tinyint(1) NOT NULL DEFAULT '1',\n  `delete_allowed` tinyint(1) NOT NULL DEFAULT '0',\n  `can_undo` tinyint(1) NOT NULL DEFAULT '0',\n  `required_fields` longtext COLLATE utf8mb4_unicode_ci,\n  `optional_fields` longtext COLLATE utf8mb4_unicode_ci,\n  `validation_rules` longtext COLLATE utf8mb4_unicode_ci,\n  `success_message` text COLLATE utf8mb4_unicode_ci,\n  `failure_message` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `assistant_operation_registry_module_operation_unique` (`module`,`operation`),\n  KEY `assistant_operation_registry_module_index` (`module`),\n  KEY `assistant_operation_registry_operation_index` (`operation`),\n  KEY `assistant_operation_registry_risk_level_index` (`risk_level`),\n  KEY `assistant_operation_registry_is_enabled_index` (`is_enabled`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "assistant_pending_actions": "CREATE TABLE `assistant_pending_actions` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `user_id` int unsigned NOT NULL,\n  `conversation_id` int unsigned DEFAULT NULL,\n  `module` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `operation` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `payload` longtext COLLATE utf8mb4_unicode_ci,\n  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending_confirmation',\n  `expires_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `assistant_pending_actions_business_id_index` (`business_id`),\n  KEY `assistant_pending_actions_user_id_index` (`user_id`),\n  KEY `assistant_pending_actions_conversation_id_index` (`conversation_id`),\n  KEY `assistant_pending_actions_module_index` (`module`),\n  KEY `assistant_pending_actions_operation_index` (`operation`),\n  KEY `assistant_pending_actions_status_index` (`status`),\n  KEY `assistant_pending_actions_expires_at_index` (`expires_at`),\n  CONSTRAINT `assistant_pending_actions_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,\n  CONSTRAINT `assistant_pending_actions_conversation_id_foreign` FOREIGN KEY (`conversation_id`) REFERENCES `assistant_conversations` (`id`) ON DELETE SET NULL,\n  CONSTRAINT `assistant_pending_actions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "award_catalog": "CREATE TABLE `award_catalog` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `product_id` int unsigned DEFAULT NULL,\n  `award_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `point_threshold` int NOT NULL DEFAULT '0',\n  `monetary_value` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `stock_required` tinyint(1) NOT NULL DEFAULT '0',\n  `stock_quantity` int NOT NULL DEFAULT '0',\n  `award_image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `award_catalog_product_id_foreign` (`product_id`),\n  KEY `award_catalog_business_id_is_active_index` (`business_id`,`is_active`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "award_periods": "CREATE TABLE `award_periods` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `period_type` enum('weekly','monthly','yearly') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `period_start` date NOT NULL,\n  `period_end` date NOT NULL,\n  `is_finalized` tinyint(1) NOT NULL DEFAULT '0',\n  `finalized_at` datetime DEFAULT NULL,\n  `finalized_by` int unsigned DEFAULT NULL,\n  `total_participants` int NOT NULL DEFAULT '0',\n  `winners_count` int NOT NULL DEFAULT '0',\n  `period_summary` json DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `ap_business_period_start_unique` (`business_id`,`period_type`,`period_start`),\n  KEY `award_periods_finalized_by_foreign` (`finalized_by`),\n  KEY `ap_business_period_finalized_idx` (`business_id`,`period_type`,`is_finalized`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "barcodes": "CREATE TABLE `barcodes` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `width` double(22,4) DEFAULT NULL,\n  `height` double(22,4) DEFAULT NULL,\n  `paper_width` double(22,4) DEFAULT NULL,\n  `paper_height` double(22,4) DEFAULT NULL,\n  `top_margin` double(22,4) DEFAULT NULL,\n  `left_margin` double(22,4) DEFAULT NULL,\n  `row_distance` double(22,4) DEFAULT NULL,\n  `col_distance` double(22,4) DEFAULT NULL,\n  `measurement_unit` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'in',\n  `label_layout` longtext COLLATE utf8mb4_unicode_ci,\n  `stickers_in_one_row` int DEFAULT NULL,\n  `is_default` tinyint(1) NOT NULL DEFAULT '0',\n  `is_continuous` tinyint(1) NOT NULL DEFAULT '0',\n  `stickers_in_one_sheet` int DEFAULT NULL,\n  `business_id` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `barcodes_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "bookings": "CREATE TABLE `bookings` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `contact_id` int unsigned NOT NULL,\n  `waiter_id` int unsigned DEFAULT NULL,\n  `table_id` int unsigned DEFAULT NULL,\n  `correspondent_id` int DEFAULT NULL,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned NOT NULL,\n  `booking_start` datetime NOT NULL,\n  `booking_end` datetime NOT NULL,\n  `created_by` int unsigned NOT NULL,\n  `booking_status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `booking_note` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `bookings_contact_id_foreign` (`contact_id`),\n  KEY `bookings_business_id_foreign` (`business_id`),\n  KEY `bookings_created_by_foreign` (`created_by`),\n  KEY `bookings_table_id_index` (`table_id`),\n  KEY `bookings_waiter_id_index` (`waiter_id`),\n  KEY `bookings_location_id_index` (`location_id`),\n  KEY `bookings_booking_status_index` (`booking_status`),\n  KEY `bookings_correspondent_id_index` (`correspondent_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "brands": "CREATE TABLE `brands` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `created_by` int unsigned NOT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `brands_business_id_foreign` (`business_id`),\n  KEY `brands_created_by_foreign` (`created_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "business": "CREATE TABLE `business` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `currency_id` int unsigned NOT NULL,\n  `start_date` date DEFAULT NULL,\n  `tax_number_1` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `tax_label_1` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `tax_number_2` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `tax_label_2` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `code_label_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `code_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `code_label_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `code_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `default_sales_tax` int unsigned DEFAULT NULL,\n  `default_profit_percent` double(5,2) NOT NULL DEFAULT '0.00',\n  `owner_id` int unsigned NOT NULL,\n  `time_zone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Asia/Kolkata',\n  `fy_start_month` tinyint NOT NULL DEFAULT '1',\n  `accounting_method` enum('fifo','lifo','avco') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fifo',\n  `default_sales_discount` decimal(5,2) DEFAULT NULL,\n  `sell_price_tax` enum('includes','excludes') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'includes',\n  `logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `sku_prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `enable_product_expiry` tinyint(1) NOT NULL DEFAULT '0',\n  `expiry_type` enum('add_expiry','add_manufacturing') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'add_expiry',\n  `on_product_expiry` enum('keep_selling','stop_selling','auto_delete') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'keep_selling',\n  `stop_selling_before` int NOT NULL COMMENT 'Stop selling expied item n days before expiry',\n  `enable_tooltip` tinyint(1) NOT NULL DEFAULT '1',\n  `purchase_in_diff_currency` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Allow purchase to be in different currency then the business currency',\n  `purchase_currency_id` int unsigned DEFAULT NULL,\n  `p_exchange_rate` decimal(20,3) NOT NULL DEFAULT '1.000',\n  `transaction_edit_days` int unsigned NOT NULL DEFAULT '30',\n  `stock_expiry_alert_days` int unsigned NOT NULL DEFAULT '30',\n  `keyboard_shortcuts` text COLLATE utf8mb4_unicode_ci,\n  `pos_settings` text COLLATE utf8mb4_unicode_ci,\n  `essentials_settings` longtext COLLATE utf8mb4_unicode_ci,\n  `weighing_scale_setting` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'used to store the configuration of weighing scale',\n  `enable_brand` tinyint(1) NOT NULL DEFAULT '1',\n  `enable_category` tinyint(1) NOT NULL DEFAULT '1',\n  `enable_sub_category` tinyint(1) NOT NULL DEFAULT '1',\n  `enable_price_tax` tinyint(1) NOT NULL DEFAULT '1',\n  `enable_purchase_status` tinyint(1) DEFAULT '1',\n  `enable_lot_number` tinyint(1) NOT NULL DEFAULT '0',\n  `default_unit` int DEFAULT NULL,\n  `enable_sub_units` tinyint(1) NOT NULL DEFAULT '0',\n  `enable_racks` tinyint(1) NOT NULL DEFAULT '0',\n  `enable_row` tinyint(1) NOT NULL DEFAULT '0',\n  `enable_position` tinyint(1) NOT NULL DEFAULT '0',\n  `enable_editing_product_from_purchase` tinyint(1) NOT NULL DEFAULT '1',\n  `sales_cmsn_agnt` enum('logged_in_user','user','cmsn_agnt') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `item_addition_method` tinyint(1) NOT NULL DEFAULT '1',\n  `enable_inline_tax` tinyint(1) NOT NULL DEFAULT '1',\n  `currency_symbol_placement` enum('before','after') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'before',\n  `enabled_modules` text COLLATE utf8mb4_unicode_ci,\n  `date_format` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'm/d/Y',\n  `time_format` enum('12','24') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '24',\n  `currency_precision` tinyint NOT NULL DEFAULT '2',\n  `quantity_precision` tinyint NOT NULL DEFAULT '2',\n  `ref_no_prefixes` text COLLATE utf8mb4_unicode_ci,\n  `theme_color` char(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_by` int DEFAULT NULL,\n  `enable_rp` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'rp is the short form of reward points',\n  `rp_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'rp is the short form of reward points',\n  `amount_for_unit_rp` decimal(22,4) NOT NULL DEFAULT '1.0000' COMMENT 'rp is the short form of reward points',\n  `min_order_total_for_rp` decimal(22,4) NOT NULL DEFAULT '1.0000' COMMENT 'rp is the short form of reward points',\n  `max_rp_per_order` int DEFAULT NULL COMMENT 'rp is the short form of reward points',\n  `redeem_amount_per_unit_rp` decimal(22,4) NOT NULL DEFAULT '1.0000' COMMENT 'rp is the short form of reward points',\n  `min_order_total_for_redeem` decimal(22,4) NOT NULL DEFAULT '1.0000' COMMENT 'rp is the short form of reward points',\n  `min_redeem_point` int DEFAULT NULL COMMENT 'rp is the short form of reward points',\n  `max_redeem_point` int DEFAULT NULL COMMENT 'rp is the short form of reward points',\n  `rp_expiry_period` int DEFAULT NULL COMMENT 'rp is the short form of reward points',\n  `rp_expiry_type` enum('month','year') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'year' COMMENT 'rp is the short form of reward points',\n  `email_settings` text COLLATE utf8mb4_unicode_ci,\n  `sms_settings` text COLLATE utf8mb4_unicode_ci,\n  `custom_labels` text COLLATE utf8mb4_unicode_ci,\n  `common_settings` text COLLATE utf8mb4_unicode_ci,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `business_owner_id_foreign` (`owner_id`),\n  KEY `business_currency_id_foreign` (`currency_id`),\n  KEY `business_default_sales_tax_foreign` (`default_sales_tax`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "business_domains": "CREATE TABLE `business_domains` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `hostname` varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `kind` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',\n  `is_primary` tinyint(1) NOT NULL DEFAULT '0',\n  `verification_hash` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `verified_at` timestamp NULL DEFAULT NULL,\n  `tls_checked_at` timestamp NULL DEFAULT NULL,\n  `tls_expires_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `business_domains_hostname_unique` (`hostname`),\n  KEY `business_domains_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "business_locations": "CREATE TABLE `business_locations` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `name` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `landmark` text COLLATE utf8mb4_unicode_ci,\n  `country` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `state` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `city` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `zip_code` char(7) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `invoice_scheme_id` int unsigned NOT NULL,\n  `sale_invoice_scheme_id` int DEFAULT NULL,\n  `invoice_layout_id` int unsigned NOT NULL,\n  `sale_invoice_layout_id` int DEFAULT NULL,\n  `selling_price_group_id` int DEFAULT NULL,\n  `print_receipt_on_invoice` tinyint(1) DEFAULT '1',\n  `receipt_printer_type` enum('browser','printer') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'browser',\n  `printer_id` int DEFAULT NULL,\n  `mobile` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `alternate_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `featured_products` text COLLATE utf8mb4_unicode_ci,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `default_payment_accounts` text COLLATE utf8mb4_unicode_ci,\n  `custom_field1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `business_locations_business_id_index` (`business_id`),\n  KEY `business_locations_invoice_scheme_id_foreign` (`invoice_scheme_id`),\n  KEY `business_locations_invoice_layout_id_foreign` (`invoice_layout_id`),\n  KEY `business_locations_sale_invoice_layout_id_index` (`sale_invoice_layout_id`),\n  KEY `business_locations_selling_price_group_id_index` (`selling_price_group_id`),\n  KEY `business_locations_receipt_printer_type_index` (`receipt_printer_type`),\n  KEY `business_locations_printer_id_index` (`printer_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "cash_denominations": "CREATE TABLE `cash_denominations` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `amount` decimal(22,4) NOT NULL,\n  `total_count` int NOT NULL,\n  `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `model_id` bigint unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `cash_denominations_model_type_model_id_index` (`model_type`,`model_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "cash_register_transactions": "CREATE TABLE `cash_register_transactions` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `cash_register_id` int unsigned NOT NULL,\n  `amount` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `pay_method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `type` enum('debit','credit') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `transaction_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `transaction_id` int DEFAULT NULL,\n  `transaction_payment_id` int unsigned DEFAULT NULL,\n  `account_id` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `crt_transaction_payment_unique` (`transaction_payment_id`),\n  KEY `cash_register_transactions_cash_register_id_foreign` (`cash_register_id`),\n  KEY `cash_register_transactions_transaction_id_index` (`transaction_id`),\n  KEY `cash_register_transactions_type_index` (`type`),\n  KEY `cash_register_transactions_transaction_type_index` (`transaction_type`),\n  KEY `crt_transaction_payment_id_index` (`transaction_payment_id`),\n  KEY `crt_account_id_index` (`account_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "cash_registers": "CREATE TABLE `cash_registers` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int DEFAULT NULL,\n  `opening_source_account_id` int unsigned DEFAULT NULL,\n  `opening_balance_source` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `opening_source_register_id` int unsigned DEFAULT NULL,\n  `cash_account_id` int unsigned DEFAULT NULL,\n  `opening_account_transaction_id` int unsigned DEFAULT NULL,\n  `closing_difference_account_id` int unsigned DEFAULT NULL,\n  `closing_adjustment_transaction_id` int unsigned DEFAULT NULL,\n  `user_id` int unsigned DEFAULT NULL,\n  `status` enum('close','open') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',\n  `closed_at` datetime DEFAULT NULL,\n  `closing_amount` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `total_card_slips` int NOT NULL DEFAULT '0',\n  `total_cheques` int NOT NULL DEFAULT '0',\n  `denominations` text COLLATE utf8mb4_unicode_ci,\n  `closing_note` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `fondo_initial` decimal(20,4) DEFAULT '0.0000',\n  `fondo_final` decimal(20,4) DEFAULT '0.0000',\n  `total_card_amount` decimal(20,4) DEFAULT '0.0000',\n  `total_cheque_amount` decimal(20,4) DEFAULT '0.0000',\n  `total_other_payment_mod` decimal(20,4) DEFAULT '0.0000',\n  `total_other_payment_amount` decimal(20,4) DEFAULT '0.0000',\n  `banks_transfers` decimal(20,4) DEFAULT '0.0000',\n  `banks_transfers_amount` decimal(20,4) DEFAULT '0.0000',\n  `personal_check` text COLLATE utf8mb4_unicode_ci,\n  `declaration` enum('declared','not_declared') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'not_declared',\n  PRIMARY KEY (`id`),\n  KEY `cash_registers_business_id_foreign` (`business_id`),\n  KEY `cash_registers_user_id_foreign` (`user_id`),\n  KEY `cash_registers_location_id_index` (`location_id`),\n  KEY `cash_registers_opening_balance_source_index` (`opening_balance_source`),\n  KEY `cash_registers_opening_source_register_id_index` (`opening_source_register_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "categories": "CREATE TABLE `categories` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `name_english` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `business_id` int unsigned NOT NULL,\n  `short_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `parent_id` int NOT NULL,\n  `created_by` int unsigned NOT NULL,\n  `category_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `color` varchar(7) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `categories_business_id_foreign` (`business_id`),\n  KEY `categories_created_by_foreign` (`created_by`),\n  KEY `categories_parent_id_index` (`parent_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "categorizables": "CREATE TABLE `categorizables` (\n  `category_id` int NOT NULL,\n  `categorizable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `categorizable_id` bigint unsigned NOT NULL,\n  KEY `categorizables_categorizable_type_categorizable_id_index` (`categorizable_type`,`categorizable_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "claude_ai_settings": "CREATE TABLE `claude_ai_settings` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `api_key` text COLLATE utf8mb4_unicode_ci,\n  `model` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'claude-haiku-4-5-20251001',\n  `is_enabled` tinyint(1) NOT NULL DEFAULT '0',\n  `auto_generate_barcode` tinyint(1) NOT NULL DEFAULT '1',\n  `auto_categorize` tinyint(1) NOT NULL DEFAULT '1',\n  `assistant_personality` text COLLATE utf8mb4_unicode_ci,\n  `tts_enabled` tinyint(1) NOT NULL DEFAULT '0',\n  `monthly_limit` int NOT NULL DEFAULT '500',\n  `conversations_limit` int DEFAULT NULL,\n  `messages_per_conversation` int DEFAULT NULL,\n  `conversations_used` int NOT NULL DEFAULT '0',\n  `conversations_reset_at` timestamp NULL DEFAULT NULL,\n  `usage_count` int NOT NULL DEFAULT '0',\n  `usage_reset_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `claude_ai_settings_business_id_foreign` (`business_id`),\n  CONSTRAINT `claude_ai_settings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "cms_page_metas": "CREATE TABLE `cms_page_metas` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `cms_page_id` bigint unsigned NOT NULL,\n  `meta_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `meta_value` longtext COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `cms_page_metas_cms_page_id_foreign` (`cms_page_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "cms_pages": "CREATE TABLE `cms_pages` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `layout` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `content` longtext COLLATE utf8mb4_unicode_ci,\n  `meta_description` text COLLATE utf8mb4_unicode_ci,\n  `tags` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `feature_image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `priority` int DEFAULT NULL,\n  `created_by` int DEFAULT NULL,\n  `is_enabled` tinyint(1) NOT NULL DEFAULT '1',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "cms_site_details": "CREATE TABLE `cms_site_details` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `site_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `site_value` longtext COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "contacts": "CREATE TABLE `contacts` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `contact_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `supplier_business_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `middle_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `contact_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `contact_status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',\n  `tax_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `address_line_1` text COLLATE utf8mb4_unicode_ci,\n  `address_line_2` text COLLATE utf8mb4_unicode_ci,\n  `zip_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `dob` date DEFAULT NULL,\n  `mobile` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `landline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `alternate_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `pay_term_number` int DEFAULT NULL,\n  `pay_term_type` enum('days','months') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `credit_limit` decimal(22,4) DEFAULT NULL,\n  `created_by` int unsigned NOT NULL,\n  `balance` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `total_rp` int NOT NULL DEFAULT '0' COMMENT 'rp is the short form of reward points',\n  `total_rp_used` int NOT NULL DEFAULT '0' COMMENT 'rp is the short form of reward points',\n  `total_rp_expired` int NOT NULL DEFAULT '0' COMMENT 'rp is the short form of reward points',\n  `is_default` tinyint(1) NOT NULL DEFAULT '0',\n  `shipping_address` text COLLATE utf8mb4_unicode_ci,\n  `shipping_custom_field_details` longtext COLLATE utf8mb4_unicode_ci,\n  `is_export` tinyint(1) NOT NULL DEFAULT '0',\n  `export_custom_field_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `export_custom_field_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `export_custom_field_3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `export_custom_field_4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `export_custom_field_5` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `export_custom_field_6` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `position` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `customer_group_id` int DEFAULT NULL,\n  `custom_field1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field5` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field6` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field7` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field8` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field9` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field10` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `details` json DEFAULT NULL,\n  `notes` json DEFAULT NULL,\n  `rotba` json DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `contacts_business_id_foreign` (`business_id`),\n  KEY `contacts_created_by_foreign` (`created_by`),\n  KEY `contacts_type_index` (`type`),\n  KEY `contacts_contact_status_index` (`contact_status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "currencies": "CREATE TABLE `currencies` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `country` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `currency` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `code` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `symbol` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `thousand_separator` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `decimal_separator` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "customer_addresses": "CREATE TABLE `customer_addresses` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `contact_id` int unsigned NOT NULL,\n  `business_id` int unsigned NOT NULL,\n  `label` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'home',\n  `area` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `block` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `street` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `building` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `floor` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `apartment` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `notes` text COLLATE utf8mb4_unicode_ci,\n  `lat` decimal(10,7) DEFAULT NULL,\n  `lng` decimal(11,7) DEFAULT NULL,\n  `is_default` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `customer_addresses_contact_id_business_id_index` (`contact_id`,`business_id`),\n  CONSTRAINT `customer_addresses_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "customer_awards": "CREATE TABLE `customer_awards` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `customer_id` int unsigned NOT NULL,\n  `period_id` bigint unsigned DEFAULT NULL,\n  `period_type` enum('weekly','monthly','yearly') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `period_start` date NOT NULL,\n  `period_end` date NOT NULL,\n  `rank_position` int NOT NULL,\n  `sales_total` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `engagement_points` int NOT NULL DEFAULT '0',\n  `final_score` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `transaction_count` int NOT NULL DEFAULT '0',\n  `avg_transaction_value` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `award_type` enum('manual','catalog','none') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'none',\n  `catalog_item_id` bigint unsigned DEFAULT NULL,\n  `award_quantity` int NOT NULL DEFAULT '1' COMMENT 'Quantity of items awarded (for catalog awards)',\n  `gift_description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `gift_monetary_value` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `stock_deducted` tinyint(1) NOT NULL DEFAULT '0',\n  `award_notes` text COLLATE utf8mb4_unicode_ci,\n  `is_awarded` tinyint(1) NOT NULL DEFAULT '0',\n  `awarded_by` int unsigned DEFAULT NULL,\n  `awarded_date` datetime DEFAULT NULL,\n  `notification_sent` tinyint(1) NOT NULL DEFAULT '0',\n  `certificate_path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `ca_business_customer_period_unique` (`business_id`,`customer_id`,`period_type`,`period_start`),\n  KEY `customer_awards_customer_id_foreign` (`customer_id`),\n  KEY `customer_awards_period_id_foreign` (`period_id`),\n  KEY `customer_awards_catalog_item_id_foreign` (`catalog_item_id`),\n  KEY `customer_awards_awarded_by_foreign` (`awarded_by`),\n  KEY `ca_business_period_rank_idx` (`business_id`,`period_type`,`rank_position`),\n  KEY `ca_business_awarded_idx` (`business_id`,`is_awarded`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "customer_engagements": "CREATE TABLE `customer_engagements` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `customer_id` int unsigned NOT NULL,\n  `engagement_type` enum('youtube_follow','facebook_follow','content_share','review','referral','instagram_follow','twitter_follow','google_review','other') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `points` int NOT NULL DEFAULT '0',\n  `verification_notes` text COLLATE utf8mb4_unicode_ci,\n  `platform` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `reference_url` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `recorded_by` int unsigned NOT NULL,\n  `recorded_date` date NOT NULL,\n  `status` enum('pending','verified','rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'verified',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `customer_engagements_customer_id_foreign` (`customer_id`),\n  KEY `customer_engagements_recorded_by_foreign` (`recorded_by`),\n  KEY `customer_engagements_business_id_customer_id_index` (`business_id`,`customer_id`),\n  KEY `customer_engagements_business_id_recorded_date_index` (`business_id`,`recorded_date`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "customer_groups": "CREATE TABLE `customer_groups` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `amount` double(5,2) NOT NULL,\n  `price_calculation_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT 'percentage',\n  `selling_price_group_id` int DEFAULT NULL,\n  `created_by` int unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `customer_groups_business_id_foreign` (`business_id`),\n  KEY `customer_groups_created_by_index` (`created_by`),\n  KEY `customer_groups_price_calculation_type_index` (`price_calculation_type`),\n  KEY `customer_groups_selling_price_group_id_index` (`selling_price_group_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "customer_recognition_cache": "CREATE TABLE `customer_recognition_cache` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `customer_id` int unsigned NOT NULL,\n  `period_type` enum('weekly','monthly','yearly') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `period_start` date NOT NULL,\n  `period_end` date NOT NULL,\n  `sales_total` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `engagement_points` int NOT NULL DEFAULT '0',\n  `final_score` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `transaction_count` int NOT NULL DEFAULT '0',\n  `current_rank` int DEFAULT NULL,\n  `last_updated` datetime NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `crc_business_customer_period_unique` (`business_id`,`customer_id`,`period_type`,`period_start`),\n  KEY `customer_recognition_cache_customer_id_foreign` (`customer_id`),\n  KEY `crc_business_period_score_idx` (`business_id`,`period_type`,`final_score`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "customer_recognition_settings": "CREATE TABLE `customer_recognition_settings` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `weekly_enabled` tinyint(1) NOT NULL DEFAULT '1',\n  `monthly_enabled` tinyint(1) NOT NULL DEFAULT '1',\n  `yearly_enabled` tinyint(1) NOT NULL DEFAULT '1',\n  `winner_count_weekly` int NOT NULL DEFAULT '3',\n  `winner_count_monthly` int NOT NULL DEFAULT '5',\n  `winner_count_yearly` int NOT NULL DEFAULT '10',\n  `scoring_method` enum('pure_sales','weighted','pure_payments','weighted_payments','payment_adjusted') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'payment_adjusted',\n  `sales_weight` decimal(3,2) NOT NULL DEFAULT '0.70',\n  `engagement_weight` decimal(3,2) NOT NULL DEFAULT '0.30',\n  `module_start_date` date NOT NULL,\n  `calculate_historical` tinyint(1) NOT NULL DEFAULT '0',\n  `historical_months` int NOT NULL DEFAULT '12',\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `customer_recognition_settings_business_id_unique` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "daily_closings": "CREATE TABLE `daily_closings` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned NOT NULL,\n  `closing_date` date NOT NULL,\n  `status` enum('closed','reopened') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'closed',\n  `sales_total` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `sell_return_total` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `net_sales_total` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `expenses_total` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `payments_total` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `expected_cash` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `actual_cash` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `cash_difference` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `registers_count` int unsigned NOT NULL DEFAULT '0',\n  `open_registers_count` int unsigned NOT NULL DEFAULT '0',\n  `payment_totals` text COLLATE utf8mb4_unicode_ci,\n  `register_totals` text COLLATE utf8mb4_unicode_ci,\n  `journal_totals` text COLLATE utf8mb4_unicode_ci,\n  `summary` text COLLATE utf8mb4_unicode_ci,\n  `closed_by` int unsigned DEFAULT NULL,\n  `closed_at` datetime DEFAULT NULL,\n  `reopened_by` int unsigned DEFAULT NULL,\n  `reopened_at` datetime DEFAULT NULL,\n  `notes` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `daily_closings_scope_unique` (`business_id`,`location_id`,`closing_date`),\n  KEY `daily_closings_business_date_idx` (`business_id`,`closing_date`),\n  KEY `daily_closings_business_status_idx` (`business_id`,`status`),\n  KEY `dc_location_id_fk` (`location_id`),\n  CONSTRAINT `dc_business_id_fk` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,\n  CONSTRAINT `dc_location_id_fk` FOREIGN KEY (`location_id`) REFERENCES `business_locations` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "dashboard_configurations": "CREATE TABLE `dashboard_configurations` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `created_by` int NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `color` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `configuration` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `dashboard_configurations_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "delivery_status_history": "CREATE TABLE `delivery_status_history` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `transaction_id` int unsigned NOT NULL,\n  `status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `changed_by` int unsigned DEFAULT NULL,\n  `note` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`),\n  KEY `delivery_status_history_transaction_id_created_at_index` (`transaction_id`,`created_at`),\n  KEY `delivery_status_history_changed_by_foreign` (`changed_by`),\n  CONSTRAINT `delivery_status_history_changed_by_foreign` FOREIGN KEY (`changed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,\n  CONSTRAINT `delivery_status_history_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "discount_variations": "CREATE TABLE `discount_variations` (\n  `discount_id` int NOT NULL,\n  `variation_id` int NOT NULL,\n  KEY `discount_variations_discount_id_index` (`discount_id`),\n  KEY `discount_variations_variation_id_index` (`variation_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "discounts": "CREATE TABLE `discounts` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `business_id` int NOT NULL,\n  `brand_id` int DEFAULT NULL,\n  `category_id` int DEFAULT NULL,\n  `location_id` int DEFAULT NULL,\n  `priority` int DEFAULT NULL,\n  `discount_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `discount_amount` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `starts_at` datetime DEFAULT NULL,\n  `ends_at` datetime DEFAULT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `spg` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Applicable in specified selling price group only. Use of applicable_in_spg column is discontinued',\n  `applicable_in_cg` tinyint(1) DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `discounts_business_id_index` (`business_id`),\n  KEY `discounts_brand_id_index` (`brand_id`),\n  KEY `discounts_category_id_index` (`category_id`),\n  KEY `discounts_location_id_index` (`location_id`),\n  KEY `discounts_priority_index` (`priority`),\n  KEY `discounts_spg_index` (`spg`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "document_and_notes": "CREATE TABLE `document_and_notes` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `notable_id` int NOT NULL,\n  `notable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `heading` text COLLATE utf8mb4_unicode_ci,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `is_private` tinyint(1) NOT NULL DEFAULT '0',\n  `created_by` int NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `document_and_notes_business_id_index` (`business_id`),\n  KEY `document_and_notes_notable_id_index` (`notable_id`),\n  KEY `document_and_notes_created_by_index` (`created_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "driver_locations": "CREATE TABLE `driver_locations` (\n  `user_id` int unsigned NOT NULL,\n  `lat` decimal(10,7) NOT NULL,\n  `lng` decimal(11,7) NOT NULL,\n  `accuracy` double DEFAULT NULL,\n  `heading` double DEFAULT NULL,\n  `speed` double DEFAULT NULL,\n  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  PRIMARY KEY (`user_id`),\n  CONSTRAINT `driver_locations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_allowances_and_deductions": "CREATE TABLE `essentials_allowances_and_deductions` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `type` enum('allowance','deduction') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `amount` decimal(22,4) NOT NULL,\n  `amount_type` enum('fixed','percent') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `applicable_date` date DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_allowances_and_deductions_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_attendances": "CREATE TABLE `essentials_attendances` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `user_id` int NOT NULL,\n  `business_id` int NOT NULL,\n  `clock_in_time` datetime DEFAULT NULL,\n  `clock_out_time` datetime DEFAULT NULL,\n  `essentials_shift_id` int DEFAULT NULL,\n  `ip_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `clock_in_note` text COLLATE utf8mb4_unicode_ci,\n  `clock_out_note` text COLLATE utf8mb4_unicode_ci,\n  `clock_in_location` text COLLATE utf8mb4_unicode_ci,\n  `clock_out_location` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_attendances_user_id_index` (`user_id`),\n  KEY `essentials_attendances_business_id_index` (`business_id`),\n  KEY `essentials_attendances_essentials_shift_id_index` (`essentials_shift_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_document_shares": "CREATE TABLE `essentials_document_shares` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `document_id` int NOT NULL,\n  `value_type` enum('user','role') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `value` int NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_document_shares_document_id_index` (`document_id`),\n  KEY `essentials_document_shares_value_type_index` (`value_type`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_documents": "CREATE TABLE `essentials_documents` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `user_id` int NOT NULL,\n  `type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_holidays": "CREATE TABLE `essentials_holidays` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `start_date` date NOT NULL,\n  `end_date` date NOT NULL,\n  `business_id` int NOT NULL,\n  `location_id` int DEFAULT NULL,\n  `note` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_holidays_business_id_index` (`business_id`),\n  KEY `essentials_holidays_location_id_index` (`location_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_kb": "CREATE TABLE `essentials_kb` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` bigint unsigned NOT NULL,\n  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `content` longtext COLLATE utf8mb4_unicode_ci,\n  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `kb_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `parent_id` bigint unsigned DEFAULT NULL COMMENT 'id from essentials_kb table',\n  `share_with` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'public, private, only_with',\n  `created_by` bigint unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_kb_business_id_index` (`business_id`),\n  KEY `essentials_kb_parent_id_index` (`parent_id`),\n  KEY `essentials_kb_created_by_index` (`created_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_kb_users": "CREATE TABLE `essentials_kb_users` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `kb_id` int NOT NULL,\n  `user_id` int NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_kb_users_kb_id_index` (`kb_id`),\n  KEY `essentials_kb_users_user_id_index` (`user_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_leave_types": "CREATE TABLE `essentials_leave_types` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `leave_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `max_leave_count` int DEFAULT NULL,\n  `leave_count_interval` enum('month','year') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `business_id` int NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_leave_types_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_leaves": "CREATE TABLE `essentials_leaves` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `essentials_leave_type_id` int DEFAULT NULL,\n  `business_id` int NOT NULL,\n  `user_id` int NOT NULL,\n  `start_date` date NOT NULL,\n  `end_date` date NOT NULL,\n  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `status` enum('pending','approved','cancelled') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `reason` text COLLATE utf8mb4_unicode_ci,\n  `status_note` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_leaves_essentials_leave_type_id_index` (`essentials_leave_type_id`),\n  KEY `essentials_leaves_business_id_index` (`business_id`),\n  KEY `essentials_leaves_user_id_index` (`user_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_messages": "CREATE TABLE `essentials_messages` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `user_id` int NOT NULL,\n  `message` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `location_id` int DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_messages_business_id_index` (`business_id`),\n  KEY `essentials_messages_user_id_index` (`user_id`),\n  KEY `essentials_messages_location_id_index` (`location_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_payroll_group_transactions": "CREATE TABLE `essentials_payroll_group_transactions` (\n  `payroll_group_id` bigint unsigned NOT NULL,\n  `transaction_id` int NOT NULL,\n  KEY `essentials_payroll_group_transactions_payroll_group_id_foreign` (`payroll_group_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_payroll_groups": "CREATE TABLE `essentials_payroll_groups` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `location_id` int DEFAULT NULL COMMENT 'payroll for work location',\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `payment_status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'due',\n  `gross_total` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `created_by` int NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_reminders": "CREATE TABLE `essentials_reminders` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `user_id` int NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `date` date NOT NULL,\n  `time` time NOT NULL,\n  `end_time` time DEFAULT NULL,\n  `repeat` enum('one_time','every_day','every_week','every_month') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_reminders_business_id_index` (`business_id`),\n  KEY `essentials_reminders_user_id_index` (`user_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_shifts": "CREATE TABLE `essentials_shifts` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `type` enum('fixed_shift','flexible_shift') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fixed_shift',\n  `business_id` int NOT NULL,\n  `start_time` time DEFAULT NULL,\n  `end_time` time DEFAULT NULL,\n  `is_allowed_auto_clockout` tinyint(1) NOT NULL DEFAULT '0',\n  `auto_clockout_time` time DEFAULT NULL,\n  `holidays` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_shifts_type_index` (`type`),\n  KEY `essentials_shifts_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_to_dos": "CREATE TABLE `essentials_to_dos` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `task` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `date` datetime DEFAULT NULL,\n  `end_date` datetime DEFAULT NULL,\n  `task_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `estimated_hours` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `priority` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_by` int DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_to_dos_status_index` (`status`),\n  KEY `essentials_to_dos_priority_index` (`priority`),\n  KEY `essentials_to_dos_created_by_index` (`created_by`),\n  KEY `essentials_to_dos_business_id_index` (`business_id`),\n  KEY `essentials_to_dos_task_id_index` (`task_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_todo_comments": "CREATE TABLE `essentials_todo_comments` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `comment` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `task_id` int NOT NULL,\n  `comment_by` int NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_todo_comments_task_id_index` (`task_id`),\n  KEY `essentials_todo_comments_comment_by_index` (`comment_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_todos_users": "CREATE TABLE `essentials_todos_users` (\n  `todo_id` int NOT NULL,\n  `user_id` int NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_user_allowance_and_deductions": "CREATE TABLE `essentials_user_allowance_and_deductions` (\n  `user_id` int NOT NULL,\n  `allowance_deduction_id` int NOT NULL,\n  KEY `essentials_user_allowance_and_deductions_user_id_index` (`user_id`),\n  KEY `allow_deduct_index` (`allowance_deduction_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_user_sales_targets": "CREATE TABLE `essentials_user_sales_targets` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `user_id` int NOT NULL,\n  `target_start` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `target_end` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `commission_percent` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "essentials_user_shifts": "CREATE TABLE `essentials_user_shifts` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `user_id` int NOT NULL,\n  `essentials_shift_id` int NOT NULL,\n  `start_date` date DEFAULT NULL,\n  `end_date` date DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `essentials_user_shifts_user_id_index` (`user_id`),\n  KEY `essentials_user_shifts_essentials_shift_id_index` (`essentials_shift_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "expense_categories": "CREATE TABLE `expense_categories` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `business_id` int unsigned NOT NULL,\n  `code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `parent_id` int DEFAULT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `expense_categories_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "failed_jobs": "CREATE TABLE `failed_jobs` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `uuid` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "financial_report_events": "CREATE TABLE `financial_report_events` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `run_id` bigint unsigned NOT NULL,\n  `user_id` int unsigned NOT NULL,\n  `action` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `checksum` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `financial_report_events_business_id_run_id_index` (`business_id`,`run_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "financial_report_runs": "CREATE TABLE `financial_report_runs` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft',\n  `revision` int unsigned NOT NULL DEFAULT '1',\n  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n  `checksum` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_by` int unsigned NOT NULL,\n  `approved_by` int unsigned DEFAULT NULL,\n  `approved_at` datetime DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `financial_report_runs_business_id_status_index` (`business_id`,`status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "financial_xbrl_exports": "CREATE TABLE `financial_xbrl_exports` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `user_id` int unsigned NOT NULL,\n  `period_start` date NOT NULL,\n  `period_end` date NOT NULL,\n  `purpose` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `sha256` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `account_count` int unsigned NOT NULL,\n  `created_at` timestamp NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `financial_xbrl_exports_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "fooh_recurrence_backup_20260906": "CREATE TABLE `fooh_recurrence_backup_20260906` (\n  `id` int unsigned NOT NULL,\n  `business_id` int NOT NULL,\n  `ref_no` varchar(191) COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `is_recurring` tinyint DEFAULT NULL,\n  `recur_interval` decimal(22,4) DEFAULT NULL,\n  `recur_interval_type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `recur_repetitions` int DEFAULT NULL,\n  `subscription_repeat_on` int DEFAULT NULL,\n  `recur_parent_id` int DEFAULT NULL,\n  `backed_up_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci",
        "group_sub_taxes": "CREATE TABLE `group_sub_taxes` (\n  `group_tax_id` int unsigned NOT NULL,\n  `tax_id` int unsigned NOT NULL,\n  KEY `group_sub_taxes_group_tax_id_foreign` (`group_tax_id`),\n  KEY `group_sub_taxes_tax_id_foreign` (`tax_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "inventory": "CREATE TABLE `inventory` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `branch_id` int unsigned NOT NULL,\n  `name` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `end_date` timestamp NULL DEFAULT NULL,\n  `status` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `inventory_branch_id_foreign` (`branch_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "inventory_products": "CREATE TABLE `inventory_products` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `inventory_id` bigint unsigned NOT NULL,\n  `product_id` int unsigned NOT NULL,\n  `amount_after_inventory` bigint unsigned NOT NULL DEFAULT '0',\n  `Amount_difference` int NOT NULL DEFAULT '0',\n  `price_difference` double NOT NULL DEFAULT '0',\n  `notes` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `inventory_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `qty_before` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `transaction_id` int unsigned NOT NULL,\n  `variation_id` int unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `inventory_products_inventory_id_foreign` (`inventory_id`),\n  KEY `inventory_products_product_id_foreign` (`product_id`),\n  KEY `inventory_products_transaction_id_foreign` (`transaction_id`),\n  KEY `inventory_products_variation_id_foreign` (`variation_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "invoice_layouts": "CREATE TABLE `invoice_layouts` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `header_text` text COLLATE utf8mb4_unicode_ci,\n  `invoice_no_prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `quotation_no_prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `invoice_heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `sub_heading_line1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `sub_heading_line2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `sub_heading_line3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `sub_heading_line4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `sub_heading_line5` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `invoice_heading_not_paid` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `invoice_heading_paid` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `quotation_heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `sub_total_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `discount_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `tax_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `total_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `round_off_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `total_due_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `paid_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `show_client_id` tinyint(1) NOT NULL DEFAULT '0',\n  `client_id_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `client_tax_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `date_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `date_time_format` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `show_time` tinyint(1) NOT NULL DEFAULT '1',\n  `show_brand` tinyint(1) NOT NULL DEFAULT '0',\n  `show_sku` tinyint(1) NOT NULL DEFAULT '1',\n  `show_cat_code` tinyint(1) NOT NULL DEFAULT '1',\n  `show_expiry` tinyint(1) NOT NULL DEFAULT '0',\n  `show_lot` tinyint(1) NOT NULL DEFAULT '0',\n  `show_image` tinyint(1) NOT NULL DEFAULT '0',\n  `show_sale_description` tinyint(1) NOT NULL DEFAULT '0',\n  `sales_person_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `show_sales_person` tinyint(1) NOT NULL DEFAULT '0',\n  `table_product_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `table_qty_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `table_unit_price_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `table_subtotal_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `cat_code_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `show_logo` tinyint(1) NOT NULL DEFAULT '0',\n  `show_business_name` tinyint(1) NOT NULL DEFAULT '0',\n  `show_location_name` tinyint(1) NOT NULL DEFAULT '1',\n  `show_landmark` tinyint(1) NOT NULL DEFAULT '1',\n  `show_city` tinyint(1) NOT NULL DEFAULT '1',\n  `show_state` tinyint(1) NOT NULL DEFAULT '1',\n  `show_zip_code` tinyint(1) NOT NULL DEFAULT '1',\n  `show_country` tinyint(1) NOT NULL DEFAULT '1',\n  `show_mobile_number` tinyint(1) NOT NULL DEFAULT '1',\n  `show_alternate_number` tinyint(1) NOT NULL DEFAULT '0',\n  `show_email` tinyint(1) NOT NULL DEFAULT '0',\n  `show_tax_1` tinyint(1) NOT NULL DEFAULT '1',\n  `show_tax_2` tinyint(1) NOT NULL DEFAULT '0',\n  `show_barcode` tinyint(1) NOT NULL DEFAULT '0',\n  `show_payments` tinyint(1) NOT NULL DEFAULT '0',\n  `show_customer` tinyint(1) NOT NULL DEFAULT '0',\n  `customer_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `commission_agent_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `show_commission_agent` tinyint(1) NOT NULL DEFAULT '0',\n  `show_reward_point` tinyint(1) NOT NULL DEFAULT '0',\n  `highlight_color` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `footer_text` text COLLATE utf8mb4_unicode_ci,\n  `module_info` text COLLATE utf8mb4_unicode_ci,\n  `common_settings` text COLLATE utf8mb4_unicode_ci,\n  `is_default` tinyint(1) NOT NULL DEFAULT '0',\n  `business_id` int unsigned NOT NULL,\n  `show_letter_head` tinyint(1) NOT NULL DEFAULT '0',\n  `letter_head` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `show_qr_code` tinyint(1) NOT NULL DEFAULT '0',\n  `qr_code_fields` text COLLATE utf8mb4_unicode_ci,\n  `builder_layout` longtext COLLATE utf8mb4_unicode_ci,\n  `receipt_template_id` bigint unsigned DEFAULT NULL,\n  `receipt_template_source` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'business_global',\n  `design` varchar(190) COLLATE utf8mb4_unicode_ci DEFAULT 'classic',\n  `cn_heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'cn = credit note',\n  `cn_no_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `cn_amount_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `table_tax_headings` text COLLATE utf8mb4_unicode_ci,\n  `show_previous_bal` tinyint(1) NOT NULL DEFAULT '0',\n  `prev_bal_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `change_return_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_fields` text COLLATE utf8mb4_unicode_ci,\n  `contact_custom_fields` text COLLATE utf8mb4_unicode_ci,\n  `location_custom_fields` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `invoice_layouts_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "invoice_schemes": "CREATE TABLE `invoice_schemes` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `scheme_type` enum('blank','year') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `number_type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sequential',\n  `prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `start_number` int DEFAULT NULL,\n  `invoice_count` int NOT NULL DEFAULT '0',\n  `total_digits` int DEFAULT NULL,\n  `is_default` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `invoice_schemes_business_id_foreign` (`business_id`),\n  KEY `invoice_schemes_scheme_type_index` (`scheme_type`),\n  KEY `invoice_schemes_number_type_index` (`number_type`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "jobs": "CREATE TABLE `jobs` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n  `attempts` tinyint unsigned NOT NULL,\n  `reserved_at` int unsigned DEFAULT NULL,\n  `available_at` int unsigned NOT NULL,\n  `created_at` int unsigned NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `jobs_queue_index` (`queue`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "journal_entries": "CREATE TABLE `journal_entries` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `accounting_period_id` int DEFAULT NULL,\n  `entry_no` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `entry_date` datetime NOT NULL,\n  `status` enum('draft','posted','reversed','void') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'posted',\n  `approval_required` tinyint(1) NOT NULL DEFAULT '0',\n  `approval_status` enum('not_required','draft','pending','approved','rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'not_required',\n  `source_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `source_id` int DEFAULT NULL,\n  `source_reference` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `memo` text COLLATE utf8mb4_unicode_ci,\n  `created_by` int NOT NULL,\n  `posted_by` int DEFAULT NULL,\n  `posted_at` datetime DEFAULT NULL,\n  `approved_by` int DEFAULT NULL,\n  `approved_at` datetime DEFAULT NULL,\n  `submitted_by` int DEFAULT NULL,\n  `submitted_at` datetime DEFAULT NULL,\n  `rejected_by` int DEFAULT NULL,\n  `rejected_at` datetime DEFAULT NULL,\n  `rejection_reason` text COLLATE utf8mb4_unicode_ci,\n  `reverses_journal_entry_id` int DEFAULT NULL,\n  `reversal_journal_entry_id` int DEFAULT NULL,\n  `reversal_reason` text COLLATE utf8mb4_unicode_ci,\n  `voided_by` int DEFAULT NULL,\n  `voided_at` datetime DEFAULT NULL,\n  `void_reason` text COLLATE utf8mb4_unicode_ci,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `je_business_entry_no_unique` (`business_id`,`entry_no`),\n  KEY `je_business_date_idx` (`business_id`,`entry_date`),\n  KEY `je_business_status_idx` (`business_id`,`status`),\n  KEY `je_source_idx` (`source_type`,`source_id`),\n  KEY `je_accounting_period_idx` (`accounting_period_id`),\n  KEY `je_business_approval_status_idx` (`business_id`,`approval_status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "journal_entry_audits": "CREATE TABLE `journal_entry_audits` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `journal_entry_id` int NOT NULL,\n  `action` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `before_values` text COLLATE utf8mb4_unicode_ci,\n  `after_values` text COLLATE utf8mb4_unicode_ci,\n  `note` text COLLATE utf8mb4_unicode_ci,\n  `created_by` int DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `jea_business_entry_idx` (`business_id`,`journal_entry_id`),\n  KEY `jea_business_action_idx` (`business_id`,`action`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "journal_entry_lines": "CREATE TABLE `journal_entry_lines` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `journal_entry_id` int NOT NULL,\n  `account_id` int NOT NULL,\n  `line_no` int NOT NULL DEFAULT '1',\n  `type` enum('debit','credit') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `amount` decimal(22,4) NOT NULL,\n  `memo` text COLLATE utf8mb4_unicode_ci,\n  `location_id` int DEFAULT NULL,\n  `contact_id` int DEFAULT NULL,\n  `transaction_id` int DEFAULT NULL,\n  `transaction_payment_id` int DEFAULT NULL,\n  `product_id` int DEFAULT NULL,\n  `cost_center_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `cost_center_id` int DEFAULT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `jel_business_account_idx` (`business_id`,`account_id`),\n  KEY `jel_business_type_idx` (`business_id`,`type`),\n  KEY `jel_journal_entry_idx` (`journal_entry_id`),\n  KEY `jel_location_idx` (`location_id`),\n  KEY `jel_cost_center_idx` (`cost_center_type`,`cost_center_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "legacy_migration_runs": "CREATE TABLE `legacy_migration_runs` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `target_business_id` bigint unsigned NOT NULL,\n  `initiated_by` bigint unsigned DEFAULT NULL,\n  `source_business_id` bigint unsigned DEFAULT NULL,\n  `status` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'queued',\n  `stage` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `progress_percent` tinyint unsigned NOT NULL DEFAULT '0',\n  `package_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `package_path` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `dry_run` tinyint(1) NOT NULL DEFAULT '1',\n  `allow_non_empty` tinyint(1) NOT NULL DEFAULT '0',\n  `recalculate_stock` tinyint(1) NOT NULL DEFAULT '0',\n  `options` json DEFAULT NULL,\n  `summary` json DEFAULT NULL,\n  `logs` json DEFAULT NULL,\n  `error_message` text COLLATE utf8mb4_unicode_ci,\n  `report_path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `started_at` timestamp NULL DEFAULT NULL,\n  `finished_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `legacy_migration_runs_status_created_at_index` (`status`,`created_at`),\n  KEY `legacy_migration_runs_target_business_id_index` (`target_business_id`),\n  KEY `legacy_migration_runs_initiated_by_index` (`initiated_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "media": "CREATE TABLE `media` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `file_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `uploaded_by` int DEFAULT NULL,\n  `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `model_media_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `model_id` bigint unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `media_model_type_model_id_index` (`model_type`,`model_id`),\n  KEY `media_business_id_index` (`business_id`),\n  KEY `media_uploaded_by_index` (`uploaded_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "migrations": "CREATE TABLE `migrations` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `batch` int NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "model_has_permissions": "CREATE TABLE `model_has_permissions` (\n  `permission_id` int unsigned NOT NULL,\n  `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `model_id` bigint unsigned NOT NULL,\n  PRIMARY KEY (`permission_id`,`model_id`,`model_type`),\n  KEY `model_has_permissions_model_type_model_id_index` (`model_type`,`model_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "model_has_roles": "CREATE TABLE `model_has_roles` (\n  `role_id` int unsigned NOT NULL,\n  `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `model_id` bigint unsigned NOT NULL,\n  PRIMARY KEY (`role_id`,`model_id`,`model_type`),\n  KEY `model_has_roles_model_type_model_id_index` (`model_type`,`model_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "notification_templates": "CREATE TABLE `notification_templates` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `template_for` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `email_body` text COLLATE utf8mb4_unicode_ci,\n  `sms_body` text COLLATE utf8mb4_unicode_ci,\n  `whatsapp_text` text COLLATE utf8mb4_unicode_ci,\n  `subject` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `cc` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `bcc` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `auto_send` tinyint(1) NOT NULL DEFAULT '0',\n  `auto_send_sms` tinyint(1) NOT NULL DEFAULT '0',\n  `auto_send_wa_notif` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "notifications": "CREATE TABLE `notifications` (\n  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `notifiable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `notifiable_id` bigint unsigned NOT NULL,\n  `data` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `read_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "oauth_access_tokens": "CREATE TABLE `oauth_access_tokens` (\n  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `user_id` bigint DEFAULT NULL,\n  `client_id` int unsigned NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `scopes` text COLLATE utf8mb4_unicode_ci,\n  `revoked` tinyint(1) NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `expires_at` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `oauth_access_tokens_user_id_index` (`user_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "oauth_auth_codes": "CREATE TABLE `oauth_auth_codes` (\n  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `user_id` bigint NOT NULL,\n  `client_id` int unsigned NOT NULL,\n  `scopes` text COLLATE utf8mb4_unicode_ci,\n  `revoked` tinyint(1) NOT NULL,\n  `expires_at` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "oauth_clients": "CREATE TABLE `oauth_clients` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `user_id` bigint DEFAULT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `secret` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `provider` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `redirect` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `personal_access_client` tinyint(1) NOT NULL,\n  `password_client` tinyint(1) NOT NULL,\n  `revoked` tinyint(1) NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `oauth_clients_user_id_index` (`user_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "oauth_personal_access_clients": "CREATE TABLE `oauth_personal_access_clients` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `client_id` int unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `oauth_personal_access_clients_client_id_index` (`client_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "oauth_refresh_tokens": "CREATE TABLE `oauth_refresh_tokens` (\n  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `access_token_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `revoked` tinyint(1) NOT NULL,\n  `expires_at` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "online_order_business_area_rules": "CREATE TABLE `online_order_business_area_rules` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` bigint unsigned NOT NULL,\n  `area_id` bigint unsigned NOT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `delivery_fee` decimal(22,4) DEFAULT NULL,\n  `created_by` bigint unsigned DEFAULT NULL,\n  `updated_by` bigint unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`) USING BTREE,\n  UNIQUE KEY `oo_business_area_rules_unique` (`business_id`,`area_id`) USING BTREE,\n  KEY `oo_business_area_rules_business_idx` (`business_id`) USING BTREE,\n  KEY `oo_business_area_rules_area_idx` (`area_id`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC",
        "online_order_business_city_rules": "CREATE TABLE `online_order_business_city_rules` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` bigint unsigned NOT NULL,\n  `city_id` bigint unsigned NOT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `delivery_fee` decimal(22,4) DEFAULT NULL,\n  `created_by` bigint unsigned DEFAULT NULL,\n  `updated_by` bigint unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`) USING BTREE,\n  UNIQUE KEY `oo_business_city_rules_unique` (`business_id`,`city_id`) USING BTREE,\n  KEY `oo_business_city_rules_business_idx` (`business_id`) USING BTREE,\n  KEY `oo_business_city_rules_city_idx` (`city_id`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC",
        "online_order_categories": "CREATE TABLE `online_order_categories` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `slug` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `sort_order` int NOT NULL DEFAULT '0',\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `created_by` int unsigned DEFAULT NULL,\n  `updated_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `oo_categories_business_active_idx` (`business_id`,`is_active`),\n  KEY `oo_categories_business_sort_idx` (`business_id`,`sort_order`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "online_order_category_maps": "CREATE TABLE `online_order_category_maps` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `category_id` int unsigned NOT NULL,\n  `online_order_category_id` bigint unsigned NOT NULL,\n  `created_by` int unsigned DEFAULT NULL,\n  `updated_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `oo_category_maps_business_category_unique` (`business_id`,`category_id`),\n  KEY `oo_category_maps_business_group_idx` (`business_id`,`online_order_category_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "online_order_domains": "CREATE TABLE `online_order_domains` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `domain` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '0',\n  `is_primary` tinyint(1) NOT NULL DEFAULT '1',\n  `is_verified` tinyint(1) NOT NULL DEFAULT '1',\n  `verification_token` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `last_verified_at` timestamp NULL DEFAULT NULL,\n  `created_by` int unsigned DEFAULT NULL,\n  `updated_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `online_order_domains_business_id_domain_unique` (`business_id`,`domain`),\n  UNIQUE KEY `online_order_domains_domain_unique` (`domain`),\n  KEY `online_order_domains_business_id_index` (`business_id`),\n  KEY `online_order_domains_is_active_index` (`is_active`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "online_order_kw_areas": "CREATE TABLE `online_order_kw_areas` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `city_id` bigint unsigned NOT NULL,\n  `code` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `name_ar` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `name_en` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `delivery_fee` decimal(22,4) DEFAULT NULL,\n  `min_order_amount` decimal(22,4) DEFAULT NULL,\n  `eta_min_minutes` smallint unsigned DEFAULT NULL,\n  `eta_max_minutes` smallint unsigned DEFAULT NULL,\n  `sort_order` int NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`) USING BTREE,\n  UNIQUE KEY `online_order_kw_areas_code_unique` (`code`) USING BTREE,\n  KEY `online_order_kw_areas_city_idx` (`city_id`) USING BTREE,\n  KEY `online_order_kw_areas_city_active_idx` (`city_id`,`is_active`) USING BTREE,\n  KEY `online_order_kw_areas_active_sort_idx` (`is_active`,`sort_order`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC",
        "online_order_kw_cities": "CREATE TABLE `online_order_kw_cities` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `code` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `name_ar` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `name_en` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `delivery_fee` decimal(22,4) DEFAULT NULL,\n  `sort_order` int NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`) USING BTREE,\n  UNIQUE KEY `online_order_kw_cities_code_unique` (`code`) USING BTREE,\n  KEY `online_order_kw_cities_active_sort_idx` (`is_active`,`sort_order`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC",
        "online_order_locations": "CREATE TABLE `online_order_locations` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned NOT NULL,\n  `is_enabled` tinyint(1) NOT NULL DEFAULT '1',\n  `sort_order` int NOT NULL DEFAULT '0',\n  `display_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `branch_slug` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `eta_min_minutes` smallint unsigned DEFAULT NULL,\n  `eta_max_minutes` smallint unsigned DEFAULT NULL,\n  `rating` decimal(3,2) DEFAULT NULL,\n  `delivery_fee_override` decimal(22,4) DEFAULT NULL,\n  `min_order_amount_override` decimal(22,4) DEFAULT NULL,\n  `created_by` int unsigned DEFAULT NULL,\n  `updated_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `online_order_locations_business_location_unique` (`business_id`,`location_id`),\n  UNIQUE KEY `online_order_locations_business_branch_slug_unique` (`business_id`,`branch_slug`),\n  KEY `online_order_locations_business_idx` (`business_id`),\n  KEY `online_order_locations_location_idx` (`location_id`),\n  KEY `online_order_locations_business_enabled_idx` (`business_id`,`is_enabled`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "online_order_product_modifier_sets": "CREATE TABLE `online_order_product_modifier_sets` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `online_order_product_id` bigint unsigned NOT NULL,\n  `product_id` int unsigned NOT NULL,\n  `modifier_set_id` int unsigned NOT NULL,\n  `title_override` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `display_type` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'paid_addon',\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `is_required` tinyint(1) NOT NULL DEFAULT '0',\n  `min_select` int unsigned NOT NULL DEFAULT '0',\n  `max_select` int unsigned DEFAULT NULL,\n  `allow_qty` tinyint(1) NOT NULL DEFAULT '1',\n  `max_qty_per_option` int unsigned DEFAULT NULL,\n  `sort_order` int NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `online_order_product_modifier_sets_unique` (`online_order_product_id`,`modifier_set_id`),\n  KEY `online_order_product_modifier_sets_business_idx` (`business_id`),\n  KEY `online_order_product_modifier_sets_oop_idx` (`online_order_product_id`),\n  KEY `online_order_product_modifier_sets_product_idx` (`product_id`),\n  KEY `online_order_product_modifier_sets_set_idx` (`modifier_set_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "online_order_products": "CREATE TABLE `online_order_products` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `product_id` int unsigned NOT NULL,\n  `online_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_published` tinyint(1) NOT NULL DEFAULT '1',\n  `online_price` decimal(22,4) DEFAULT NULL,\n  `sort_order` int NOT NULL DEFAULT '0',\n  `min_qty` decimal(22,4) NOT NULL DEFAULT '1.0000',\n  `max_qty` decimal(22,4) DEFAULT NULL,\n  `allowed_variation_ids` text COLLATE utf8mb4_unicode_ci,\n  `accept_order_variation_ids` text COLLATE utf8mb4_unicode_ci,\n  `hide_when_out_of_stock` tinyint(1) NOT NULL DEFAULT '1',\n  `created_by` int unsigned DEFAULT NULL,\n  `updated_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`) USING BTREE,\n  UNIQUE KEY `online_order_products_business_product_unique` (`business_id`,`product_id`) USING BTREE,\n  KEY `online_order_products_business_published_idx` (`business_id`,`is_published`) USING BTREE,\n  KEY `online_order_products_business_sort_idx` (`business_id`,`sort_order`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC",
        "online_order_restaurant_tables": "CREATE TABLE `online_order_restaurant_tables` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned DEFAULT NULL,\n  `res_table_id` int unsigned NOT NULL,\n  `display_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `qr_token` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `sort_order` int NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `oo_restaurant_tables_business_table_unique` (`business_id`,`res_table_id`),\n  UNIQUE KEY `online_order_restaurant_tables_qr_token_unique` (`qr_token`),\n  KEY `oo_restaurant_tables_business_location_idx` (`business_id`,`location_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "online_order_service_requests": "CREATE TABLE `online_order_service_requests` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned DEFAULT NULL,\n  `res_table_id` int unsigned NOT NULL,\n  `online_order_restaurant_table_id` bigint unsigned DEFAULT NULL,\n  `transaction_id` int unsigned DEFAULT NULL,\n  `request_type` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `note` text COLLATE utf8mb4_unicode_ci,\n  `status` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',\n  `requested_at` timestamp NULL DEFAULT NULL,\n  `resolved_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `oo_service_requests_business_status_idx` (`business_id`,`status`),\n  KEY `oo_service_requests_business_table_idx` (`business_id`,`res_table_id`),\n  KEY `oo_service_requests_location_requested_idx` (`location_id`,`requested_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "online_order_settings": "CREATE TABLE `online_order_settings` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned DEFAULT NULL,\n  `is_enabled` tinyint(1) NOT NULL DEFAULT '0',\n  `enable_delivery` tinyint(1) NOT NULL DEFAULT '1',\n  `enable_pickup` tinyint(1) NOT NULL DEFAULT '1',\n  `enable_dine_in` tinyint(1) NOT NULL DEFAULT '0',\n  `enable_service_requests` tinyint(1) NOT NULL DEFAULT '0',\n  `storefront_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `storefront_slug` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `storefront_tagline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `hero_title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `hero_subtitle` text COLLATE utf8mb4_unicode_ci,\n  `primary_color` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#0f766e',\n  `accent_color` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#f59e0b',\n  `min_order_amount` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `delivery_fee` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `free_delivery_over` decimal(22,4) DEFAULT NULL,\n  `allow_cash` tinyint(1) NOT NULL DEFAULT '1',\n  `allow_bank_transfer` tinyint(1) NOT NULL DEFAULT '0',\n  `allow_card` tinyint(1) NOT NULL DEFAULT '0',\n  `checkout_note` text COLLATE utf8mb4_unicode_ci,\n  `theme_system_enabled` tinyint(1) NOT NULL DEFAULT '0',\n  `active_theme` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default',\n  `enabled_themes` text COLLATE utf8mb4_unicode_ci,\n  `theme_settings` text COLLATE utf8mb4_unicode_ci,\n  `created_by` int unsigned DEFAULT NULL,\n  `updated_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`) USING BTREE,\n  UNIQUE KEY `online_order_settings_business_id_unique` (`business_id`) USING BTREE,\n  UNIQUE KEY `online_order_settings_storefront_slug_unique` (`storefront_slug`),\n  KEY `online_order_settings_location_id_index` (`location_id`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC",
        "online_order_trackings": "CREATE TABLE `online_order_trackings` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `transaction_id` bigint unsigned NOT NULL,\n  `tracking_token` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `customer_mobile` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`) USING BTREE,\n  UNIQUE KEY `online_order_trackings_transaction_id_unique` (`transaction_id`) USING BTREE,\n  UNIQUE KEY `online_order_trackings_tracking_token_unique` (`tracking_token`) USING BTREE,\n  KEY `online_order_trackings_business_id_index` (`business_id`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC",
        "packages": "CREATE TABLE `packages` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `location_count` int NOT NULL COMMENT 'No. of Business Locations, 0 = infinite option.',\n  `user_count` int NOT NULL,\n  `product_count` int NOT NULL,\n  `bookings` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Enable/Disable bookings',\n  `kitchen` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Enable/Disable kitchen',\n  `order_screen` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Enable/Disable order_screen',\n  `tables` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Enable/Disable tables',\n  `invoice_count` int NOT NULL,\n  `interval` enum('days','months','years') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `interval_count` int NOT NULL,\n  `trial_days` int NOT NULL,\n  `price` decimal(22,4) NOT NULL,\n  `custom_permissions` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n  `created_by` int NOT NULL,\n  `sort_order` int NOT NULL DEFAULT '0',\n  `is_active` tinyint(1) NOT NULL,\n  `mark_package_as_popular` tinyint(1) NOT NULL,\n  `businesses` longtext COLLATE utf8mb4_unicode_ci,\n  `is_private` tinyint(1) NOT NULL DEFAULT '0',\n  `is_one_time` tinyint(1) NOT NULL DEFAULT '0',\n  `enable_custom_link` tinyint(1) NOT NULL DEFAULT '0',\n  `custom_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_link_text` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `platform_created_by` bigint unsigned DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "password_resets": "CREATE TABLE `password_resets` (\n  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  KEY `password_resets_email_index` (`email`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "payment_processor_contract_payment_methods": "CREATE TABLE `payment_processor_contract_payment_methods` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `contract_id` int unsigned NOT NULL,\n  `payment_method` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `ppcpm_contract_method_unique` (`contract_id`,`payment_method`),\n  KEY `ppcpm_method_index` (`payment_method`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "payment_processor_contracts": "CREATE TABLE `payment_processor_contracts` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned DEFAULT NULL,\n  `payment_method` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `processor_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `starts_on` date DEFAULT NULL,\n  `ends_on` date DEFAULT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `operation_fee_expense_account_id` int unsigned DEFAULT NULL,\n  `rent_expense_account_id` int unsigned DEFAULT NULL,\n  `device_rent_enabled` tinyint(1) NOT NULL DEFAULT '0',\n  `device_rent_amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `device_rent_day` tinyint unsigned NOT NULL DEFAULT '1',\n  `device_rent_auto_create_expense` tinyint(1) NOT NULL DEFAULT '0',\n  `created_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `ppc_business_method_location_index` (`business_id`,`payment_method`,`location_id`),\n  KEY `ppc_active_dates_index` (`is_active`,`starts_on`,`ends_on`),\n  KEY `ppc_operation_fee_account_index` (`operation_fee_expense_account_id`),\n  KEY `ppc_rent_account_index` (`rent_expense_account_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "payment_processor_fee_rules": "CREATE TABLE `payment_processor_fee_rules` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `contract_id` int unsigned NOT NULL,\n  `payment_method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `calculation_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `rate` decimal(12,6) NOT NULL DEFAULT '0.000000',\n  `fixed_amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `unit_amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `unit_fee` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `unit_rounding` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'proportional',\n  `min_fee` decimal(22,6) DEFAULT NULL,\n  `max_fee` decimal(22,6) DEFAULT NULL,\n  `rounding_method` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'six_decimals',\n  `sort_order` int unsigned NOT NULL DEFAULT '1',\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `ppfr_contract_active_index` (`contract_id`,`is_active`,`sort_order`),\n  KEY `ppfr_contract_method_active_index` (`contract_id`,`payment_method`,`is_active`,`sort_order`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "payment_processor_fee_tiers": "CREATE TABLE `payment_processor_fee_tiers` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `fee_rule_id` int unsigned NOT NULL,\n  `from_amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `to_amount` decimal(22,6) DEFAULT NULL,\n  `tier_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'percentage',\n  `rate` decimal(12,6) NOT NULL DEFAULT '0.000000',\n  `fixed_amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `ppft_rule_amount_index` (`fee_rule_id`,`from_amount`,`to_amount`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "payment_processor_monthly_settlements": "CREATE TABLE `payment_processor_monthly_settlements` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `contract_id` int unsigned NOT NULL,\n  `location_id` int unsigned DEFAULT NULL,\n  `settlement_account_id` int unsigned DEFAULT NULL,\n  `period_start` date NOT NULL,\n  `period_end` date NOT NULL,\n  `payment_count` int unsigned NOT NULL DEFAULT '0',\n  `total_payment_amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `total_fee_amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `expense_transaction_id` int unsigned DEFAULT NULL,\n  `status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',\n  `created_by` int unsigned DEFAULT NULL,\n  `posted_at` datetime DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `ppms_period_account_unique` (`business_id`,`contract_id`,`location_id`,`settlement_account_id`,`period_start`),\n  KEY `ppms_status_index` (`business_id`,`status`,`period_start`),\n  KEY `ppms_expense_transaction_index` (`expense_transaction_id`),\n  KEY `ppms_settlement_account_index` (`settlement_account_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "payment_processor_rent_charges": "CREATE TABLE `payment_processor_rent_charges` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `contract_id` int unsigned NOT NULL,\n  `location_id` int unsigned DEFAULT NULL,\n  `period_start` date NOT NULL,\n  `period_end` date NOT NULL,\n  `amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `expense_transaction_id` int unsigned DEFAULT NULL,\n  `status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',\n  `created_by` int unsigned DEFAULT NULL,\n  `posted_at` datetime DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `pprc_period_unique` (`business_id`,`contract_id`,`location_id`,`period_start`),\n  KEY `pprc_status_index` (`business_id`,`status`,`period_start`),\n  KEY `pprc_expense_transaction_index` (`expense_transaction_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "permissions": "CREATE TABLE `permissions` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `guard_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_access_links": "CREATE TABLE `platform_access_links` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `token_hash` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `purpose` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `role` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `operator_id` bigint unsigned DEFAULT NULL,\n  `created_by` bigint unsigned NOT NULL,\n  `expires_at` timestamp NOT NULL,\n  `used_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `platform_access_links_token_hash_unique` (`token_hash`),\n  KEY `platform_access_links_expires_at_index` (`expires_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_alerts": "CREATE TABLE `platform_alerts` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `scope_key` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `business_id` int unsigned DEFAULT NULL,\n  `kind` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',\n  `context` json NOT NULL,\n  `first_seen_at` timestamp NOT NULL,\n  `last_seen_at` timestamp NOT NULL,\n  `resolved_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `platform_alerts_scope_key_unique` (`scope_key`),\n  KEY `platform_alerts_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_audit_events": "CREATE TABLE `platform_audit_events` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `actor_id` bigint unsigned DEFAULT NULL,\n  `business_id` int unsigned DEFAULT NULL,\n  `action` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `changes` json NOT NULL,\n  `created_at` timestamp NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `platform_audit_events_actor_id_index` (`actor_id`),\n  KEY `platform_audit_events_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_backup_runs": "CREATE TABLE `platform_backup_runs` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `verification_status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'not_tested',\n  `manifest` json DEFAULT NULL,\n  `verified_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `execution_token` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `started_at` timestamp NULL DEFAULT NULL,\n  `completed_at` timestamp NULL DEFAULT NULL,\n  `remote_disk` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `remote_path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `remote_verified_at` timestamp NULL DEFAULT NULL,\n  `local_pruned_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `platform_backup_runs_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_company_profiles": "CREATE TABLE `platform_company_profiles` (\n  `business_id` int unsigned NOT NULL,\n  `state` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'setup',\n  `accepting_orders` tinyint(1) NOT NULL DEFAULT '0',\n  `contact_email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `contact_phone` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `message` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `maintenance_starts_at` datetime DEFAULT NULL,\n  `maintenance_ends_at` datetime DEFAULT NULL,\n  `maintenance_reason` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  PRIMARY KEY (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_entitlements": "CREATE TABLE `platform_entitlements` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `module` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `enabled` tinyint(1) NOT NULL,\n  `source` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `reason` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `starts_at` timestamp NOT NULL,\n  `ends_at` timestamp NULL DEFAULT NULL,\n  `created_by` bigint unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `platform_entitlements_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_heartbeats": "CREATE TABLE `platform_heartbeats` (\n  `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `seen_at` timestamp NOT NULL,\n  PRIMARY KEY (`name`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_incident_receipts": "CREATE TABLE `platform_incident_receipts` (\n  `event_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `incident_id` bigint unsigned NOT NULL,\n  `created_at` timestamp NOT NULL,\n  `captured_at` timestamp NULL DEFAULT NULL,\n  `context` text COLLATE utf8mb4_unicode_ci,\n  PRIMARY KEY (`event_id`),\n  KEY `platform_incident_receipts_captured_at_index` (`captured_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_incidents": "CREATE TABLE `platform_incidents` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `fingerprint` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `business_id` int unsigned DEFAULT NULL,\n  `code` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'new',\n  `occurrences` int unsigned NOT NULL DEFAULT '1',\n  `context` json NOT NULL,\n  `assigned_to` bigint unsigned DEFAULT NULL,\n  `resolution` text COLLATE utf8mb4_unicode_ci,\n  `first_seen_at` timestamp NOT NULL,\n  `last_seen_at` timestamp NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `resolved_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `platform_incidents_fingerprint_unique` (`fingerprint`),\n  KEY `platform_incidents_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_print_requests": "CREATE TABLE `platform_print_requests` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `transaction_id` int unsigned NOT NULL,\n  `actor_id` bigint unsigned NOT NULL,\n  `request_key` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `status` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'preview_generated',\n  `reason` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `platform_print_requests_request_key_unique` (`request_key`),\n  KEY `platform_print_requests_business_id_index` (`business_id`),\n  KEY `platform_print_requests_transaction_id_index` (`transaction_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_sessions": "CREATE TABLE `platform_sessions` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `operator_id` bigint unsigned NOT NULL,\n  `session_hash` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `session_version` int unsigned NOT NULL,\n  `ip` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `agent` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `last_seen_at` timestamp NOT NULL,\n  `revoked_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `platform_sessions_session_hash_unique` (`session_hash`),\n  KEY `platform_sessions_operator_id_index` (`operator_id`),\n  KEY `platform_sessions_last_seen_at_index` (`last_seen_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_support_access": "CREATE TABLE `platform_support_access` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `ticket_id` bigint unsigned NOT NULL,\n  `operator_id` bigint unsigned NOT NULL,\n  `operator_version` int unsigned NOT NULL,\n  `token_hash` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `session_hash` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `reason` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `expires_at` timestamp NOT NULL,\n  `used_at` timestamp NULL DEFAULT NULL,\n  `revoked_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `platform_support_access_token_hash_unique` (`token_hash`),\n  KEY `platform_support_access_business_id_index` (`business_id`),\n  KEY `platform_support_access_ticket_id_index` (`ticket_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_ticket_comments": "CREATE TABLE `platform_ticket_comments` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `ticket_id` bigint unsigned NOT NULL,\n  `actor_id` bigint unsigned NOT NULL,\n  `body` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `is_internal` tinyint(1) NOT NULL DEFAULT '1',\n  `created_at` timestamp NOT NULL,\n  `actor_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'platform',\n  PRIMARY KEY (`id`),\n  KEY `platform_ticket_comments_ticket_id_index` (`ticket_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_ticket_files": "CREATE TABLE `platform_ticket_files` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `ticket_id` bigint unsigned NOT NULL,\n  `comment_id` bigint unsigned DEFAULT NULL,\n  `storage_name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `original_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `mime` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `bytes` bigint unsigned NOT NULL,\n  `sha256` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `is_internal` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `platform_ticket_files_storage_name_unique` (`storage_name`),\n  KEY `platform_ticket_files_business_id_index` (`business_id`),\n  KEY `platform_ticket_files_ticket_id_index` (`ticket_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_tickets": "CREATE TABLE `platform_tickets` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `priority` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'normal',\n  `status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'new',\n  `created_by` bigint unsigned NOT NULL,\n  `assigned_to` bigint unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `created_by_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'platform',\n  `order_id` int unsigned DEFAULT NULL,\n  `incident_id` bigint unsigned DEFAULT NULL,\n  `response_due_at` timestamp NULL DEFAULT NULL,\n  `first_response_at` timestamp NULL DEFAULT NULL,\n  `customer_unread_at` timestamp NULL DEFAULT NULL,\n  `operator_unread_at` timestamp NULL DEFAULT NULL,\n  `branch_id` int unsigned DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `platform_tickets_business_id_index` (`business_id`),\n  KEY `platform_tickets_branch_id_index` (`branch_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "platform_users": "CREATE TABLE `platform_users` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `role` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `totp_secret` text COLLATE utf8mb4_unicode_ci,\n  `totp_last_step` bigint DEFAULT NULL,\n  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `session_version` int unsigned NOT NULL DEFAULT '1',\n  `recovery_codes` text COLLATE utf8mb4_unicode_ci,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `platform_users_email_unique` (`email`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "printers": "CREATE TABLE `printers` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `connection_type` enum('network','windows','linux') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `capability_profile` enum('default','simple','SP2000','TEP-200M','P822D') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default',\n  `char_per_line` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `ip_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `port` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_by` int unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `printers_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "product_locations": "CREATE TABLE `product_locations` (\n  `product_id` int NOT NULL,\n  `location_id` int NOT NULL,\n  KEY `product_locations_product_id_index` (`product_id`),\n  KEY `product_locations_location_id_index` (`location_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "product_portions": "CREATE TABLE `product_portions` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `parent_product_id` int unsigned NOT NULL,\n  `parent_variation_id` int unsigned DEFAULT NULL,\n  `sell_product_id` int unsigned NOT NULL,\n  `sell_variation_id` int unsigned DEFAULT NULL,\n  `consume_qty` decimal(22,4) NOT NULL,\n  `consume_unit_id` int unsigned NOT NULL,\n  `waste_percent` decimal(8,4) NOT NULL DEFAULT '0.0000',\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `created_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `product_portions_business_id_is_active_index` (`business_id`,`is_active`),\n  KEY `product_portions_sell_product_variation_active_index` (`sell_product_id`,`sell_variation_id`,`is_active`),\n  KEY `product_portions_parent_product_variation_active_index` (`parent_product_id`,`parent_variation_id`,`is_active`),\n  KEY `product_portions_parent_variation_id_foreign` (`parent_variation_id`),\n  KEY `product_portions_sell_variation_id_foreign` (`sell_variation_id`),\n  KEY `product_portions_consume_unit_id_foreign` (`consume_unit_id`),\n  KEY `product_portions_created_by_foreign` (`created_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "product_racks": "CREATE TABLE `product_racks` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned NOT NULL,\n  `product_id` int unsigned NOT NULL,\n  `rack` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `row` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `position` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `product_racks_business_id_index` (`business_id`),\n  KEY `product_racks_location_id_index` (`location_id`),\n  KEY `product_racks_product_id_index` (`product_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "product_sub_unit_prices": "CREATE TABLE `product_sub_unit_prices` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int NOT NULL,\n  `product_id` int NOT NULL,\n  `unit_id` int NOT NULL,\n  `sell_price` decimal(20,4) NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `product_sub_unit_prices_product_id_unit_id_unique` (`product_id`,`unit_id`),\n  KEY `product_sub_unit_prices_business_id_index` (`business_id`),\n  KEY `product_sub_unit_prices_product_id_index` (`product_id`),\n  KEY `product_sub_unit_prices_unit_id_index` (`unit_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "product_supplier": "CREATE TABLE `product_supplier` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `product_id` bigint unsigned NOT NULL,\n  `supplier_id` bigint unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`) USING BTREE,\n  UNIQUE KEY `product_supplier_product_supplier_unique` (`product_id`,`supplier_id`) USING BTREE,\n  KEY `product_supplier_product_id_index` (`product_id`) USING BTREE,\n  KEY `product_supplier_supplier_id_index` (`supplier_id`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC",
        "product_variations": "CREATE TABLE `product_variations` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `variation_template_id` int DEFAULT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `product_id` int unsigned NOT NULL,\n  `is_dummy` tinyint(1) NOT NULL DEFAULT '1',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `product_variations_name_index` (`name`),\n  KEY `product_variations_product_id_index` (`product_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "products": "CREATE TABLE `products` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `business_id` int unsigned NOT NULL,\n  `type` enum('single','variable','modifier','combo') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `unit_id` int unsigned DEFAULT NULL,\n  `secondary_unit_id` int DEFAULT NULL,\n  `sub_unit_ids` text COLLATE utf8mb4_unicode_ci,\n  `brand_id` int unsigned DEFAULT NULL,\n  `supplier_id` int unsigned DEFAULT NULL,\n  `category_id` int unsigned DEFAULT NULL,\n  `sub_category_id` int unsigned DEFAULT NULL,\n  `tax` int unsigned DEFAULT NULL,\n  `tax_type` enum('inclusive','exclusive') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `enable_stock` tinyint(1) NOT NULL DEFAULT '0',\n  `alert_quantity` decimal(22,4) DEFAULT NULL,\n  `sku` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `barcode_type` enum('C39','C128','EAN13','EAN8','UPCA','UPCE') COLLATE utf8mb4_unicode_ci DEFAULT 'C128',\n  `expiry_period` decimal(4,2) DEFAULT NULL,\n  `expiry_period_type` enum('days','months') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `enable_sr_no` tinyint(1) NOT NULL DEFAULT '0',\n  `weight` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field5` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field6` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field7` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field8` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field9` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field10` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field11` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field12` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field13` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field14` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field15` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field16` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field17` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field18` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field19` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_custom_field20` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_description` text COLLATE utf8mb4_unicode_ci,\n  `created_by` int unsigned NOT NULL,\n  `preparation_time_in_minutes` int DEFAULT NULL,\n  `warranty_id` int DEFAULT NULL,\n  `is_inactive` tinyint(1) NOT NULL DEFAULT '0',\n  `not_for_selling` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `status_modifier` enum('enabled','disabled') COLLATE utf8mb4_unicode_ci DEFAULT 'enabled',\n  PRIMARY KEY (`id`),\n  KEY `products_brand_id_foreign` (`brand_id`),\n  KEY `products_category_id_foreign` (`category_id`),\n  KEY `products_sub_category_id_foreign` (`sub_category_id`),\n  KEY `products_tax_foreign` (`tax`),\n  KEY `products_name_index` (`name`),\n  KEY `products_business_id_index` (`business_id`),\n  KEY `products_unit_id_index` (`unit_id`),\n  KEY `products_created_by_index` (`created_by`),\n  KEY `products_warranty_id_index` (`warranty_id`),\n  KEY `products_type_index` (`type`),\n  KEY `products_tax_type_index` (`tax_type`),\n  KEY `products_barcode_type_index` (`barcode_type`),\n  KEY `products_secondary_unit_id_index` (`secondary_unit_id`),\n  KEY `products_supplier_id_index` (`supplier_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "purchase_lines": "CREATE TABLE `purchase_lines` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `transaction_id` int unsigned NOT NULL,\n  `product_id` int unsigned NOT NULL,\n  `variation_id` int unsigned NOT NULL,\n  `quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `secondary_unit_quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `pp_without_discount` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Purchase price before inline discounts',\n  `discount_percent` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT 'Inline discount percentage',\n  `purchase_price` decimal(22,4) NOT NULL,\n  `purchase_price_inc_tax` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `item_tax` decimal(22,4) NOT NULL COMMENT 'Tax for one quantity',\n  `tax_id` int unsigned DEFAULT NULL,\n  `purchase_requisition_line_id` int DEFAULT NULL,\n  `purchase_order_line_id` int DEFAULT NULL,\n  `quantity_sold` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Quanity sold from this purchase line',\n  `quantity_adjusted` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Quanity adjusted in stock adjustment from this purchase line',\n  `quantity_returned` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `po_quantity_purchased` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `mfg_quantity_used` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `mfg_date` date DEFAULT NULL,\n  `exp_date` date DEFAULT NULL,\n  `lot_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `sub_unit_id` int DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `purchase_lines_transaction_id_foreign` (`transaction_id`),\n  KEY `purchase_lines_product_id_foreign` (`product_id`),\n  KEY `purchase_lines_variation_id_foreign` (`variation_id`),\n  KEY `purchase_lines_tax_id_foreign` (`tax_id`),\n  KEY `purchase_lines_sub_unit_id_index` (`sub_unit_id`),\n  KEY `purchase_lines_lot_number_index` (`lot_number`),\n  KEY `idx_pl_variation_sr` (`variation_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "receipt_template_versions": "CREATE TABLE `receipt_template_versions` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `receipt_template_id` bigint unsigned NOT NULL,\n  `version_number` int unsigned NOT NULL,\n  `snapshot_json` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n  `change_note` text COLLATE utf8mb4_unicode_ci,\n  `created_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `receipt_template_versions_unique` (`receipt_template_id`,`version_number`),\n  KEY `receipt_template_versions_receipt_template_id_index` (`receipt_template_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "receipt_templates": "CREATE TABLE `receipt_templates` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `category` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `size` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '80mm',\n  `is_default` tinyint(1) NOT NULL DEFAULT '0',\n  `is_component` tinyint(1) NOT NULL DEFAULT '0',\n  `is_global` tinyint(1) NOT NULL DEFAULT '0',\n  `is_public` tinyint(1) NOT NULL DEFAULT '0',\n  `public_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'private',\n  `allowed_business_ids` text COLLATE utf8mb4_unicode_ci,\n  `template_json` longtext COLLATE utf8mb4_unicode_ci,\n  `custom_css` text COLLATE utf8mb4_unicode_ci,\n  `font_family` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `font_style` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `change_note` text COLLATE utf8mb4_unicode_ci,\n  `created_by` int unsigned DEFAULT NULL,\n  `updated_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `receipt_templates_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "reference_counts": "CREATE TABLE `reference_counts` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `ref_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `ref_count` int NOT NULL,\n  `business_id` int NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `reference_counts_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "res_product_modifier_sets": "CREATE TABLE `res_product_modifier_sets` (\n  `modifier_set_id` int unsigned NOT NULL,\n  `product_id` int unsigned NOT NULL COMMENT 'Table use to store the modifier sets applicable for a product',\n  KEY `res_product_modifier_sets_modifier_set_id_foreign` (`modifier_set_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "res_tables": "CREATE TABLE `res_tables` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `created_by` int unsigned NOT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `res_tables_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "role_has_permissions": "CREATE TABLE `role_has_permissions` (\n  `permission_id` int unsigned NOT NULL,\n  `role_id` int unsigned NOT NULL,\n  PRIMARY KEY (`permission_id`,`role_id`),\n  KEY `role_has_permissions_role_id_foreign` (`role_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "roles": "CREATE TABLE `roles` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `guard_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `business_id` int unsigned NOT NULL,\n  `is_default` tinyint(1) NOT NULL DEFAULT '0',\n  `is_service_staff` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `roles_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "sell_line_warranties": "CREATE TABLE `sell_line_warranties` (\n  `sell_line_id` int NOT NULL,\n  `warranty_id` int NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "selling_price_groups": "CREATE TABLE `selling_price_groups` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `business_id` int unsigned NOT NULL,\n  `is_active` tinyint(1) NOT NULL DEFAULT '1',\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `selling_price_groups_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "sessions": "CREATE TABLE `sessions` (\n  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `user_id` int unsigned DEFAULT NULL,\n  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `user_agent` text COLLATE utf8mb4_unicode_ci,\n  `payload` text COLLATE utf8mb4_unicode_ci NOT NULL,\n  `last_activity` int NOT NULL,\n  UNIQUE KEY `sessions_id_unique` (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "staff_award_periods": "CREATE TABLE `staff_award_periods` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `period_type` enum('weekly','monthly','yearly') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `period_start` date NOT NULL,\n  `period_end` date NOT NULL,\n  `winner_count` int NOT NULL DEFAULT '10',\n  `is_finalized` tinyint(1) NOT NULL DEFAULT '0',\n  `finalized_at` timestamp NULL DEFAULT NULL,\n  `finalized_by` int unsigned DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `staff_award_periods_business_id_period_type_period_start_unique` (`business_id`,`period_type`,`period_start`),\n  KEY `staff_award_periods_finalized_by_foreign` (`finalized_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "staff_awards": "CREATE TABLE `staff_awards` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `staff_id` int unsigned NOT NULL,\n  `period_id` bigint unsigned DEFAULT NULL,\n  `period_type` enum('weekly','monthly','yearly') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `period_start` date NOT NULL,\n  `period_end` date NOT NULL,\n  `rank_position` int NOT NULL,\n  `sales_total` decimal(15,4) NOT NULL DEFAULT '0.0000',\n  `transaction_count` int NOT NULL DEFAULT '0',\n  `avg_transaction_value` decimal(15,4) NOT NULL DEFAULT '0.0000',\n  `performance_points` int NOT NULL DEFAULT '0',\n  `final_score` decimal(15,4) NOT NULL DEFAULT '0.0000',\n  `award_type` enum('manual','catalog') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `catalog_item_id` int unsigned DEFAULT NULL,\n  `award_quantity` int NOT NULL DEFAULT '1',\n  `gift_description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `gift_monetary_value` decimal(15,4) NOT NULL DEFAULT '0.0000',\n  `stock_deducted` tinyint(1) NOT NULL DEFAULT '0',\n  `award_notes` text COLLATE utf8mb4_unicode_ci,\n  `is_awarded` tinyint(1) NOT NULL DEFAULT '0',\n  `awarded_by` int unsigned DEFAULT NULL,\n  `awarded_date` timestamp NULL DEFAULT NULL,\n  `notification_sent` tinyint(1) NOT NULL DEFAULT '0',\n  `certificate_path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `staff_awards_business_id_foreign` (`business_id`),\n  KEY `staff_awards_staff_id_foreign` (`staff_id`),\n  KEY `staff_awards_period_id_foreign` (`period_id`),\n  KEY `staff_awards_catalog_item_id_foreign` (`catalog_item_id`),\n  KEY `staff_awards_awarded_by_foreign` (`awarded_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "staff_performance_activities": "CREATE TABLE `staff_performance_activities` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `staff_id` int unsigned NOT NULL,\n  `activity_type` enum('punctuality','customer_service','upselling','teamwork','training_completion','cleanliness','other') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `points` int NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `reference_url` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `verification_notes` text COLLATE utf8mb4_unicode_ci,\n  `recorded_by` int unsigned NOT NULL,\n  `recorded_date` date NOT NULL,\n  `status` enum('pending','verified','rejected') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'verified',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `staff_performance_activities_business_id_foreign` (`business_id`),\n  KEY `staff_performance_activities_staff_id_foreign` (`staff_id`),\n  KEY `staff_performance_activities_recorded_by_foreign` (`recorded_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "staff_recognition_settings": "CREATE TABLE `staff_recognition_settings` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `performance_weights` json DEFAULT NULL,\n  `activity_points` json DEFAULT NULL,\n  `min_transactions_weekly` int NOT NULL DEFAULT '10',\n  `min_transactions_monthly` int NOT NULL DEFAULT '50',\n  `min_transactions_yearly` int NOT NULL DEFAULT '500',\n  `auto_finalize_periods` tinyint(1) NOT NULL DEFAULT '0',\n  `send_notifications` tinyint(1) NOT NULL DEFAULT '1',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `staff_recognition_settings_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "stock_adjustment_lines": "CREATE TABLE `stock_adjustment_lines` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `transaction_id` int unsigned NOT NULL,\n  `product_id` int unsigned NOT NULL,\n  `variation_id` int unsigned NOT NULL,\n  `quantity` decimal(22,4) NOT NULL,\n  `secondary_unit_quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `unit_price` decimal(22,4) DEFAULT NULL COMMENT 'Last purchase unit price',\n  `removed_purchase_line` int DEFAULT NULL,\n  `lot_no_line_id` int DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `stock_adjustment_lines_product_id_foreign` (`product_id`),\n  KEY `stock_adjustment_lines_variation_id_foreign` (`variation_id`),\n  KEY `stock_adjustment_lines_transaction_id_index` (`transaction_id`),\n  KEY `stock_adjustment_lines_lot_no_line_id_index` (`lot_no_line_id`),\n  KEY `idx_sal_variation_sr` (`variation_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "stock_adjustments_temp": "CREATE TABLE `stock_adjustments_temp` (\n  `id` int DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci",
        "subscriptions": "CREATE TABLE `subscriptions` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `package_id` int unsigned NOT NULL,\n  `start_date` date DEFAULT NULL,\n  `trial_end_date` date DEFAULT NULL,\n  `end_date` date DEFAULT NULL,\n  `package_price` decimal(22,4) NOT NULL,\n  `original_price` decimal(22,4) DEFAULT NULL,\n  `coupon_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `package_details` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n  `created_id` int unsigned DEFAULT NULL,\n  `paid_via` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `payment_transaction_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `status` enum('approved','waiting','declined') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'waiting',\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `platform_created_by` bigint unsigned DEFAULT NULL,\n  `platform_cancelled_at` timestamp NULL DEFAULT NULL,\n  `platform_grace_until` date DEFAULT NULL,\n  `platform_kind` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'paid',\n  PRIMARY KEY (`id`),\n  KEY `subscriptions_business_id_foreign` (`business_id`),\n  KEY `subscriptions_package_id_index` (`package_id`),\n  KEY `subscriptions_created_id_index` (`created_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "superadmin_communicator_logs": "CREATE TABLE `superadmin_communicator_logs` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_ids` text COLLATE utf8mb4_unicode_ci,\n  `subject` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `message` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "superadmin_coupons": "CREATE TABLE `superadmin_coupons` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `coupon_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `discount_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `discount` decimal(8,2) NOT NULL,\n  `expiry_date` date DEFAULT NULL,\n  `applied_on_packages` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `applied_on_business` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_active` tinyint(1) NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "superadmin_frontend_pages": "CREATE TABLE `superadmin_frontend_pages` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n  `is_shown` tinyint(1) NOT NULL,\n  `menu_order` int DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "system": "CREATE TABLE `system` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `value` text COLLATE utf8mb4_unicode_ci,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "tax_rates": "CREATE TABLE `tax_rates` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `amount` double(22,4) NOT NULL,\n  `is_tax_group` tinyint(1) NOT NULL DEFAULT '0',\n  `for_tax_group` tinyint(1) NOT NULL DEFAULT '0',\n  `created_by` int unsigned NOT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `tax_rates_business_id_foreign` (`business_id`),\n  KEY `tax_rates_created_by_foreign` (`created_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "tazas": "CREATE TABLE `tazas` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `currency_id` int unsigned NOT NULL,\n  `value` decimal(50,15) NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `alias` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `tazas_business_id_foreign` (`business_id`),\n  KEY `tazas_currency_id_foreign` (`currency_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "transaction_exchange_lines": "CREATE TABLE `transaction_exchange_lines` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `exchange_id` int unsigned NOT NULL,\n  `original_sell_line_id` int unsigned NOT NULL COMMENT 'Original item being returned',\n  `new_sell_line_id` int unsigned DEFAULT NULL COMMENT 'New item being sold (if any)',\n  `exchange_type` enum('return_only','exchange_with_new','new_only') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'exchange_with_new',\n  `original_quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `original_unit_price` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `new_quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `new_unit_price` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `price_difference` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'New price - Original price',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `transaction_exchange_lines_exchange_id_foreign` (`exchange_id`),\n  KEY `transaction_exchange_lines_original_sell_line_id_foreign` (`original_sell_line_id`),\n  KEY `transaction_exchange_lines_new_sell_line_id_foreign` (`new_sell_line_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "transaction_exchanges": "CREATE TABLE `transaction_exchanges` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned NOT NULL,\n  `original_transaction_id` int unsigned NOT NULL COMMENT 'Reference to original sale',\n  `exchange_transaction_id` int unsigned NOT NULL COMMENT 'New exchange transaction',\n  `exchange_ref_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `exchange_date` datetime NOT NULL,\n  `total_exchange_amount` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Net amount (positive=customer pays, negative=refund)',\n  `status` enum('pending','completed','cancelled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',\n  `created_by` int unsigned NOT NULL,\n  `notes` text COLLATE utf8mb4_unicode_ci,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `original_amount` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total amount of returned items',\n  `new_amount` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total amount of new items',\n  `exchange_difference` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Difference amount (new - original)',\n  `payment_received` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Additional payment received from customer',\n  `refund_given` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Refund given to customer',\n  `cancelled_at` timestamp NULL DEFAULT NULL,\n  `cancelled_by` int unsigned DEFAULT NULL,\n  `stock_adjustments` text COLLATE utf8mb4_unicode_ci COMMENT 'JSON data of stock adjustments for reversal',\n  PRIMARY KEY (`id`),\n  KEY `transaction_exchanges_location_id_foreign` (`location_id`),\n  KEY `transaction_exchanges_original_transaction_id_foreign` (`original_transaction_id`),\n  KEY `transaction_exchanges_exchange_transaction_id_foreign` (`exchange_transaction_id`),\n  KEY `transaction_exchanges_created_by_foreign` (`created_by`),\n  KEY `transaction_exchanges_business_id_status_index` (`business_id`,`status`),\n  KEY `transaction_exchanges_exchange_date_index` (`exchange_date`),\n  KEY `idx_exchange_amounts` (`original_amount`,`new_amount`,`exchange_difference`),\n  KEY `idx_exchange_financial` (`payment_received`,`refund_given`),\n  KEY `transaction_exchanges_cancelled_by_foreign` (`cancelled_by`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "transaction_payments": "CREATE TABLE `transaction_payments` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `transaction_id` int unsigned DEFAULT NULL,\n  `business_id` int DEFAULT NULL,\n  `is_return` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Used during sales to return the change',\n  `amount` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `payment_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `transaction_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `card_transaction_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `card_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `card_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `card_holder_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `card_month` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `card_year` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `card_security` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `cheque_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `bank_account_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `paid_on` datetime DEFAULT NULL,\n  `created_by` int DEFAULT NULL,\n  `paid_through_link` tinyint(1) NOT NULL DEFAULT '0',\n  `gateway` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_advance` tinyint(1) NOT NULL DEFAULT '0',\n  `payment_for` int DEFAULT NULL COMMENT 'stores the contact id',\n  `parent_id` int DEFAULT NULL,\n  `note` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `payment_ref_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `account_id` int DEFAULT NULL,\n  `processor_contract_id` int unsigned DEFAULT NULL,\n  `processor_location_id` int unsigned DEFAULT NULL,\n  `processor_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `processor_fee_amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `processor_net_amount` decimal(22,6) NOT NULL DEFAULT '0.000000',\n  `processor_fee_rule_snapshot` longtext COLLATE utf8mb4_unicode_ci,\n  `processor_fee_settlement_id` int unsigned DEFAULT NULL,\n  `processor_fee_calculated_at` datetime DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `transaction_payments_transaction_id_foreign` (`transaction_id`),\n  KEY `transaction_payments_created_by_index` (`created_by`),\n  KEY `transaction_payments_parent_id_index` (`parent_id`),\n  KEY `transaction_payments_payment_type_index` (`payment_type`),\n  KEY `tp_processor_contract_index` (`processor_contract_id`),\n  KEY `tp_processor_location_index` (`processor_location_id`),\n  KEY `tp_processor_settlement_index` (`processor_fee_settlement_id`),\n  KEY `tp_processor_paid_on_index` (`business_id`,`paid_on`,`processor_contract_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "transaction_sell_lines": "CREATE TABLE `transaction_sell_lines` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `transaction_id` int unsigned NOT NULL,\n  `product_id` int unsigned NOT NULL,\n  `variation_id` int unsigned NOT NULL,\n  `product_portion_id` int unsigned DEFAULT NULL,\n  `portion_parent_product_id` int unsigned DEFAULT NULL,\n  `portion_parent_variation_id` int unsigned DEFAULT NULL,\n  `portion_unit_id` int unsigned DEFAULT NULL,\n  `portion_base_quantity` decimal(22,4) DEFAULT NULL COMMENT 'Parent base-unit quantity consumed by one sold unit, including waste.',\n  `portion_waste_percent` decimal(8,4) NOT NULL DEFAULT '0.0000',\n  `quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `secondary_unit_quantity` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `quantity_returned` decimal(20,4) NOT NULL DEFAULT '0.0000',\n  `unit_price_before_discount` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `unit_price` decimal(22,4) DEFAULT NULL COMMENT 'Sell price excluding tax',\n  `line_discount_type` enum('fixed','percentage') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `line_discount_amount` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `unit_price_inc_tax` decimal(22,4) DEFAULT NULL COMMENT 'Sell price including tax',\n  `item_tax` decimal(22,4) NOT NULL COMMENT 'Tax for one quantity',\n  `tax_id` int unsigned DEFAULT NULL,\n  `discount_id` int DEFAULT NULL,\n  `lot_no_line_id` int DEFAULT NULL,\n  `sell_line_note` text COLLATE utf8mb4_unicode_ci,\n  `so_line_id` int DEFAULT NULL,\n  `so_quantity_invoiced` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `res_service_staff_id` int DEFAULT NULL,\n  `res_line_order_status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `parent_sell_line_id` int DEFAULT NULL,\n  `children_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Type of children for the parent, like modifier or combo',\n  `sub_unit_id` int DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `is_exchange_return` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Mark if this line item was returned in exchange',\n  `exchange_parent_line_id` int unsigned DEFAULT NULL COMMENT 'Reference to original sell line if this is exchange replacement',\n  PRIMARY KEY (`id`),\n  KEY `transaction_sell_lines_transaction_id_foreign` (`transaction_id`),\n  KEY `transaction_sell_lines_product_id_foreign` (`product_id`),\n  KEY `transaction_sell_lines_variation_id_foreign` (`variation_id`),\n  KEY `transaction_sell_lines_tax_id_foreign` (`tax_id`),\n  KEY `transaction_sell_lines_children_type_index` (`children_type`),\n  KEY `transaction_sell_lines_parent_sell_line_id_index` (`parent_sell_line_id`),\n  KEY `transaction_sell_lines_line_discount_type_index` (`line_discount_type`),\n  KEY `transaction_sell_lines_discount_id_index` (`discount_id`),\n  KEY `transaction_sell_lines_lot_no_line_id_index` (`lot_no_line_id`),\n  KEY `transaction_sell_lines_sub_unit_id_index` (`sub_unit_id`),\n  KEY `transaction_sell_lines_is_exchange_return_index` (`is_exchange_return`),\n  KEY `transaction_sell_lines_exchange_parent_line_id_index` (`exchange_parent_line_id`),\n  KEY `idx_tsl_variation_sr` (`variation_id`),\n  KEY `transaction_sell_lines_product_portion_id_index` (`product_portion_id`),\n  KEY `transaction_sell_lines_portion_parent_index` (`portion_parent_product_id`,`portion_parent_variation_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "transaction_sell_lines_purchase_lines": "CREATE TABLE `transaction_sell_lines_purchase_lines` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `sell_line_id` int unsigned DEFAULT NULL COMMENT 'id from transaction_sell_lines',\n  `stock_adjustment_line_id` int unsigned DEFAULT NULL COMMENT 'id from stock_adjustment_lines',\n  `purchase_line_id` int unsigned NOT NULL COMMENT 'id from purchase_lines',\n  `quantity` decimal(22,4) NOT NULL,\n  `qty_returned` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `sell_line_id` (`sell_line_id`),\n  KEY `stock_adjustment_line_id` (`stock_adjustment_line_id`),\n  KEY `purchase_line_id` (`purchase_line_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "transactions": "CREATE TABLE `transactions` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `location_id` int unsigned DEFAULT NULL,\n  `is_kitchen_order` tinyint(1) NOT NULL DEFAULT '0',\n  `res_table_id` int unsigned DEFAULT NULL COMMENT 'fields to restaurant module',\n  `res_waiter_id` int unsigned DEFAULT NULL COMMENT 'fields to restaurant module',\n  `res_order_status` enum('received','cooked','served') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `kemet_order_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `kemet_delivery_status` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `kemet_delivery_address` text COLLATE utf8mb4_unicode_ci,\n  `kemet_delivery_phone` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `kemet_delivery_lat` decimal(10,7) DEFAULT NULL,\n  `kemet_delivery_lng` decimal(11,7) DEFAULT NULL,\n  `kemet_cash_collected` tinyint(1) NOT NULL DEFAULT '0',\n  `customer_address_id` bigint unsigned DEFAULT NULL,\n  `sub_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `sub_status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_quotation` tinyint(1) NOT NULL DEFAULT '0',\n  `payment_status` enum('paid','due','partial') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `adjustment_type` enum('normal','abnormal') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `contact_id` int unsigned DEFAULT NULL,\n  `customer_group_id` int DEFAULT NULL COMMENT 'used to add customer group while selling',\n  `invoice_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `source` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `subscription_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `subscription_repeat_on` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `transaction_date` datetime NOT NULL,\n  `total_before_tax` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total before the purchase/invoice tax, this includeds the indivisual product tax',\n  `tax_id` int unsigned DEFAULT NULL,\n  `tax_amount` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `discount_type` enum('fixed','percentage') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `discount_amount` decimal(22,4) DEFAULT '0.0000',\n  `rp_redeemed` int NOT NULL DEFAULT '0' COMMENT 'rp is the short form of reward points',\n  `rp_redeemed_amount` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'rp is the short form of reward points',\n  `shipping_details` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `shipping_address` text COLLATE utf8mb4_unicode_ci,\n  `delivery_date` datetime DEFAULT NULL,\n  `shipping_status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `delivered_to` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `delivery_person` bigint DEFAULT NULL,\n  `shipping_charges` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `shipping_custom_field_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `shipping_custom_field_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `shipping_custom_field_3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `shipping_custom_field_4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `shipping_custom_field_5` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `additional_notes` text COLLATE utf8mb4_unicode_ci,\n  `staff_note` text COLLATE utf8mb4_unicode_ci,\n  `is_export` tinyint(1) NOT NULL DEFAULT '0',\n  `export_custom_fields_info` longtext COLLATE utf8mb4_unicode_ci,\n  `round_off_amount` decimal(22,4) NOT NULL DEFAULT '0.0000' COMMENT 'Difference of rounded total and actual total',\n  `additional_expense_key_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `additional_expense_value_1` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `additional_expense_key_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `additional_expense_value_2` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `additional_expense_key_3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `additional_expense_value_3` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `additional_expense_key_4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `additional_expense_value_4` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `final_total` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `expense_category_id` int unsigned DEFAULT NULL,\n  `expense_sub_category_id` int DEFAULT NULL,\n  `expense_for` int unsigned DEFAULT NULL,\n  `commission_agent` int DEFAULT NULL,\n  `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `is_direct_sale` tinyint(1) NOT NULL DEFAULT '0',\n  `is_suspend` tinyint(1) NOT NULL DEFAULT '0',\n  `exchange_rate` decimal(20,3) NOT NULL DEFAULT '1.000',\n  `total_amount_recovered` decimal(22,4) DEFAULT NULL COMMENT 'Used for stock adjustment.',\n  `transfer_parent_id` int DEFAULT NULL,\n  `return_parent_id` int DEFAULT NULL,\n  `opening_stock_product_id` int DEFAULT NULL,\n  `created_by` int unsigned NOT NULL,\n  `essentials_duration` decimal(8,2) NOT NULL,\n  `essentials_duration_unit` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `essentials_amount_per_unit_duration` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `essentials_allowances` text COLLATE utf8mb4_unicode_ci,\n  `essentials_deductions` text COLLATE utf8mb4_unicode_ci,\n  `purchase_requisition_ids` text COLLATE utf8mb4_unicode_ci,\n  `prefer_payment_method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `prefer_payment_account` int DEFAULT NULL,\n  `sales_order_ids` text COLLATE utf8mb4_unicode_ci,\n  `purchase_order_ids` text COLLATE utf8mb4_unicode_ci,\n  `custom_field_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field_3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field_4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `import_batch` int DEFAULT NULL,\n  `import_time` datetime DEFAULT NULL,\n  `types_of_service_id` int DEFAULT NULL,\n  `packing_charge` decimal(22,4) DEFAULT NULL,\n  `packing_charge_type` enum('fixed','percent') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `service_custom_field_1` text COLLATE utf8mb4_unicode_ci,\n  `service_custom_field_2` text COLLATE utf8mb4_unicode_ci,\n  `service_custom_field_3` text COLLATE utf8mb4_unicode_ci,\n  `service_custom_field_4` text COLLATE utf8mb4_unicode_ci,\n  `service_custom_field_5` text COLLATE utf8mb4_unicode_ci,\n  `service_custom_field_6` text COLLATE utf8mb4_unicode_ci,\n  `is_created_from_api` tinyint(1) NOT NULL DEFAULT '0',\n  `rp_earned` int NOT NULL DEFAULT '0' COMMENT 'rp is the short form of reward points',\n  `order_addresses` text COLLATE utf8mb4_unicode_ci,\n  `is_recurring` tinyint(1) NOT NULL DEFAULT '0',\n  `recur_interval` double(22,4) DEFAULT NULL,\n  `recur_interval_type` enum('days','months','years') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `recur_repetitions` int DEFAULT NULL,\n  `recur_stopped_on` datetime DEFAULT NULL,\n  `recur_parent_id` int DEFAULT NULL,\n  `invoice_token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `pay_term_number` int DEFAULT NULL,\n  `pay_term_type` enum('days','months') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `selling_price_group_id` int DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `with_shipping` tinyint(1) NOT NULL DEFAULT '1',\n  `exchange_parent_id` int unsigned DEFAULT NULL COMMENT 'Reference to original transaction if this is an exchange',\n  `is_exchange` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Mark if this transaction is an exchange',\n  `offline_sale_uuid` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `platform_finalized_at` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `transactions_business_offline_sale_uuid_unique` (`business_id`,`offline_sale_uuid`),\n  KEY `transactions_tax_id_foreign` (`tax_id`),\n  KEY `transactions_business_id_index` (`business_id`),\n  KEY `transactions_type_index` (`type`),\n  KEY `transactions_contact_id_index` (`contact_id`),\n  KEY `transactions_transaction_date_index` (`transaction_date`),\n  KEY `transactions_created_by_index` (`created_by`),\n  KEY `transactions_location_id_index` (`location_id`),\n  KEY `transactions_expense_for_foreign` (`expense_for`),\n  KEY `transactions_expense_category_id_index` (`expense_category_id`),\n  KEY `transactions_sub_type_index` (`sub_type`),\n  KEY `transactions_return_parent_id_index` (`return_parent_id`),\n  KEY `type` (`type`),\n  KEY `transactions_status_index` (`status`),\n  KEY `transactions_sub_status_index` (`sub_status`),\n  KEY `transactions_res_table_id_index` (`res_table_id`),\n  KEY `transactions_res_waiter_id_index` (`res_waiter_id`),\n  KEY `transactions_res_order_status_index` (`res_order_status`),\n  KEY `transactions_payment_status_index` (`payment_status`),\n  KEY `transactions_discount_type_index` (`discount_type`),\n  KEY `transactions_commission_agent_index` (`commission_agent`),\n  KEY `transactions_transfer_parent_id_index` (`transfer_parent_id`),\n  KEY `transactions_types_of_service_id_index` (`types_of_service_id`),\n  KEY `transactions_packing_charge_type_index` (`packing_charge_type`),\n  KEY `transactions_recur_parent_id_index` (`recur_parent_id`),\n  KEY `transactions_selling_price_group_id_index` (`selling_price_group_id`),\n  KEY `transactions_delivery_date_index` (`delivery_date`),\n  KEY `transactions_delivery_person_index` (`delivery_person`),\n  KEY `transactions_exchange_parent_id_index` (`exchange_parent_id`),\n  KEY `transactions_is_exchange_index` (`is_exchange`),\n  KEY `idx_t_business_type_loc_sr` (`business_id`,`type`,`location_id`),\n  KEY `transactions_platform_finalized_at_index` (`platform_finalized_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "types_of_services": "CREATE TABLE `types_of_services` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `business_id` int NOT NULL,\n  `location_price_group` text COLLATE utf8mb4_unicode_ci,\n  `packing_charge` decimal(22,4) DEFAULT NULL,\n  `packing_charge_type` enum('fixed','percent') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `enable_custom_fields` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `types_of_services_business_id_index` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "units": "CREATE TABLE `units` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned NOT NULL,\n  `actual_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `short_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `allow_decimal` tinyint(1) NOT NULL,\n  `base_unit_id` int DEFAULT NULL,\n  `base_unit_multiplier` decimal(20,4) DEFAULT NULL,\n  `created_by` int unsigned NOT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `units_business_id_foreign` (`business_id`),\n  KEY `units_created_by_foreign` (`created_by`),\n  KEY `units_base_unit_id_index` (`base_unit_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "universal_search_logs": "CREATE TABLE `universal_search_logs` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `business_id` int unsigned DEFAULT NULL,\n  `user_id` int unsigned DEFAULT NULL,\n  `session_id` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `query` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `normalized_query` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `scope` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'all',\n  `location_id` int unsigned DEFAULT NULL,\n  `source_url` text COLLATE utf8mb4_unicode_ci,\n  `source_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `source_title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `results_count` int unsigned NOT NULL DEFAULT '0',\n  `top_result_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `top_result_category` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `universal_search_logs_business_id_index` (`business_id`),\n  KEY `universal_search_logs_user_id_index` (`user_id`),\n  KEY `universal_search_logs_session_id_index` (`session_id`),\n  KEY `universal_search_logs_normalized_query_index` (`normalized_query`),\n  KEY `universal_search_logs_location_id_index` (`location_id`),\n  KEY `universal_search_logs_source_path_index` (`source_path`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "user_contact_access": "CREATE TABLE `user_contact_access` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `user_id` int NOT NULL,\n  `contact_id` int NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `user_contact_access_user_id_index` (`user_id`),\n  KEY `user_contact_access_contact_id_index` (`contact_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "users": "CREATE TABLE `users` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `user_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'user',\n  `is_driver` tinyint(1) NOT NULL DEFAULT '0',\n  `is_commision` tinyint(1) NOT NULL DEFAULT '0',\n  `surname` char(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `username` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `password` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `language` char(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en',\n  `contact_no` char(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `address` text COLLATE utf8mb4_unicode_ci,\n  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `business_id` int unsigned DEFAULT NULL,\n  `essentials_department_id` int DEFAULT NULL,\n  `essentials_designation_id` int DEFAULT NULL,\n  `essentials_salary` decimal(22,4) DEFAULT NULL,\n  `essentials_pay_period` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `essentials_pay_cycle` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `available_at` datetime DEFAULT NULL COMMENT 'Service staff avilable at. Calculated from product preparation_time_in_minutes',\n  `paused_at` datetime DEFAULT NULL COMMENT 'Service staff available time paused at, Will be nulled on resume.',\n  `max_sales_discount_percent` decimal(5,2) DEFAULT NULL,\n  `allow_login` tinyint(1) NOT NULL DEFAULT '1',\n  `status` enum('active','inactive','terminated') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',\n  `is_enable_service_staff_pin` tinyint(1) NOT NULL DEFAULT '0',\n  `service_staff_pin` text COLLATE utf8mb4_unicode_ci,\n  `crm_contact_id` int unsigned DEFAULT NULL,\n  `is_cmmsn_agnt` tinyint(1) NOT NULL DEFAULT '0',\n  `cmmsn_percent` decimal(4,2) NOT NULL DEFAULT '0.00',\n  `selected_contacts` tinyint(1) NOT NULL DEFAULT '0',\n  `dob` date DEFAULT NULL,\n  `gender` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `marital_status` enum('married','unmarried','divorced') COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `blood_group` char(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `contact_number` char(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `alt_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `family_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `fb_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `twitter_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `social_media_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `social_media_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `permanent_address` text COLLATE utf8mb4_unicode_ci,\n  `current_address` text COLLATE utf8mb4_unicode_ci,\n  `guardian_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field_3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `custom_field_4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `bank_details` longtext COLLATE utf8mb4_unicode_ci,\n  `id_proof_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `id_proof_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `location_id` int DEFAULT NULL COMMENT 'user primary work location',\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `users_username_unique` (`username`),\n  KEY `users_business_id_foreign` (`business_id`),\n  KEY `users_user_type_index` (`user_type`),\n  KEY `users_crm_contact_id_foreign` (`crm_contact_id`),\n  KEY `users_essentials_department_id_index` (`essentials_department_id`),\n  KEY `users_essentials_designation_id_index` (`essentials_designation_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "variation_group_prices": "CREATE TABLE `variation_group_prices` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `variation_id` int unsigned NOT NULL,\n  `price_group_id` int unsigned NOT NULL,\n  `price_inc_tax` decimal(22,4) NOT NULL,\n  `price_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fixed',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `variation_group_prices_variation_id_foreign` (`variation_id`),\n  KEY `variation_group_prices_price_group_id_foreign` (`price_group_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "variation_location_details": "CREATE TABLE `variation_location_details` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `product_id` int unsigned NOT NULL,\n  `product_variation_id` int unsigned NOT NULL COMMENT 'id from product_variations table',\n  `variation_id` int unsigned NOT NULL,\n  `location_id` int unsigned NOT NULL,\n  `qty_available` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `variation_location_details_location_id_foreign` (`location_id`),\n  KEY `variation_location_details_product_id_index` (`product_id`),\n  KEY `variation_location_details_product_variation_id_index` (`product_variation_id`),\n  KEY `variation_location_details_variation_id_index` (`variation_id`),\n  KEY `idx_vld_vl_sr` (`variation_id`,`location_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "variation_templates": "CREATE TABLE `variation_templates` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `business_id` int unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `variation_templates_business_id_foreign` (`business_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "variation_value_templates": "CREATE TABLE `variation_value_templates` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `variation_template_id` int unsigned NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `variation_value_templates_name_index` (`name`),\n  KEY `variation_value_templates_variation_template_id_index` (`variation_template_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "variations": "CREATE TABLE `variations` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `product_id` int unsigned NOT NULL,\n  `sub_sku` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `product_variation_id` int unsigned NOT NULL,\n  `variation_value_id` int DEFAULT NULL,\n  `default_purchase_price` decimal(22,4) DEFAULT NULL,\n  `dpp_inc_tax` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `profit_percent` decimal(22,4) NOT NULL DEFAULT '0.0000',\n  `default_sell_price` decimal(22,4) DEFAULT NULL,\n  `sell_price_inc_tax` decimal(22,4) DEFAULT NULL COMMENT 'Sell price including tax',\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `deleted_at` timestamp NULL DEFAULT NULL,\n  `combo_variations` text COLLATE utf8mb4_unicode_ci COMMENT 'Contains the combo variation details',\n  `modifier_qty` decimal(10,2) DEFAULT NULL,\n  `modifier_product` bigint DEFAULT NULL,\n  `color_button_modifier` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `variations_product_id_foreign` (`product_id`),\n  KEY `variations_product_variation_id_foreign` (`product_variation_id`),\n  KEY `variations_name_index` (`name`),\n  KEY `variations_sub_sku_index` (`sub_sku`),\n  KEY `variations_variation_value_id_index` (`variation_value_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
        "vw_vld_vs_calculated": "CREATE TABLE `vw_vld_vs_calculated` (\n  `business_id` int unsigned DEFAULT NULL,\n  `location_id` int unsigned DEFAULT NULL,\n  `variation_id` int unsigned DEFAULT NULL,\n  `vld_qty` decimal(22,4) DEFAULT NULL,\n  `calculated_qty` decimal(51,4) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci",
        "warranties": "CREATE TABLE `warranties` (\n  `id` int unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `business_id` int NOT NULL,\n  `description` text COLLATE utf8mb4_unicode_ci,\n  `duration` int NOT NULL,\n  `duration_type` enum('days','months','years') COLLATE utf8mb4_unicode_ci NOT NULL,\n  `created_at` timestamp NULL DEFAULT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `warranties_business_id_index` (`business_id`),\n  KEY `warranties_duration_type_index` (`duration_type`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci"
    },
    "views": []
}