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

START TRANSACTION;



--
-- Database: `waotest`
--

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

--
-- Table structure for table `ai_prompts`
--

CREATE TABLE `ai_prompts` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `action` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `bot_flows`
--

CREATE TABLE `bot_flows` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `flow_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

--
-- Dumping data for table `bot_flows`
--

INSERT INTO `bot_flows` (`id`, `tenant_id`, `name`, `description`, `flow_data`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 2, 'Default', 'Greeting default if customer message', '{\"nodes\":[{\"id\":\"trigger-1\",\"type\":\"trigger\",\"draggable\":true,\"initialized\":false,\"position\":{\"x\":-545.8450767886266,\"y\":-389.2670784370039},\"data\":{\"label\":\"Start Trigger\",\"keywords\":[],\"dimensions\":{\"width\":280,\"height\":150},\"isValid\":true,\"output\":[{\"reply_type_text\":\"When message contains\",\"reply_type\":\"2\",\"rel_type\":\"lead\",\"trigger\":\"help\"}]}},{\"id\":\"1758618962412\",\"type\":\"buttonMessage\",\"initialized\":false,\"position\":{\"x\":-8.136603385320996,\"y\":-660.2584118939038},\"data\":{\"output\":[{\"reply_text\":\"Sila tekan butang dibawah jika ingin bercakap dengan khidmat pelanggan kami.\",\"button1\":\"Admin Nadia\",\"button2\":\"Admin Ira\",\"button3\":\"Admin Meen\"}],\"isValid\":true}},{\"id\":\"1758619082534\",\"type\":\"callToAction\",\"initialized\":false,\"position\":{\"x\":608.3883377269572,\"y\":-920.5848491845763},\"data\":{\"output\":[{\"reply_text\":\"Anda akan dihubungkan dengan Admin Nadia\",\"buttonText\":\"Admin Nadia\",\"buttonLink\":\"https://csnadia.mamadil.app\",\"bot_header\":\"\",\"bot_footer\":\"\"}],\"isValid\":true}},{\"id\":\"node-1758619181549\",\"type\":\"callToAction\",\"initialized\":false,\"position\":{\"x\":919.0612232737708,\"y\":-164.07095805793455},\"data\":{\"output\":[{\"reply_text\":\"Anda akan dihubungkan dengan Admin Ira\",\"buttonText\":\"Admin Ira\",\"buttonLink\":\"https://cssyahirah.mamadil.app\",\"bot_header\":\"\",\"bot_footer\":\"\"}],\"isValid\":true}},{\"id\":\"node-1758619214526\",\"type\":\"callToAction\",\"initialized\":false,\"position\":{\"x\":617.1281469551718,\"y\":609.4597653427466},\"data\":{\"output\":[{\"reply_text\":\"Anda akan dihubungkan dengan Admin Meen\",\"buttonText\":\"Admin Meen\",\"buttonLink\":\"https://csyasmin.mamadil.app\",\"bot_header\":\"\",\"bot_footer\":\"\"}],\"isValid\":true}}],\"edges\":[{\"id\":\"vueflow__edge-trigger-1-1758618962412\",\"type\":\"button\",\"source\":\"trigger-1\",\"target\":\"1758618962412\",\"sourceHandle\":null,\"targetHandle\":null,\"data\":{},\"label\":\"\",\"animated\":true,\"sourceX\":-157.8449808916692,\"sourceY\":-142.6732659533117,\"targetX\":-16.136648630604498,\"targetY\":-131.2583215141235},{\"id\":\"vueflow__edge-1758618962412button-0-1758619082534\",\"type\":\"button\",\"source\":\"1758618962412\",\"target\":\"1758619082534\",\"sourceHandle\":\"button-0\",\"targetHandle\":null,\"data\":{},\"label\":\"\",\"animated\":true,\"sourceX\":245.3555273475799,\"sourceY\":-189.2583612643873,\"targetX\":600.388430965034,\"targetY\":-564.5847505401091},{\"id\":\"vueflow__edge-1758618962412button-1-node-1758619181549\",\"type\":\"button\",\"source\":\"1758618962412\",\"target\":\"node-1758619181549\",\"sourceHandle\":\"button-1\",\"targetHandle\":null,\"data\":{},\"label\":\"\",\"animated\":true,\"sourceX\":245.3555273475799,\"sourceY\":56.74167981531673,\"targetX\":911.0613165118476,\"targetY\":191.9291405865327},{\"id\":\"vueflow__edge-1758618962412button-2-node-1758619214526\",\"type\":\"button\",\"source\":\"1758618962412\",\"target\":\"node-1758619214526\",\"sourceHandle\":\"button-2\",\"targetHandle\":null,\"data\":{},\"label\":\"\",\"animated\":true,\"sourceX\":245.3555273475799,\"sourceY\":302.74172089502076,\"targetX\":609.127963226528,\"targetY\":965.4598639872138}],\"position\":[324.0197679107041,429.6189612829199],\"zoom\":0.44074007895358686,\"viewport\":{\"x\":324.0197679107041,\"y\":429.6189612829199,\"zoom\":0.44074007895358686}}', 0, '2025-09-23 01:02:09', '2025-09-23 20:15:25');

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

--
-- Table structure for table `campaigns`
--

CREATE TABLE `campaigns` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `rel_type` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `template_id` text COLLATE utf8mb4_general_ci,
  `scheduled_send_time` timestamp NULL DEFAULT NULL,
  `send_now` tinyint(1) NOT NULL DEFAULT '0',
  `header_params` text COLLATE utf8mb4_general_ci,
  `body_params` text COLLATE utf8mb4_general_ci,
  `footer_params` text COLLATE utf8mb4_general_ci,
  `pause_campaign` tinyint(1) NOT NULL DEFAULT '0',
  `select_all` tinyint(1) NOT NULL DEFAULT '0',
  `is_sent` tinyint(1) NOT NULL DEFAULT '0',
  `sending_count` int NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `filename` text COLLATE utf8mb4_general_ci,
  `rel_data` text COLLATE utf8mb4_general_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `campaign_details`
--

CREATE TABLE `campaign_details` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `campaign_id` bigint UNSIGNED NOT NULL,
  `rel_id` bigint UNSIGNED DEFAULT NULL,
  `rel_type` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `header_message` text COLLATE utf8mb4_general_ci,
  `body_message` text COLLATE utf8mb4_general_ci,
  `footer_message` text COLLATE utf8mb4_general_ci,
  `status` int DEFAULT NULL,
  `response_message` text COLLATE utf8mb4_general_ci,
  `whatsapp_id` text COLLATE utf8mb4_general_ci,
  `message_status` varchar(25) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `canned_replies`
--

CREATE TABLE `canned_replies` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_public` tinyint(1) NOT NULL DEFAULT '0',
  `added_from` bigint UNSIGNED NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `contact_imports`
--

CREATE TABLE `contact_imports` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `file_path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_records` int NOT NULL DEFAULT '0',
  `processed_records` int NOT NULL DEFAULT '0',
  `valid_records` int NOT NULL DEFAULT '0',
  `invalid_records` int NOT NULL DEFAULT '0',
  `skipped_records` int NOT NULL DEFAULT '0',
  `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `error_messages` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

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

--
-- Table structure for table `credit_transactions`
--

CREATE TABLE `credit_transactions` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `type` enum('credit','debit','transfer') COLLATE utf8mb4_general_ci NOT NULL,
  `amount` decimal(13,2) NOT NULL,
  `currency_id` bigint UNSIGNED NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `invoice_id` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

--
-- Dumping data for table `credit_transactions`
--

INSERT INTO `credit_transactions` (`id`, `tenant_id`, `type`, `amount`, `currency_id`, `description`, `metadata`, `invoice_id`, `created_at`, `updated_at`) VALUES
(1, 1, 'credit', 0.97, 2, 'Proration credit for plan change from Sample 1  to Pro', '{\"old_balance\":\"0.00\",\"new_balance\":\"0.97\",\"created_by\":\"system\",\"source\":\"plan_change_proration\",\"old_plan_id\":4,\"new_plan_id\":2}', NULL, '2025-09-28 03:26:12', '2025-09-28 03:26:12');

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

--
-- Table structure for table `currencies`
--

CREATE TABLE `currencies` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `symbol` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '$',
  `format` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `exchange_rate` decimal(10,6) DEFAULT '1.000000',
  `is_default` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `currencies`
--

INSERT INTO `currencies` (`id`, `name`, `code`, `symbol`, `format`, `exchange_rate`, `is_default`, `created_at`, `updated_at`) VALUES
(1, 'US Dollar', 'USD', '$', 'before_amount', 1.000000, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(2, 'RINGGIT', 'MYR', 'RM', 'before_amount', 1.000000, 1, '2025-09-18 02:43:51', '2025-09-18 02:43:53');

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

--
-- Table structure for table `custom_fields`
--

CREATE TABLE `custom_fields` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `field_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `field_label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `field_type` enum('text','textarea','number','date','dropdown','checkbox') COLLATE utf8mb4_unicode_ci NOT NULL,
  `field_options` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `placeholder` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `is_required` tinyint(1) NOT NULL DEFAULT '0',
  `default_value` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `display_order` int NOT NULL DEFAULT '0',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `show_on_table` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

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

--
-- Table structure for table `departments`
--

CREATE TABLE `departments` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `assignee_id` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `departments`
--

INSERT INTO `departments` (`id`, `name`, `description`, `status`, `assignee_id`, `created_at`, `updated_at`) VALUES
(1, 'Sales', 'Handles client relationships, lead generation, and deal closures.', 1, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(2, 'Technical', 'Responsible for development, deployment, and technical support.', 1, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(3, 'Quality Assurance', 'Ensures product meets quality standards through rigorous testing.', 1, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(4, 'General', 'Manages company-wide services like HR, admin, and operations.', 1, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44');

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

--
-- Table structure for table `email_layouts`
--

CREATE TABLE `email_layouts` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `header` text COLLATE utf8mb4_unicode_ci,
  `footer` text COLLATE utf8mb4_unicode_ci,
  `master_template` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `variables` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `is_default` tinyint(1) NOT NULL DEFAULT '0',
  `is_system` tinyint(1) NOT NULL DEFAULT '0',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

--
-- Dumping data for table `email_layouts`
--

INSERT INTO `email_layouts` (`id`, `name`, `slug`, `header`, `footer`, `master_template`, `variables`, `is_default`, `is_system`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Default Layout', 'default', '<tr><td style=\"background-color: #6366f1; padding: 30px; text-align: center; border-top-left-radius: 12px; border-top-right-radius: 12px;\"> <img src=\"{dark_logo}\" alt=\"{company_name}\" style=\"height: 40px; width: auto; margin-bottom: 10px;\"></td></tr>', '<tr> <td style=\"background-color: #f8fafc; padding: 30px; text-align: center; border-top: 1px solid #e5e7eb; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;\"> <p style=\"color: #6b7280; font-size: 14px; margin: 0 0 10px 0;\"> © {current_year} {company_name}.All rights reserved. </p><p style=\"color: #6b7280; font-size: 14px; margin: 0;\">Made with ♥ by {company_name}</p></td></tr>', '<!DOCTYPE html>\n        <html>\n        <head>\n            <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n            <title>{{laungauge}}</title>\n            <style>\n                body {\n                margin: 0; padding: 0; background-color: #f5f6fa;\n                }\n\n            </style>\n        </head>\n        <body>\n            <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color: #f5f6fa; padding: 30px;\">\n                <tr>\n                    <td align=\"center\">\n                        <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"\n                            style=\"max-width: 800px; background-color: #ffffff; border-radius: 12px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\">\n                            {HEADER}\n                            <tr>\n                                <td style=\"padding:40px 50px;\">\n                                        {CONTENT}\n                                </td>\n                                {FOOTER}\n                            </tr>\n                        </table>\n                    </td>\n                </tr>\n            </table>\n        </body>\n        </html>', '[\"company_name\",\"company_logo\",\"company_address\",\"unsubscribe_url\"]', 1, 1, 1, '2025-09-18 10:41:44', '2025-09-18 10:41:44');

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

--
-- Table structure for table `email_logs`
--

CREATE TABLE `email_logs` (
  `id` bigint UNSIGNED NOT NULL,
  `email_template_id` bigint UNSIGNED DEFAULT NULL,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `from` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `to` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bcc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reply_to` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `status` enum('pending','sent','failed','scheduled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `error` text COLLATE utf8mb4_unicode_ci,
  `sent_at` timestamp NULL DEFAULT NULL,
  `scheduled_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

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

--
-- Table structure for table `email_templates`
--

CREATE TABLE `email_templates` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  `variables` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `merge_fields_groups` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `is_system` tinyint(1) NOT NULL DEFAULT '0',
  `category` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `layout_id` int DEFAULT NULL,
  `use_layout` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint UNSIGNED DEFAULT NULL,
  `updated_by` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

--
-- Dumping data for table `email_templates`
--

INSERT INTO `email_templates` (`id`, `name`, `slug`, `description`, `subject`, `content`, `variables`, `merge_fields_groups`, `is_active`, `is_system`, `category`, `type`, `layout_id`, `use_layout`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(1, 'Test Email', 'test-email', NULL, 'This is a test email from {company_name}', '<p>Hello {first_name} {last_name},</p><p>This is a test email from <strong>{company_name}</strong> to confirm your email configuration is working correctly.</p><p>Thank you, </p><p>{company_name} Team</p>', NULL, '\"[\\\"user-group\\\",\\\"other-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(2, 'Tenant Welcome Email', 'tenant-welcome-mail', NULL, 'Welcome to {company_name}, {tenant_company_name}!', '<p>Hello {tenant_company_name},</p><p>Welcome to <strong>{company_name}</strong>! We are thrilled to have you on board. Your account has been successfully created and is ready to use.</p><p>If you have any questions or need assistance, feel free to reach out.</p><p>Best regards,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(3, 'Staff Welcome Email', 'staff-welcome-mail', NULL, 'Welcome to {company_name}, {first_name} {last_name}!', '<p>Hello {first_name} {last_name},</p>\n                <p>Welcome to <strong>{company_name}</strong>! Your staff account has been successfully created and is ready to use.</p>\n                <p>If you have any questions or need assistance, feel free to reach out.</p>\n                <p>Best regards,</p>\n                <p>{company_name} Team</p>', NULL, '\"[\\\"user-group\\\",\\\"other-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(4, 'New Tenant Reminder Email to Admin', 'new-tenant-reminder-email-to-admin', NULL, 'New tenant {tenant_company_name} has signed up', '<p>Hi {first_name} {last_name},</p><p>A new tenant <strong>{tenant_company_name}</strong> has just signed up on <strong>{company_name}.</strong></p><p>Please log in to your admin panel to review the details.</p><p>Regards,</p><p>{company_name} </p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"user-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(5, 'Subscription Renewal Payment Successful', 'subscription-renewal-success', NULL, 'Your subscription has been successfully renewed', '<p>Hi {tenant_company_name},</p><p>We are happy to let you know that your subscription has been successfully renewed.</p><p><strong>Plan:</strong> {plan_name}</p><p><strong>Amount:</strong> {plan_price}</p><p>Thank you for staying with us!</p><p>Best,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"subscription-group\\\",\\\"plan-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(6, 'Subscription Renewal Payment Failed', 'subscription-renewal-failed', NULL, 'Subscription renewal failed for {tenant_company_name}', '<p>Hi {tenant_company_name},</p><p>Unfortunately, your recent subscription renewal attempt was unsuccessful.</p><p>Please update your payment method to avoid any disruption in service.</p><p>Best regards,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"subscription-group\\\",\\\"plan-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(7, 'Subscription Created', 'subscription-created', NULL, 'Your subscription to {plan_name} has been created', '<p>Hello {tenant_company_name},</p><p>Your subscription to the {plan_name} plan has been successfully created.</p><p>Next billing date: {subscription_period_ends_at}</p><p>We hope you enjoy our services!</p><p>Thanks,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"subscription-group\\\",\\\"plan-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(8, 'Subscription Activated', 'subscription-activated', NULL, 'Your subscription is now active!', '<p>Hi {tenant_company_name},</p><p>Your subscription to {plan_name} is now active.</p><p>Enjoy all the benefits that come with your plan. If you need support, don’t hesitate to contact us.</p><p>Cheers,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"subscription-group\\\",\\\"plan-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(9, 'Invoice Receipt', 'invoice-receipt', NULL, 'Your payment receipt for Invoice #{invoice_number}', '<p>Hello {tenant_company_name},</p><p>Thank you for your payment.</p><p><strong>Invoice Number:</strong> {invoice_number}</p><p><strong>Amount:</strong> {invoice_total}</p><p><strong>Date:</strong> {invoice_paid_at}</p><p>You can download your invoice from your dashboard at any time.</p><p>Best Regards,</p><p>{company_name}</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"invoice-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(10, 'Subscription Renewal Reminder', 'subscription-renewal-reminder', NULL, 'Your subscription will renew soon', '<p>Hi {tenant_company_name},</p><p>This is a reminder that your subscription to {subscription_plan_name} will renew on {subscription_period_ends_at}.</p><p>If you need to make any changes to your plan or payment method, please do so before this date.</p><p>Thank you,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"subscription-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(11, 'Subscription Expiring Soon', 'subscription-expiring-soon', NULL, 'Your subscription is expiring soon', '<p>Dear {company_name},</p><p>Your subscription to {subscription_plan_name} is set to expire on {subscription_period_ends_at}.</p><p>To continue uninterrupted service, please renew or update your subscription details before the expiration date.</p><p>Best regards,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"subscription-group\\\",\\\"plan-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(12, 'Payment Approved Email', 'payment-approved', NULL, 'Payment approved for Invoice #{invoice_number}', '<p>Hello {tenant_company_name},</p><p>We have successfully received your payment for <strong>Invoice #{invoice_number}</strong></p><p><strong>Amount Paid:</strong> {invoice_total}</p><p><strong>Date:</strong> {invoice_paid_at}</p><p>Thank you for your business!</p><p>Best,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"invoice-group\\\",\\\"transaction-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(13, 'Transaction Created Reminder to Admin', 'transection-created-reminder-mail-to-admin', NULL, 'New transaction recorded for tenant {tenant_company_name}', '<p>Hello Admin,</p><p>A new transaction has been created for {tenant_company_name}.</p><p><strong>Status:</strong> {tenant_status}</p><p><strong>Amount:</strong> {transaction_amount}</p><p>Check the admin panel for more details.</p><p>Regards,</p><p>{company_name}</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"transaction-group\\\",\\\"user-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(14, 'Subscription Expired', 'subscription-expired', NULL, 'Your subscription has expired', '<p>Hi {tenant_company_name},</p><p>Your subscription to {plan_name} has expired as of {subscription_period_ends_at}.</p><p>Please renew your plan to continue enjoying our services without interruption.</p><p>Thanks,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"subscription-group\\\",\\\"plan-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(15, 'Subscription Cancelled', 'subscription-cancelled', NULL, 'Your subscription has been cancelled', '<p>Hello {tenant_company_name},</p><p>We\'re confirming that your subscription to {plan_name} was cancelled on {subscription_cancelled_at}.</p><p>If this was a mistake or you wish to rejoin, you can renew your subscription anytime.</p><p>Thank you,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"subscription-group\\\",\\\"plan-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(16, 'Payment Rejected Notification', 'payment-rejected', NULL, 'Payment for your invoice was rejected', '<p>Dear {company_name},</p><p>Unfortunately, your payment for <strong>Invoice #{invoice_number}</strong> has been rejected.</p><p>Please update your payment method or try again to avoid interruption of service.</p><p>Thank you,</p><p>{company_name} Team</p>', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"invoice-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(17, 'Email Confirmation', 'email-confirmation', NULL, 'Verify Your Email Address', '<p>Hello {first_name} {last_name},</p>\n                            <p>Thank you for signing up! Please verify your email address by clicking the button below:</p>\n                            <p><a href=\"{verification_url}\" class=\"button\">Verify Email Address</a></p>\n                            <p>If you did not create an account, no further action is required.</p>\n                            <p>Thanks,<br>{company_name} Team</p>', NULL, '\"[\\\"user-group\\\",\\\"other-group\\\"]\"', 1, 0, NULL, NULL, 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(18, 'Password Reset', 'password-reset', NULL, 'Reset Password Notification', '<p>Hello {first_name} {last_name},</p>\n                            <p>You are receiving this email because we received a password reset request for your account.</p>\n                            <p><a href=\"{reset_url}\" class=\"button\">Reset Password</a></p>\n                            <p>This password reset link will expire in 60 minutes.</p>\n                            <p>If you did not request a password reset, no further action is required.</p>\n                            <p>Regards,<br>{company_name} Team</p>', NULL, '\"[\\\"user-group\\\",\\\"other-group\\\"]\"', 1, 0, NULL, NULL, 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(19, 'Subscription renewal invoice email to tenant', 'subscription-renewal-invoice', NULL, 'Subscription renewal invoice', '<p>Hello {first_name} {last_name},</p>\n            <p>We’ve generated your renewal invoice for the <strong>{plan_name}</strong> subscription.</p>\n            <h2>Invoice Summary</h2>\n              <ul style=\"list-style: none; padding: 0;\">\n                <li><strong>Plan:</strong> {plan_name}</li>\n            </ul>\n            <p>If you have any questions or need help with the payment process, feel free to contact our support team.</p>\n\n            <p>Thank you for being a valued customer of {company_name}.</p>\n\n            <p style=\"margin-top: 40px;\">Best regards,<br>\n            The {company_name} Team</p>\n        </div>\n               ', NULL, '\"[\\\"tenant-group\\\",\\\"other-group\\\",\\\"subscription-group\\\",\\\"plan-group\\\",\\\"invoice-group\\\",\\\"user-group\\\"]\"', 1, 0, NULL, NULL, 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(20, 'New Ticket Created (Admin Notification)', 'ticket-created', NULL, 'New Support Ticket Created - {ticket_subject}', '<p>Hello Admin,</p>\n                    <p>A new support ticket has been created and requires your attention.</p>\n\n                    <div style=\"background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;\">\n                        <h3 style=\"margin-top: 0; color: #495057;\">Ticket Details</h3>\n                        <table style=\"width: 100%; border-collapse: collapse;\">\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Ticket ID:</td><td style=\"padding: 8px 0;\">{ticket_id}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Subject:</td><td style=\"padding: 8px 0;\">{ticket_subject}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Priority:</td><td style=\"padding: 8px 0;\">{ticket_priority}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Department:</td><td style=\"padding: 8px 0;\">{ticket_department}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Status:</td><td style=\"padding: 8px 0;\">{ticket_status}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Created:</td><td style=\"padding: 8px 0;\">{ticket_created_at}</td></tr>\n                        </table>\n                    </div>\n\n                    <div style=\"background-color: #e3f2fd; padding: 20px; border-radius: 8px; margin: 20px 0;\">\n                        <h3 style=\"margin-top: 0; color: #1976d2;\">Customer Information</h3>\n                        <p><strong>Company:</strong> {tenant_company_name}</p>\n                    </div>\n\n                    <div style=\"background-color: #fff3e0; padding: 20px; border-radius: 8px; margin: 20px 0;\">\n                        <h3 style=\"margin-top: 0; color: #f57c00;\">Ticket Description</h3>\n                        <div style=\"background-color: #ffffff; padding: 15px; border-left: 4px solid #ff9800; border-radius: 4px;\">\n                            {ticket_body}\n                        </div>\n                    </div>\n\n                    <p>Please review and assign this ticket at your earliest convenience.</p>\n\n                    <div style=\"text-align: center; margin: 30px 0;\">\n                        <a href=\"{admin_url}\" style=\"background-color: #007bff; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; display: inline-block;\">View Ticket in Admin Panel</a>\n                    </div>\n\n                    <p>Best regards,<br>{company_name} System</p>', NULL, '\"[\\\"ticket-group\\\",\\\"other-group\\\",\\\"tenant-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(21, 'Ticket Reply Notification (To Tenant)', 'ticket-reply-tenant', NULL, 'Support Ticket Reply - {ticket_subject}', '<p>Hello {tenant_company_name},</p>\n                    <p>You have received a new reply on your support ticket.</p>\n\n                    <div style=\"background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;\">\n                        <h3 style=\"margin-top: 0; color: #495057;\">Ticket Information</h3>\n                        <table style=\"width: 100%; border-collapse: collapse;\">\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Ticket ID:</td><td style=\"padding: 8px 0;\">{ticket_id}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Subject:</td><td style=\"padding: 8px 0;\">{ticket_subject}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Status:</td><td style=\"padding: 8px 0;\">{ticket_status}</td></tr>\n                        </table>\n                    </div>\n\n                    <p>You can view the full conversation and reply by clicking the link below:</p>\n\n                    <div style=\"text-align: center; margin: 30px 0;\">\n                        <a href=\"{ticket_url}\" style=\"background-color: #28a745; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; display: inline-block;\">View & Reply to Ticket</a>\n                    </div>\n\n                    <p>Best regards,<br>{company_name} Support Team</p>', NULL, '\"[\\\"ticket-group\\\",\\\"other-group\\\",\\\"tenant-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 02:43:00'),
(22, 'Ticket Reply Notification (To Admin)', 'ticket-reply-admin', NULL, 'New Reply on Ticket {ticket_id} - {ticket_subject}', '<p>Hello {assigned_user_name},</p>\n                    <p>A new reply has been added to ticket <strong>{ticket_id}</strong>.</p>\n\n                    <div style=\"background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;\">\n                        <h3 style=\"margin-top: 0; color: #495057;\">Ticket Details</h3>\n                        <table style=\"width: 100%; border-collapse: collapse;\">\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Ticket ID:</td><td style=\"padding: 8px 0;\">{ticket_id}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Subject:</td><td style=\"padding: 8px 0;\">{ticket_subject}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Priority:</td><td style=\"padding: 8px 0;\">{ticket_priority}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Status:</td><td style=\"padding: 8px 0;\">{ticket_status}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Customer:</td><td style=\"padding: 8px 0;\">{tenant_company_name}</td></tr>\n                        </table>\n                    </div>\n\n                    <div style=\"text-align: center; margin: 30px 0;\">\n                        <a href=\"{ticket_admin_url}\" style=\"background-color: #dc3545; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; display: inline-block;\">View Ticket in Admin Panel</a>\n                    </div>\n\n                    <p>Best regards,<br>{company_name} System</p>', NULL, '\"[\\\"ticket-group\\\",\\\"other-group\\\",\\\"tenant-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(23, 'Ticket Status Changed Notification', 'ticket-status-changed', NULL, 'Ticket Status Updated - {ticket_subject}', '<p>Hello {tenant_company_name},</p>\n                    <p>The status of your support ticket has been updated.</p>\n\n                    <div style=\"background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;\">\n                        <h3 style=\"margin-top: 0; color: #495057;\">Ticket Information</h3>\n                        <table style=\"width: 100%; border-collapse: collapse;\">\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Ticket ID:</td><td style=\"padding: 8px 0;\">{ticket_id}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Subject:</td><td style=\"padding: 8px 0;\">{ticket_subject}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Previous Status:</td><td style=\"padding: 8px 0;\">{previous_status}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">New Status:</td><td style=\"padding: 8px 0; color: #007bff;\"><strong>{new_status}</strong></td></tr>\n                        </table>\n                    </div>\n\n                    <div style=\"text-align: center; margin: 30px 0;\">\n                        <a href=\"{ticket_url}\" style=\"background-color: #17a2b8; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; display: inline-block;\">View Ticket Details</a>\n                    </div>\n\n                    <p>Best regards,<br>{company_name} Support Team</p>', NULL, '\"[\\\"ticket-group\\\",\\\"other-group\\\",\\\"tenant-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 02:43:00'),
(24, 'Ticket Status Changed Notification (Admin)', 'ticket-status-changed-admin', NULL, 'Ticket Status Updated by Tenant - {ticket_subject}', '<p>Hello Admin,</p>\n                    <p>A ticket status has been updated by the tenant.</p>\n\n                    <div style=\"background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;\">\n                        <h3 style=\"margin-top: 0; color: #495057;\">Ticket Information</h3>\n                        <table style=\"width: 100%; border-collapse: collapse;\">\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Ticket ID:</td><td style=\"padding: 8px 0;\">{ticket_id}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Subject:</td><td style=\"padding: 8px 0;\">{ticket_subject}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Customer:</td><td style=\"padding: 8px 0;\">{tenant_company_name}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Previous Status:</td><td style=\"padding: 8px 0;\">{previous_status}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">New Status:</td><td style=\"padding: 8px 0; color: #007bff;\"><strong>{new_status}</strong></td></tr>\n                        </table>\n                    </div>\n\n                    <div style=\"text-align: center; margin: 30px 0;\">\n                        <a href=\"{ticket_admin_url}\" style=\"background-color: #17a2b8; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; display: inline-block;\">View in Admin Panel</a>\n                    </div>\n\n                    <p>Best regards,<br>{company_name} System</p>', NULL, '\"[\\\"ticket-group\\\",\\\"other-group\\\",\\\"tenant-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(25, 'Ticket Assigned Notification', 'ticket-assigned', NULL, 'Ticket Assigned to You - {ticket_subject}', '<p>Hello {assigned_user_name},</p>\n                    <p>A support ticket has been assigned to you.</p>\n\n                    <div style=\"background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;\">\n                        <h3 style=\"margin-top: 0; color: #495057;\">Ticket Details</h3>\n                        <table style=\"width: 100%; border-collapse: collapse;\">\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Ticket ID:</td><td style=\"padding: 8px 0;\">{ticket_id}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Subject:</td><td style=\"padding: 8px 0;\">{ticket_subject}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Priority:</td><td style=\"padding: 8px 0;\">{ticket_priority}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Department:</td><td style=\"padding: 8px 0;\">{ticket_department}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Customer:</td><td style=\"padding: 8px 0;\">{tenant_company_name}</td></tr>\n                            <tr><td style=\"padding: 8px 0; font-weight: bold;\">Created:</td><td style=\"padding: 8px 0;\">{ticket_created_at}</td></tr>\n                        </table>\n                    </div>\n\n                    <div style=\"background-color: #e3f2fd; padding: 20px; border-radius: 8px; margin: 20px 0;\">\n                        <h3 style=\"margin-top: 0; color: #1976d2;\">Ticket Description</h3>\n                        <div style=\"background-color: #ffffff; padding: 15px; border-left: 4px solid #2196f3; border-radius: 4px;\">\n                            {ticket_body}\n                        </div>\n                    </div>\n\n                    <div style=\"text-align: center; margin: 30px 0;\">\n                        <a href=\"{ticket_admin_url}\" style=\"background-color: #6f42c1; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; display: inline-block;\">View & Respond to Ticket</a>\n                    </div>\n\n                    <p>Best regards,<br>{company_name} System</p>', NULL, '\"[\\\"ticket-group\\\",\\\"other-group\\\",\\\"tenant-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(26, 'Transaction Successful', 'transaction-success', NULL, 'Payment Confirmed - {transaction_amount} from {company_name}', '\n<div style=\"font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;\">\n    <div style=\"background: linear-gradient(135deg, #10b981 0%, #059669 100%); padding: 30px; border-radius: 10px 10px 0 0; text-align: center;\">\n        <h1 style=\"color: white; margin: 0; font-size: 28px;\">✅ Payment Successful!</h1>\n    </div>\n\n    <div style=\"background: #ffffff; padding: 30px; border: 1px solid #e5e7eb; border-top: none; border-radius: 0 0 10px 10px;\">\n        <p style=\"font-size: 16px; line-height: 1.6; margin: 0 0 20px;\">Hello <strong>{first_name} {last_name}</strong>,</p>\n\n        <p style=\"font-size: 16px; line-height: 1.6; margin: 0 0 25px;\">Great news! Your payment has been successfully processed. Here are the details:</p>\n\n        <div style=\"background: #f9fafb; padding: 20px; border-radius: 8px; margin: 25px 0;\">\n            <table style=\"width: 100%; border-collapse: collapse;\">\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Transaction ID:</td>\n                    <td style=\"padding: 8px 0; text-align: right; font-family: monospace;\">{transaction_id}</td>\n                </tr>\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Amount:</td>\n                    <td style=\"padding: 8px 0; text-align: right; color: #10b981; font-size: 18px; font-weight: bold;\">{transaction_amount}</td>\n                </tr>\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Payment Method:</td>\n                    <td style=\"padding: 8px 0; text-align: right;\">{transaction_type}</td>\n                </tr>\n                <tr style=\"border-top: 2px solid #e5e7eb;\">\n                    <td style=\"padding: 12px 0 8px; font-weight: bold;\">Description:</td>\n                    <td style=\"padding: 12px 0 8px; text-align: right;\">{transaction_description}</td>\n                </tr>\n            </table>\n        </div>\n\n                    <p>Thank you for choosing {company_name}.</p>\n                    <p>Best regards,<br>{company_name} Support Team</p>\n    </div>\n</div>', NULL, '\"[\\\"transaction-group\\\",\\\"user-group\\\",\\\"other-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(27, 'Transaction Pending', 'transaction-pending', NULL, 'Payment Pending - Action Required for {transaction_amount} - {company_name}', '\n<div style=\"font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;\">\n    <div style=\"background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); padding: 30px; border-radius: 10px 10px 0 0; text-align: center;\">\n        <h1 style=\"color: white; margin: 0; font-size: 28px;\">⏳ Payment Pending</h1>\n    </div>\n\n    <div style=\"background: #ffffff; padding: 30px; border: 1px solid #e5e7eb; border-top: none; border-radius: 0 0 10px 10px;\">\n        <p style=\"font-size: 16px; line-height: 1.6; margin: 0 0 20px;\">Hello <strong>{first_name} {last_name}</strong>,</p>\n\n        <p style=\"font-size: 16px; line-height: 1.6; margin: 0 0 25px;\">Your payment is currently being processed. Additional verification may be required to complete this transaction.</p>\n\n        <div style=\"background: #fef3c7; padding: 20px; border-radius: 8px; margin: 25px 0; border-left: 4px solid #f59e0b;\">\n            <p style=\"margin: 0; font-weight: bold; color: #92400e;\">⚠️ Action May Be Required</p>\n            <p style=\"margin: 10px 0 0; color: #92400e;\">Some payments require additional authentication (like 3D Secure) or take time to process depending on your bank or payment method.</p>\n        </div>\n\n        <div style=\"background: #f9fafb; padding: 20px; border-radius: 8px; margin: 25px 0;\">\n            <table style=\"width: 100%; border-collapse: collapse;\">\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Transaction ID:</td>\n                    <td style=\"padding: 8px 0; text-align: right; font-family: monospace;\">{transaction_id}</td>\n                </tr>\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Amount:</td>\n                    <td style=\"padding: 8px 0; text-align: right; color: #f59e0b; font-size: 18px; font-weight: bold;\">{transaction_amount}</td>\n                </tr>\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Payment Method:</td>\n                    <td style=\"padding: 8px 0; text-align: right;\">{transaction_type}</td>\n                </tr>\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Status:</td>\n                    <td style=\"padding: 8px 0; text-align: right; color: #f59e0b; font-weight: bold;\">Pending</td>\n                </tr>\n                <tr style=\"border-top: 2px solid #e5e7eb;\">\n                    <td style=\"padding: 12px 0 8px; font-weight: bold;\">Description:</td>\n                    <td style=\"padding: 12px 0 8px; text-align: right;\">{transaction_description}</td>\n                </tr>\n            </table>\n        </div>\n\n        <div style=\"background: #eff6ff; padding: 20px; border-radius: 8px; margin: 25px 0;\">\n            <h3 style=\"margin: 0 0 15px; color: #1e40af;\">What happens next?</h3>\n            <ul style=\"margin: 0; padding-left: 20px; color: #1e40af;\">\n                <li>We will send you an update once the payment is processed</li>\n                <li>Most pending payments are resolved within 24 hours</li>\n                <li>You may receive additional verification requests from your bank</li>\n                <li>Check your email and banking app for any notifications</li>\n            </ul>\n        </div>\n\n        <p style=\"font-size: 16px; line-height: 1.6; margin: 25px 0 0;\">Thank you for your patience,</p>\n        <p style=\"font-size: 16px; line-height: 1.6; margin: 5px 0 0;\"><strong>{company_name} Team</strong></p>\n    </div>\n</div>', NULL, '\"[\\\"transaction-group\\\",\\\"user-group\\\",\\\"other-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(28, 'Transaction Failed', 'transaction-failed', NULL, 'Payment Failed - {transaction_amount} - {company_name}', '\n<div style=\"font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;\">\n    <div style=\"background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); padding: 30px; border-radius: 10px 10px 0 0; text-align: center;\">\n        <h1 style=\"color: white; margin: 0; font-size: 28px;\">❌ Payment Failed</h1>\n    </div>\n\n    <div style=\"background: #ffffff; padding: 30px; border: 1px solid #e5e7eb; border-top: none; border-radius: 0 0 10px 10px;\">\n        <p style=\"font-size: 16px; line-height: 1.6; margin: 0 0 20px;\">Hello <strong>{first_name} {last_name}</strong>,</p>\n\n        <p style=\"font-size: 16px; line-height: 1.6; margin: 0 0 25px;\">Unfortunately, we were unable to process your payment. Please try again.</p>\n\n        <div style=\"background: #f9fafb; padding: 20px; border-radius: 8px; margin: 25px 0;\">\n            <table style=\"width: 100%; border-collapse: collapse;\">\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Transaction ID:</td>\n                    <td style=\"padding: 8px 0; text-align: right; font-family: monospace;\">{transaction_id}</td>\n                </tr>\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Amount:</td>\n                    <td style=\"padding: 8px 0; text-align: right; color: #ef4444; font-size: 18px; font-weight: bold;\">{transaction_amount}</td>\n                </tr>\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Payment Method:</td>\n                    <td style=\"padding: 8px 0; text-align: right;\">{transaction_type}</td>\n                </tr>\n                <tr>\n                    <td style=\"padding: 8px 0; font-weight: bold;\">Status:</td>\n                    <td style=\"padding: 8px 0; text-align: right; color: #ef4444; font-weight: bold;\">Failed</td>\n                </tr>\n                <tr style=\"border-top: 2px solid #e5e7eb;\">\n                    <td style=\"padding: 12px 0 8px; font-weight: bold;\">Description:</td>\n                    <td style=\"padding: 12px 0 8px; text-align: right;\">{transaction_description}</td>\n                </tr>\n            </table>\n        </div>\n\n        <div style=\"background: #f0f9ff; padding: 20px; border-radius: 8px; margin: 25px 0;\">\n            <h3 style=\"margin: 0 0 15px; color: #0369a1;\">💡 How to resolve this:</h3>\n            <ul style=\"margin: 0; padding-left: 20px; color: #0369a1;\">\n                <li><strong>Check your card details:</strong> Ensure card number, expiry date, and CVV are correct</li>\n                <li><strong>Verify billing address:</strong> Make sure your billing address matches your card</li>\n                <li><strong>Check your account balance:</strong> Ensure you have sufficient funds available</li>\n                <li><strong>Contact your bank:</strong> Your card issuer may have declined the transaction</li>\n                <li><strong>Try a different payment method:</strong> Use another card or payment option</li>\n            </ul>\n        </div>\n\n        <p style=\"font-size: 16px; line-height: 1.6; margin: 5px 0 0;\"><strong>{company_name} Team</strong></p>\n    </div>\n</div>', NULL, '\"[\\\"transaction-group\\\",\\\"user-group\\\",\\\"other-group\\\"]\"', 1, 0, NULL, 'admin', 1, 1, NULL, NULL, '2025-09-18 10:41:44', '2025-09-18 10:41:44');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `faqs`
--

CREATE TABLE `faqs` (
  `id` bigint UNSIGNED NOT NULL,
  `question` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `answer` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_visible` tinyint(1) DEFAULT '1',
  `sort_order` int NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `faqs`
--

INSERT INTO `faqs` (`id`, `question`, `answer`, `is_visible`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'How do I upgrade my subscription plan?', 'You can upgrade your plan from your billing dashboard. Navigate to Subscriptions > Upgrade and select your desired higher-tier plan. The upgrade will be prorated, meaning you\'ll only pay the difference for the remaining billing period. Payment is required immediately to activate the upgrade.', 1, 1, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(2, 'How do I downgrade my subscription plan?', 'To downgrade, go to Subscriptions > Downgrade and choose a lower-tier plan. Downgrades are processed immediately, and any credit from the price difference will be applied to your account for future billing cycles.', 1, 2, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(3, 'How does the billing cycle work?', 'Your billing cycle depends on your plan\'s billing period (monthly or yearly). The cycle starts from your subscription activation date and renews automatically unless you\'ve disabled auto-renewal. You can view your next billing date in your subscription dashboard.', 1, 3, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(4, 'When will I be charged for renewals?', 'Auto-billing occurs 1 day after your current period ends. For example, if your subscription expires on January 15th, auto-billing will attempt on January 16th. This grace period ensures uninterrupted service.', 1, 4, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(5, 'What happens if my payment fails?', 'If auto-billing fails, you\'ll receive notifications and have a grace period to update your payment method. Failed payments are logged in your transaction history, and you can manually retry payment from your billing dashboard.', 1, 5, '2025-09-27 00:35:14', '2025-09-27 00:35:14');

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

--
-- Table structure for table `features`
--

CREATE TABLE `features` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `type` enum('limit','boolean') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'boolean',
  `icon` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `display_order` int NOT NULL DEFAULT '0',
  `default` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `features`
--

INSERT INTO `features` (`id`, `name`, `slug`, `description`, `type`, `icon`, `display_order`, `default`, `created_at`, `updated_at`) VALUES
(1, 'Contacts ', 'contacts', 'Number of contacts allowed', 'limit', NULL, 10, 1, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(2, 'Template Bots ', 'template_bots', 'Number of template bots allowed', 'limit', NULL, 20, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(3, 'Message Bots ', 'message_bots', 'Number of message bots allowed', 'limit', NULL, 30, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(4, 'Campaigns ', 'campaigns', 'Number of campaigns allowed', 'limit', NULL, 40, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(5, 'AI Prompts ', 'ai_prompts', 'Number of ai prompts allowed', 'limit', NULL, 50, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(6, 'Canned Replies ', 'canned_replies', 'Number of canned replies allowed', 'limit', NULL, 60, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(7, 'Staff ', 'staff', 'Number of staffs allowed', 'limit', NULL, 70, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(8, 'Conversation ', 'conversations', 'Number of conversation allowed', 'limit', NULL, 80, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(9, 'Bot Flow ', 'bot_flow', 'Number of bot flows allowed', 'limit', NULL, 90, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(10, 'Enable Api ', 'enable_api', 'Enable(-1) or Disable(0) Api', 'limit', NULL, 100, 0, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(11, 'Embedded SignUp', 'emb_signup', 'Allow users to sign up via Embedded SignUp', 'limit', NULL, 10, 0, '2025-09-22 01:07:11', '2025-09-22 01:07:11');

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

--
-- Table structure for table `feature_limits`
--

CREATE TABLE `feature_limits` (
  `id` bigint UNSIGNED NOT NULL,
  `plan_id` bigint UNSIGNED NOT NULL,
  `feature_id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `custom_limit` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `reason` text COLLATE utf8mb4_general_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `feature_usages`
--

CREATE TABLE `feature_usages` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `subscription_id` bigint UNSIGNED NOT NULL,
  `feature_slug` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `limit_value` int NOT NULL DEFAULT '-1',
  `used` int NOT NULL DEFAULT '0',
  `reset_date` timestamp NULL DEFAULT NULL,
  `period_start` timestamp NULL DEFAULT NULL,
  `last_reset_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `feature_usages`
--

INSERT INTO `feature_usages` (`id`, `tenant_id`, `subscription_id`, `feature_slug`, `limit_value`, `used`, `reset_date`, `period_start`, `last_reset_at`, `created_at`, `updated_at`) VALUES
(1, 2, 2, 'bot_flow', 50, 1, NULL, '2025-09-21 22:59:58', NULL, '2025-09-21 22:59:58', '2025-09-23 01:02:09'),
(2, 2, 2, 'canned_replies', 0, 0, NULL, '2025-09-22 23:46:59', NULL, '2025-09-22 23:46:59', '2025-09-22 23:46:59'),
(3, 2, 2, 'ai_prompts', 0, 0, NULL, '2025-09-22 23:46:59', NULL, '2025-09-22 23:46:59', '2025-09-22 23:46:59'),
(4, 2, 2, 'contacts', 5000, 7, NULL, '2025-09-22 23:46:59', NULL, '2025-09-22 23:46:59', '2025-09-25 20:59:01'),
(5, 2, 2, 'campaigns', 50, 0, NULL, '2025-09-22 23:46:59', NULL, '2025-09-22 23:46:59', '2025-09-22 23:46:59'),
(6, 2, 2, 'message_bots', 50, 0, NULL, '2025-09-22 23:46:59', NULL, '2025-09-22 23:46:59', '2025-09-22 23:46:59'),
(7, 2, 2, 'template_bots', 50, 0, NULL, '2025-09-22 23:46:59', NULL, '2025-09-22 23:46:59', '2025-09-22 23:46:59'),
(8, 2, 2, 'staff', 2, 1, NULL, '2025-09-22 23:46:59', NULL, '2025-09-22 23:46:59', '2025-09-24 03:52:51'),
(9, 2, 2, 'conversation', 0, 0, NULL, '2025-09-22 23:46:59', NULL, '2025-09-22 23:46:59', '2025-09-22 23:46:59'),
(11, 2, 2, 'conversations', -1, 24, NULL, '2025-09-23 22:26:08', NULL, '2025-09-23 22:26:08', '2025-09-24 03:52:51');

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

--
-- Table structure for table `groups`
--

CREATE TABLE `groups` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `gs_chats`
--

CREATE TABLE `gs_chats` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `receiver_id` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_message` text COLLATE utf8mb4_unicode_ci,
  `last_msg_time` datetime DEFAULT NULL,
  `wa_no` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wa_no_id` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `time_sent` datetime NOT NULL,
  `type` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type_id` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `agent` text COLLATE utf8mb4_unicode_ci,
  `is_ai_chat` tinyint(1) NOT NULL DEFAULT '0',
  `ai_message_json` text COLLATE utf8mb4_unicode_ci,
  `is_bots_stoped` tinyint(1) DEFAULT NULL,
  `bot_stoped_time` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `gs_chats`
--

INSERT INTO `gs_chats` (`id`, `tenant_id`, `name`, `receiver_id`, `last_message`, `last_msg_time`, `wa_no`, `wa_no_id`, `time_sent`, `type`, `type_id`, `agent`, `is_ai_chat`, `ai_message_json`, `is_bots_stoped`, `bot_stoped_time`, `created_at`, `updated_at`) VALUES
(2, 1, 'Anuar Ismail', '60103876889', 'hi,how can i help you', '2025-09-25 10:12:39', '60108316285', '712333781972704', '2025-09-25 10:13:03', 'guest', '', '{\"assign_id\":0,\"agents_id\":\"\"}', 0, NULL, NULL, NULL, '2025-09-24 00:08:49', '2025-09-25 02:13:03');

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

--
-- Table structure for table `gs_chat_messages`
--

CREATE TABLE `gs_chat_messages` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `interaction_id` int UNSIGNED NOT NULL,
  `sender_id` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `message` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status_message` text COLLATE utf8mb4_unicode_ci,
  `time_sent` datetime NOT NULL,
  `message_id` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `staff_id` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT '0',
  `ref_message_id` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `gs_chat_messages`
--

INSERT INTO `gs_chat_messages` (`id`, `tenant_id`, `interaction_id`, `sender_id`, `url`, `message`, `status`, `status_message`, `time_sent`, `message_id`, `staff_id`, `type`, `is_read`, `ref_message_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, '60103876889', '', 'Hi ok', 'sent', NULL, '2025-09-23 08:23:37', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQTVFNTVGRUEyQTkyRjlDMTUyOQA=', NULL, 'text', 1, '', '2025-09-23 00:23:37', '2025-09-24 00:04:29'),
(2, 1, 1, '60108316285', NULL, 'Thank you for message', 'delivered', NULL, '2025-09-23 08:25:42', 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBIyNzI3QzdENEVGOTUxMkFCNUUA', '2', 'text', 1, '', '2025-09-23 00:25:42', '2025-09-24 00:04:29'),
(3, 1, 2, '60103876889', '', 'hi, is this available?', 'sent', NULL, '2025-09-24 08:08:49', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQkEzQTA4QzFDRDdBQTUwMzVEOQA=', NULL, 'text', 1, '', '2025-09-24 00:08:49', '2025-09-28 03:52:14'),
(4, 1, 2, '60108316285', NULL, 'yes, how can i help you?', 'delivered', NULL, '2025-09-24 08:09:00', 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBI1NTg3QzJFQTVFMzI0QjY3MDUA', '2', 'text', 1, '', '2025-09-24 00:09:00', '2025-09-28 03:52:14'),
(5, 1, 2, '60108316285', NULL, 'hello. thank you', 'delivered', NULL, '2025-09-24 08:37:02', 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBIyODkwM0NBRUNBREU3NkU1M0EA', '2', 'text', 1, '', '2025-09-24 00:37:02', '2025-09-28 03:52:14'),
(6, 1, 2, '60103876889', '', 'you welcome.', 'sent', NULL, '2025-09-24 08:37:11', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQjM2RTg2M0YzNDY3NTEyM0I3RAA=', NULL, 'text', 1, '', '2025-09-24 00:37:11', '2025-09-28 03:52:14'),
(7, 1, 2, '60103876889', '', '😃', 'sent', NULL, '2025-09-24 08:37:18', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQjY2OUVBNDJFNTY5NEQ5Mzk2NwA=', NULL, 'text', 1, '', '2025-09-24 00:37:18', '2025-09-28 03:52:14'),
(8, 1, 2, '60108316285', NULL, '👍👍', 'delivered', NULL, '2025-09-24 08:37:23', 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBI1NjIyN0JCNjBCNUZDNzREOTYA', '2', 'text', 1, '', '2025-09-24 00:37:23', '2025-09-28 03:52:14'),
(9, 1, 2, '60103876889', '', 'Hi', 'sent', NULL, '2025-09-25 10:12:39', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQTBGMzUxMjMzMDc2RDMwQjU1QQA=', NULL, 'text', 1, '', '2025-09-25 02:12:39', '2025-09-28 03:52:14'),
(10, 1, 2, '60108316285', NULL, 'hi,how can i help you', 'delivered', NULL, '2025-09-25 10:13:03', 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBI3NjNCODk4REM4QTVDMjE1ODcA', '2', 'text', 1, '', '2025-09-25 02:13:03', '2025-09-28 03:52:14');

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

--
-- Table structure for table `gs_contacts`
--

CREATE TABLE `gs_contacts` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `firstname` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lastname` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` enum('lead','customer') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'lead',
  `description` text COLLATE utf8mb4_unicode_ci,
  `country_id` int DEFAULT NULL,
  `zip` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8mb4_unicode_ci,
  `assigned_id` bigint UNSIGNED DEFAULT NULL,
  `status_id` bigint UNSIGNED NOT NULL,
  `source_id` bigint UNSIGNED NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `website` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_enabled` tinyint(1) NOT NULL DEFAULT '1',
  `addedfrom` int DEFAULT NULL,
  `custom_fields_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `dateassigned` datetime DEFAULT NULL,
  `last_status_change` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `group_id` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
) ;

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

--
-- Table structure for table `gs_contact_notes`
--

CREATE TABLE `gs_contact_notes` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `contact_id` bigint UNSIGNED NOT NULL,
  `notes_description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `invoices` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `subscription_id` bigint UNSIGNED DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `status` enum('new','paid','cancelled') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'new',
  `title` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `description` text COLLATE utf8mb4_general_ci,
  `metadata` text COLLATE utf8mb4_general_ci,
  `currency_id` bigint UNSIGNED NOT NULL,
  `total_tax_amount` decimal(12,2) NOT NULL DEFAULT '0.00',
  `fee` decimal(13,2) NOT NULL DEFAULT '0.00',
  `invoice_number` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `due_date` timestamp NULL DEFAULT NULL,
  `paid_at` timestamp NULL DEFAULT NULL,
  `cancelled_at` timestamp NULL DEFAULT NULL,
  `no_payment_required_when_free` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `invoices` (`id`, `tenant_id`, `subscription_id`, `type`, `status`, `title`, `description`, `metadata`, `currency_id`, `total_tax_amount`, `fee`, `invoice_number`, `due_date`, `paid_at`, `cancelled_at`, `no_payment_required_when_free`, `created_at`, `updated_at`) VALUES
(3, 2, 2, 'new_subscription', 'paid', 'New Subscription', 'Subscription to Pro plan until October 23, 2025', NULL, 2, 0.00, 0.00, 'INV202509-000003', NULL, '2025-09-22 23:47:48', NULL, 0, '2025-09-22 23:46:59', '2025-09-22 23:47:48'),
(15, 1, 8, 'new_subscription', 'paid', 'New Subscription', 'Subscription to Pro plan until October 28, 2025', NULL, 2, 0.00, 0.00, 'INV202509-000004', NULL, '2025-09-28 03:50:56', NULL, 0, '2025-09-28 03:50:28', '2025-09-28 03:50:56');

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

--
-- Table structure for table `invoice_items`
--

CREATE TABLE `invoice_items` (
  `id` bigint UNSIGNED NOT NULL,
  `invoice_id` bigint UNSIGNED NOT NULL,
  `item_id` bigint UNSIGNED DEFAULT NULL,
  `item_type` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `description` text COLLATE utf8mb4_general_ci,
  `amount` decimal(13,2) NOT NULL,
  `quantity` int NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `invoice_items`
--

INSERT INTO `invoice_items` (`id`, `invoice_id`, `item_id`, `item_type`, `title`, `description`, `amount`, `quantity`, `created_at`, `updated_at`) VALUES
(3, 3, NULL, NULL, 'Pro', 'Subscription to Pro plan', 39.00, 1, '2025-09-22 23:46:59', '2025-09-22 23:46:59'),
(17, 15, NULL, NULL, 'Pro', 'Subscription to Pro plan', 1.00, 1, '2025-09-28 03:50:28', '2025-09-28 03:50:28');

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

--
-- Table structure for table `invoice_taxes`
--

CREATE TABLE `invoice_taxes` (
  `id` bigint UNSIGNED NOT NULL,
  `invoice_id` bigint UNSIGNED NOT NULL,
  `tax_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `rate` decimal(8,2) NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint UNSIGNED NOT NULL,
  `reserved_at` int UNSIGNED DEFAULT NULL,
  `available_at` int UNSIGNED NOT NULL,
  `created_at` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `languages`
--

CREATE TABLE `languages` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `languages`
--

INSERT INTO `languages` (`id`, `tenant_id`, `name`, `code`, `status`, `created_at`, `updated_at`) VALUES
(1, NULL, 'English', 'en', 1, '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(3, 1, 'English', 'en', 1, '2025-09-18 03:24:57', '2025-09-18 03:24:57'),
(4, 2, 'English', 'en', 1, '2025-09-21 22:30:43', '2025-09-21 22:30:43'),
(5, NULL, 'Portuguese', 'br', 1, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(6, 1, 'Portuguese', 'br', 1, '2025-09-27 00:35:14', '2025-09-27 00:35:14'),
(7, 2, 'Portuguese', 'br', 1, '2025-09-27 00:35:14', '2025-09-27 00:35:14');

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

--
-- Table structure for table `mamadil_chats`
--

CREATE TABLE `mamadil_chats` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `receiver_id` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_message` text COLLATE utf8mb4_unicode_ci,
  `last_msg_time` datetime DEFAULT NULL,
  `wa_no` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wa_no_id` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `time_sent` datetime NOT NULL,
  `type` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type_id` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `agent` text COLLATE utf8mb4_unicode_ci,
  `is_ai_chat` tinyint(1) NOT NULL DEFAULT '0',
  `ai_message_json` text COLLATE utf8mb4_unicode_ci,
  `is_bots_stoped` tinyint(1) DEFAULT NULL,
  `bot_stoped_time` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `mamadil_chats`
--

INSERT INTO `mamadil_chats` (`id`, `tenant_id`, `name`, `receiver_id`, `last_message`, `last_msg_time`, `wa_no`, `wa_no_id`, `time_sent`, `type`, `type_id`, `agent`, `is_ai_chat`, `ai_message_json`, `is_bots_stoped`, `bot_stoped_time`, `created_at`, `updated_at`) VALUES
(1, 2, 'Anuar Ismail', '60103876889', 'Anda akan dihubungkan dengan Admin Nadia [CTA Button]', '2025-09-23 09:22:01', '6096666685', '751107238093922', '2025-09-23 09:22:00', 'lead', '1', '{\"assign_id\": 3, \"agents_id\": \"\"}', 0, NULL, NULL, NULL, '2025-09-23 00:44:19', '2025-09-26 23:42:03'),
(2, 2, 'Nor Asiah Razak', '601116825770', 'Hi Saya Dari Mamadil, untuk sebarang pembelian puan boleh hubungi admin kami seperti yang tertera\r\n\r\nAdmin Mamadil HQ\r\n\r\n📲 ADMIN IRA:\r\nwww.wasap.my/60165116985\r\n📲 ADMIN Naddy:\r\nhttp://wasap.my/60125014085\r\n📲 ADMIN Yasmin:\r\nwww.wasap.my/60129040085', '2025-09-23 23:32:07', '6096666685', '751107238093922', '2025-09-24 06:26:52', 'lead', '2', '{\"assign_id\": 3, \"agents_id\": \"\"}', 0, NULL, NULL, NULL, '2025-09-23 15:32:07', '2025-09-26 23:42:03'),
(3, 2, 'Rabieatul Adawiah', '60133180339', 'Ok terima kasih', '2025-09-24 06:26:36', '6096666685', '751107238093922', '2025-09-24 06:26:36', 'lead', '3', '{\"assign_id\": 3, \"agents_id\": \"\"}', 0, NULL, NULL, NULL, '2025-09-23 19:22:40', '2025-09-26 23:42:03'),
(4, 2, 'Noor', '601110752982', 'maaf puan. nombor lama yaya whatsapp disable, ini no baharu dia. https://wa.me/message/VKRGV52ILTNQO1', '2025-09-24 09:14:18', '6096666685', '751107238093922', '2025-09-24 11:50:27', 'lead', '4', '{\"assign_id\": 3, \"agents_id\": \"\"}', 0, NULL, NULL, NULL, '2025-09-24 01:07:51', '2025-09-26 23:42:03'),
(5, 2, 'rohanabajuri1@gmail.com', '60195647566', 'Hi Saya Dari Mamadil, untuk sebarang pembelian puan boleh hubungi admin kami seperti yang tertera\r\n\r\nAdmin Mamadil HQ\r\n\r\n📲 ADMIN IRA:\r\nwww.wasap.my/60165116985\r\n📲 ADMIN Naddy:\r\nhttp://wasap.my/60125014085\r\n📲 ADMIN Yasmin:\r\nwww.wasap.my/60129040085', '2025-09-25 03:03:30', '6096666685', '751107238093922', '2025-09-25 05:35:54', 'lead', '5', '{\"assign_id\": 3, \"agents_id\": \"\"}', 0, NULL, NULL, NULL, '2025-09-24 19:03:12', '2025-09-26 23:42:03'),
(6, 2, '.', '60183284618', 'Hi Saya Dari Mamadil, untuk sebarang pembelian puan boleh hubungi admin kami seperti yang tertera\r\n\r\nAdmin Mamadil HQ\r\n\r\n📲 ADMIN IRA:\r\nwww.wasap.my/60165116985\r\n📲 ADMIN Naddy:\r\nhttp://wasap.my/60125014085\r\n📲 ADMIN Yasmin:\r\nwww.wasap.my/60129040085', '2025-09-25 08:34:40', '6096666685', '751107238093922', '2025-09-25 09:30:48', 'lead', '6', '{\"assign_id\": 3, \"agents_id\": \"\"}', 0, NULL, NULL, NULL, '2025-09-25 00:34:35', '2025-09-26 23:42:03'),
(7, 2, 'Huda Basha', '60134636381', 'document', '2025-09-26 04:59:34', '6096666685', '751107238093922', '2025-09-26 04:59:34', 'lead', '7', '{\"assign_id\": 3, \"agents_id\": \"\"}', 0, NULL, NULL, NULL, '2025-09-25 20:59:01', '2025-09-26 23:42:03');

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

--
-- Table structure for table `mamadil_chat_messages`
--

CREATE TABLE `mamadil_chat_messages` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `interaction_id` int UNSIGNED NOT NULL,
  `sender_id` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `message` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status_message` text COLLATE utf8mb4_unicode_ci,
  `time_sent` datetime NOT NULL,
  `message_id` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `staff_id` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT '0',
  `ref_message_id` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `mamadil_chat_messages`
--

INSERT INTO `mamadil_chat_messages` (`id`, `tenant_id`, `interaction_id`, `sender_id`, `url`, `message`, `status`, `status_message`, `time_sent`, `message_id`, `staff_id`, `type`, `is_read`, `ref_message_id`, `created_at`, `updated_at`) VALUES
(1, 2, 1, '60103876889', '', 'test 1 2 r', 'sent', NULL, '2025-09-23 08:44:19', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQjEyMTlCQ0EzNjIxRTk4M0IzRQA=', NULL, 'text', 1, '', '2025-09-23 00:44:19', '2025-09-25 11:59:42'),
(2, 2, 1, '60103876889', '', 'Testing 1,2,3 default message', 'sent', NULL, '2025-09-23 09:09:28', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQUFBMEFDNTk4NkE3NzlGM0IwOAA=', NULL, 'text', 1, '', '2025-09-23 01:09:28', '2025-09-25 11:59:42'),
(3, 2, 1, '60103876889', '', 'testing default message', 'sent', NULL, '2025-09-23 09:12:54', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQjZEOTFBQ0IzQzgzMkM3QjZCRAA=', NULL, 'text', 1, '', '2025-09-23 01:12:54', '2025-09-25 11:59:42'),
(4, 2, 1, '60103876889', '', 'help', 'sent', NULL, '2025-09-23 09:12:58', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQjU2NzZBRUMyQ0Q2RTg5MjY4MwA=', NULL, 'text', 1, '', '2025-09-23 01:12:58', '2025-09-25 11:59:42'),
(5, 2, 1, '6096666685', NULL, '<p>Sila hubungi khidmat pelanggan kami dengan klik butang dibawah</p><span class=\'text-gray-500 dark:text-gray-400 text-xs mb-2\'>Tekan STOP untuk tidak menerima mesej dari kami.</span><br><div class=\'mt-2\'><a href=\'https://csnadia.mamadil.app\' target=\'_blank\' class=\'bg-primary-600 hover:bg-primary-700 text-white px-3 py-1.5 rounded-md inline-block text-xs font-medium transition\'>Admin Nadia</a></div>', 'delivered', NULL, '2025-09-23 09:13:00', 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBJBRTY0RDEyMjVFMzYzQ0ZBMEMA', '0', 'interactive', 1, NULL, NULL, '2025-09-25 11:59:42'),
(6, 2, 1, '60103876889', '', 'help', 'sent', NULL, '2025-09-23 09:21:04', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQkI3OUVGQzI2MDJFQUQwMTkyMgA=', NULL, 'text', 1, '', '2025-09-23 01:21:04', '2025-09-25 11:59:42'),
(7, 2, 1, '6096666685', NULL, '<p>Sila tekan butang dibawah jika ingin bercakap dengan khidmat pelanggan kami.</p><div class=\'flex flex-col mt-2 space-y-2\'><button class=\'bg-gray-100 text-success-500 px-3 py-2 rounded-lg flex items-center justify-center text-xs space-x-2 w-full dark:bg-gray-800 dark:text-success-400\'>Admin Nadia</button><button class=\'bg-gray-100 text-success-500 px-3 py-2 rounded-lg flex items-center justify-center text-xs space-x-2 w-full dark:bg-gray-800 dark:text-success-400\'>Admin Ira</button><button class=\'bg-gray-100 text-success-500 px-3 py-2 rounded-lg flex items-center justify-center text-xs space-x-2 w-full dark:bg-gray-800 dark:text-success-400\'>Admin Meen</button></div>', 'delivered', NULL, '2025-09-23 09:21:05', 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBI1QTAxNkYxNDg0RkMwQjNFM0UA', '0', 'interactive', 1, NULL, NULL, '2025-09-25 11:59:42'),
(8, 2, 1, '60103876889', '', 'Admin Ira', 'sent', NULL, '2025-09-23 09:21:48', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQkZGNTFFM0MxRjJEQzBFMUQyNAA=', NULL, 'interactive', 1, 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBI1QTAxNkYxNDg0RkMwQjNFM0UA', '2025-09-23 01:21:48', '2025-09-25 11:59:42'),
(9, 2, 1, '6096666685', NULL, '<p>Anda akan dihubungkan dengan Admin Ira</p><div class=\'mt-2\'><a href=\'https://cssyahirah.mamadil.app\' target=\'_blank\' class=\'bg-primary-600 hover:bg-primary-700 text-white px-3 py-1.5 rounded-md inline-block text-xs font-medium transition\'>Admin Ira</a></div>', 'delivered', NULL, '2025-09-23 09:21:49', 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBIzNEVCMzRDMDA4RDM2QzA3NjEA', '0', 'interactive', 1, NULL, NULL, '2025-09-25 11:59:42'),
(10, 2, 1, '60103876889', '', 'Admin Nadia', 'sent', NULL, '2025-09-23 09:22:00', 'wamid.HBgLNjAxMDM4NzY4ODkVAgASGBQzQjk0N0ExMjE5QzE4OTZDRTc4QwA=', NULL, 'interactive', 1, 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBI1QTAxNkYxNDg0RkMwQjNFM0UA', '2025-09-23 01:22:00', '2025-09-25 11:59:42'),
(11, 2, 1, '6096666685', NULL, '<p>Anda akan dihubungkan dengan Admin Nadia</p><div class=\'mt-2\'><a href=\'https://csnadia.mamadil.app\' target=\'_blank\' class=\'bg-primary-600 hover:bg-primary-700 text-white px-3 py-1.5 rounded-md inline-block text-xs font-medium transition\'>Admin Nadia</a></div>', 'delivered', NULL, '2025-09-23 09:22:01', 'wamid.HBgLNjAxMDM4NzY4ODkVAgARGBJBRUIwOTM5RUE3M0U1N0FCOUUA', '0', 'interactive', 1, NULL, NULL, '2025-09-25 11:59:42'),
(12, 2, 2, '601116825770', '', 'Nk beli mamadil', 'sent', NULL, '2025-09-23 23:32:07', 'wamid.HBgMNjAxMTE2ODI1NzcwFQIAEhgUMkExMjBDQzkzNzlDOUYyNkMzRTYA', NULL, 'text', 1, '', '2025-09-23 15:32:07', '2025-09-24 23:48:59'),
(13, 2, 3, '60133180339', '', 'Salam', 'sent', NULL, '2025-09-24 03:22:40', 'wamid.HBgLNjAxMzMxODAzMzkVAgASGCBBNTYzOTk2QkFEM0I2QzZCNjU0QUE1NjI5NUQ5RjRCRAA=', NULL, 'text', 1, '', '2025-09-23 19:22:40', '2025-09-24 23:48:59'),
(14, 2, 3, '60133180339', '', 'Sy nk order women love', 'sent', NULL, '2025-09-24 03:23:03', 'wamid.HBgLNjAxMzMxODAzMzkVAgASGCBBNTMzODUwREUxN0M4RTQyQjg4NzkwMzkzOUUyRTEzOQA=', NULL, 'text', 1, '', '2025-09-23 19:23:03', '2025-09-24 23:48:59'),
(15, 2, 3, '60133180339', '', 'Kalau xnak set merdeka, ada ke', 'sent', NULL, '2025-09-24 04:35:57', 'wamid.HBgLNjAxMzMxODAzMzkVAgASGCBBNUExRDY1QkE5QTYzRTZDOTc3Qjg4MEE0NTU3Nzg3RgA=', NULL, 'text', 1, '', '2025-09-23 20:35:57', '2025-09-24 23:48:59'),
(16, 2, 3, '6096666685', NULL, 'Hi Saya Dari Mamadil, untuk sebarang pembelian puan boleh hubungi admin kami seperti yang tertera\r\n\r\nAdmin Mamadil HQ \r\n\r\n📲 ADMIN IRA: \r\nwww.wasap.my/60165116985\r\n📲 ADMIN Naddy:\r\nhttp://wasap.my/60125014085\r\n📲 ADMIN Yasmin: \r\nwww.wasap.my/60129040085', 'read', NULL, '2025-09-24 06:26:10', 'wamid.HBgLNjAxMzMxODAzMzkVAgARGBJCRUQyOUU1MTdERDAxMjY0OEYA', '4', 'text', 1, '', '2025-09-23 22:26:10', '2025-09-24 23:48:59'),
(17, 2, 3, '60133180339', '', 'Ok terima kasih', 'sent', NULL, '2025-09-24 06:26:36', 'wamid.HBgLNjAxMzMxODAzMzkVAgASGCBBNTFFQTY1MTI4QzEwMzA2NDU2MjI4QTVEMTdGNkVFQwA=', NULL, 'text', 1, '', '2025-09-23 22:26:36', '2025-09-24 23:48:59'),
(18, 2, 2, '6096666685', NULL, 'Hi Saya Dari Mamadil, untuk sebarang pembelian puan boleh hubungi admin kami seperti yang tertera\r\n\r\nAdmin Mamadil HQ\r\n\r\n📲 ADMIN IRA:\r\nwww.wasap.my/60165116985\r\n📲 ADMIN Naddy:\r\nhttp://wasap.my/60125014085\r\n📲 ADMIN Yasmin:\r\nwww.wasap.my/60129040085', 'read', NULL, '2025-09-24 06:26:52', 'wamid.HBgMNjAxMTE2ODI1NzcwFQIAERgSQUZDMjM3MDc1RkVBQjc4NjlGAA==', '4', 'text', 1, '', '2025-09-23 22:26:52', '2025-09-24 23:48:59'),
(19, 2, 4, '601110752982', '', 'assalamualaikum', 'sent', NULL, '2025-09-24 09:07:51', 'wamid.HBgMNjAxMTEwNzUyOTgyFQIAEhggQUMwQjA3MjM4N0JFRDJFRjAwNkQ0MUVGMjRDMkY2MDQA', NULL, 'text', 1, '', '2025-09-24 01:07:51', '2025-09-24 23:48:57'),
(20, 2, 4, '601110752982', 'media_68d3b5bab2148.jpg', 'image', 'sent', NULL, '2025-09-24 09:11:22', 'wamid.HBgMNjAxMTEwNzUyOTgyFQIAEhggQUNFOEYwNDU1RDJCREU5RUZFRUNEODAyMzRGRDY3MUEA', NULL, 'image', 1, '', '2025-09-24 01:11:22', '2025-09-24 23:48:57'),
(21, 2, 4, '601110752982', '', 'blh sy thu, yaya☝️masih bekerja ngan mamadil lg ke', 'sent', NULL, '2025-09-24 09:12:11', 'wamid.HBgMNjAxMTEwNzUyOTgyFQIAEhggQUNENkQxNDgyNDQxRTZFRTQ1OTc0NkYxRDgwMDdBRjIA', NULL, 'text', 1, '', '2025-09-24 01:12:11', '2025-09-24 23:48:57'),
(22, 2, 4, '601110752982', '', 'sbb sy order wlnc sekotak', 'sent', NULL, '2025-09-24 09:12:57', 'wamid.HBgMNjAxMTEwNzUyOTgyFQIAEhggQUMxODBDRTk0RjNGNkFDQTM1RTExOERGMEI4NTE5MTAA', NULL, 'text', 1, '', '2025-09-24 01:12:57', '2025-09-24 23:48:57'),
(23, 2, 4, '601110752982', '', 'yaya x reply wsp', 'sent', NULL, '2025-09-24 09:14:18', 'wamid.HBgMNjAxMTEwNzUyOTgyFQIAEhggQUNGN0I3NDMzMDRDMTMwNjIyQTkxQzBDRkFERUExQTcA', NULL, 'text', 1, '', '2025-09-24 01:14:18', '2025-09-24 23:48:57'),
(24, 2, 4, '6096666685', NULL, 'maaf puan. nombor lama yaya whatsapp disable, ini no baharu dia. https://wa.me/message/VKRGV52ILTNQO1', 'delivered', NULL, '2025-09-24 11:50:27', 'wamid.HBgMNjAxMTEwNzUyOTgyFQIAERgSQkVGQTVFNTdDRjg3N0Q4NzRCAA==', '3', 'text', 1, '', '2025-09-24 03:50:27', '2025-09-24 23:48:57'),
(25, 2, 5, '60195647566', '', 'Asslm', 'sent', NULL, '2025-09-25 03:03:12', 'wamid.HBgLNjAxOTU2NDc1NjYVAgASGCBBQzAzMTVGMEI2MkZFM0FBNUNGNUNBMzY2MjgzN0M1MwA=', NULL, 'text', 1, '', '2025-09-24 19:03:12', '2025-09-26 23:42:20'),
(26, 2, 5, '60195647566', '', 'Nak order', 'sent', NULL, '2025-09-25 03:03:16', 'wamid.HBgLNjAxOTU2NDc1NjYVAgASGCBBQ0JCRUQ3NkI2OEJCNUE0QTk2QUZFQzQxQjQzRDhBMgA=', NULL, 'text', 1, '', '2025-09-24 19:03:16', '2025-09-26 23:42:20'),
(27, 2, 5, '60195647566', '', '2', 'sent', NULL, '2025-09-25 03:03:30', 'wamid.HBgLNjAxOTU2NDc1NjYVAgASGCBBQzhEMjJEOENGODMzMDI2Qjk5RTQ0MzFCRjZFM0ZFMwA=', NULL, 'text', 1, '', '2025-09-24 19:03:30', '2025-09-26 23:42:20'),
(28, 2, 5, '6096666685', NULL, 'Hi Saya Dari Mamadil, untuk sebarang pembelian puan boleh hubungi admin kami seperti yang tertera\r\n\r\nAdmin Mamadil HQ\r\n\r\n📲 ADMIN IRA:\r\nwww.wasap.my/60165116985\r\n📲 ADMIN Naddy:\r\nhttp://wasap.my/60125014085\r\n📲 ADMIN Yasmin:\r\nwww.wasap.my/60129040085', 'read', NULL, '2025-09-25 05:35:54', 'wamid.HBgLNjAxOTU2NDc1NjYVAgARGBJDRDI3MUZBNDkzOTJBMThBRUQA', '3', 'text', 1, '', '2025-09-24 21:35:54', '2025-09-26 23:42:20'),
(29, 2, 6, '60183284618', '', 'Assalamualaikum..', 'sent', NULL, '2025-09-25 08:34:35', 'wamid.HBgLNjAxODMyODQ2MTgVAgASGCBBQzEzODc1MDVBODY2NzA1REZFNkVCMjYyRjg3M0JFRAA=', NULL, 'text', 1, '', '2025-09-25 00:34:35', '2025-09-26 23:42:18'),
(30, 2, 6, '60183284618', '', 'Nk compact powder', 'sent', NULL, '2025-09-25 08:34:40', 'wamid.HBgLNjAxODMyODQ2MTgVAgASGCBBQ0I4NUNBNzMzOUQyRDYyQ0RGODkzOENFMzRCNEYzRgA=', NULL, 'text', 1, '', '2025-09-25 00:34:40', '2025-09-26 23:42:18'),
(31, 2, 6, '6096666685', NULL, 'Hi Saya Dari Mamadil, untuk sebarang pembelian puan boleh hubungi admin kami seperti yang tertera\r\n\r\nAdmin Mamadil HQ\r\n\r\n📲 ADMIN IRA:\r\nwww.wasap.my/60165116985\r\n📲 ADMIN Naddy:\r\nhttp://wasap.my/60125014085\r\n📲 ADMIN Yasmin:\r\nwww.wasap.my/60129040085', 'read', NULL, '2025-09-25 09:30:48', 'wamid.HBgLNjAxODMyODQ2MTgVAgARGBI1NTRBQjUyOUM2Q0EwODdFODUA', '4', 'text', 1, '', '2025-09-25 01:30:48', '2025-09-26 23:42:18'),
(32, 2, 7, '60134636381', 'media_68d61d9590d5f.pdf', 'document', 'sent', NULL, '2025-09-26 04:59:01', 'wamid.HBgLNjAxMzQ2MzYzODEVAgASGCBGMDU1NTgwRTcxNDlEMTRCOUMxOTQzQjUxREE4QkUzRgA=', NULL, 'document', 1, '', '2025-09-25 20:59:01', '2025-09-26 23:42:20'),
(33, 2, 7, '60134636381', 'media_68d61db6cf1a3.pdf', 'document', 'sent', NULL, '2025-09-26 04:59:34', 'wamid.HBgLNjAxMzQ2MzYzODEVAgASGCAzNDNDNzU0MTcwMjcxNzMyOTlBMTE1Q0IyMEUzNUUzNgA=', NULL, 'document', 1, '', '2025-09-25 20:59:34', '2025-09-26 23:42:20');

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

--
-- Table structure for table `mamadil_contacts`
--

CREATE TABLE `mamadil_contacts` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `firstname` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lastname` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `company` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` enum('lead','customer') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'lead',
  `description` text COLLATE utf8mb4_unicode_ci,
  `country_id` int DEFAULT NULL,
  `zip` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8mb4_unicode_ci,
  `assigned_id` bigint UNSIGNED DEFAULT NULL,
  `status_id` bigint UNSIGNED NOT NULL,
  `source_id` bigint UNSIGNED NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `website` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_enabled` tinyint(1) NOT NULL DEFAULT '1',
  `addedfrom` int DEFAULT NULL,
  `custom_fields_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `dateassigned` datetime DEFAULT NULL,
  `last_status_change` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `group_id` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
) ;

--
-- Dumping data for table `mamadil_contacts`
--

INSERT INTO `mamadil_contacts` (`id`, `tenant_id`, `firstname`, `lastname`, `company`, `type`, `description`, `country_id`, `zip`, `city`, `state`, `address`, `assigned_id`, `status_id`, `source_id`, `email`, `website`, `phone`, `is_enabled`, `addedfrom`, `custom_fields_data`, `dateassigned`, `last_status_change`, `created_at`, `updated_at`, `group_id`) VALUES
(1, 2, 'Anuar', 'Ismail', NULL, 'lead', NULL, NULL, NULL, NULL, NULL, NULL, 3, 6, 4, NULL, NULL, '+60103876889', 1, 0, NULL, NULL, NULL, '2025-09-23 01:12:54', '2025-09-23 01:12:54', NULL),
(2, 2, 'Nor', 'Asiah Razak', NULL, 'lead', NULL, NULL, NULL, NULL, NULL, NULL, 3, 6, 4, NULL, NULL, '+601116825770', 1, 0, NULL, NULL, NULL, '2025-09-23 15:32:07', '2025-09-23 15:32:07', NULL),
(3, 2, 'Rabieatul', 'Adawiah', NULL, 'lead', NULL, NULL, NULL, NULL, NULL, NULL, 3, 6, 4, NULL, NULL, '+60133180339', 1, 0, NULL, NULL, NULL, '2025-09-23 19:22:40', '2025-09-23 19:22:40', NULL),
(4, 2, 'Noor', '', NULL, 'lead', NULL, NULL, NULL, NULL, NULL, NULL, 3, 6, 4, NULL, NULL, '+601110752982', 1, 0, NULL, NULL, NULL, '2025-09-24 01:07:51', '2025-09-24 01:07:51', NULL),
(5, 2, 'rohanabajuri1@gmail.com', '', NULL, 'lead', NULL, NULL, NULL, NULL, NULL, NULL, 3, 6, 4, NULL, NULL, '+60195647566', 1, 0, NULL, NULL, NULL, '2025-09-24 19:03:12', '2025-09-24 19:03:12', NULL),
(6, 2, '.', '', NULL, 'lead', NULL, NULL, NULL, NULL, NULL, NULL, 3, 6, 4, NULL, NULL, '+60183284618', 1, 0, NULL, NULL, NULL, '2025-09-25 00:34:35', '2025-09-25 00:34:35', NULL),
(7, 2, 'Huda', 'Basha', NULL, 'lead', NULL, NULL, NULL, NULL, NULL, NULL, 3, 6, 4, NULL, NULL, '+60134636381', 1, 0, NULL, NULL, NULL, '2025-09-25 20:59:01', '2025-09-25 20:59:01', NULL);

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

--
-- Table structure for table `mamadil_contact_notes`
--

CREATE TABLE `mamadil_contact_notes` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `contact_id` bigint UNSIGNED NOT NULL,
  `notes_description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `message_bots`
--

CREATE TABLE `message_bots` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL COMMENT 'Reference to tenant',
  `name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `rel_type` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `reply_text` text COLLATE utf8mb4_general_ci NOT NULL,
  `reply_type` tinyint NOT NULL,
  `trigger` text COLLATE utf8mb4_general_ci,
  `bot_header` varchar(191) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `bot_footer` varchar(191) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button1` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button1_id` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button2` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button2_id` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button3` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button3_id` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button_url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `addedfrom` int NOT NULL,
  `is_bot_active` tinyint(1) NOT NULL DEFAULT '1',
  `sending_count` int NOT NULL DEFAULT '0',
  `filename` text COLLATE utf8mb4_general_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2022_12_14_083707_create_settings_table', 1),
(5, '2023_07_13_000000_create_taxes_table', 1),
(6, '2025_01_08_000001_create_module_validation_logs_table', 1),
(7, '2025_03_02_083707_alter_users_table', 1),
(8, '2025_03_24_072033_create_faqs_table', 1),
(9, '2025_03_25_130551_create_theme_settings', 1),
(10, '2025_03_26_121434_create_tenant_settings_table', 1),
(11, '2025_03_28_070510_create_system_settings', 1),
(12, '2025_03_28_074346_create_re_captcha_settings', 1),
(13, '2025_03_28_075625_create_email_settings', 1),
(14, '2025_03_28_101632_create_cron_job_settings', 1),
(15, '2025_03_28_104323_create_whats_mark_settings', 1),
(16, '2025_03_31_030310_create_tenants_table', 1),
(17, '2025_03_31_062225_create_plans_table', 1),
(18, '2025_03_31_124314_announcement_settings', 1),
(19, '2025_04_01_062442_create_languages_table', 1),
(20, '2025_04_05_172456_create_features_table', 1),
(21, '2025_04_05_172507_create_plan_features_table', 1),
(22, '2025_04_14_115126_create_payment_settings', 1),
(23, '2025_04_18_045949_tenant_specific_settings', 1),
(24, '2025_04_26_060520_create_currencies_table', 1),
(25, '2025_05_02_000001_create_email_layouts_table', 1),
(26, '2025_05_03_120258_create_whatsapp_settings', 1),
(27, '2025_05_04_000001_create_email_templates_table', 1),
(28, '2025_05_05_000001_create_email_logs_table', 1),
(29, '2025_05_09_062838_create_permission_tables', 1),
(30, '2025_05_19_110957_create_invoice_settings', 1),
(31, '2025_05_26_091936_create_departments_table', 1),
(32, '2025_05_28_095954_create_privacy_policy_settings', 1),
(33, '2025_06_07_123456_create_terms_conditions_settings', 1),
(34, '2025_06_12_125000_add_default_taxes_to_invoice_settings', 1),
(35, '2025_06_24_105018_add_razorpay_to_payment_settings', 1),
(36, '2025_07_01_051611_create_tenant_additional_settings', 1),
(37, '2025_07_01_073021_add_additional_fields_in_tenant_table', 1),
(38, '2025_07_05_044100_create_miscellaneous_settings', 1),
(39, '2025_07_07_073019_create_bot_flows_table', 1),
(40, '2025_07_11_123806_add_themes_style_settings_table', 1),
(41, '2025_07_12_044529_create_groups_table', 1),
(42, '2025_07_12_072850_alter_contact_table', 1),
(43, '2025_07_16_000000_add_wm_fb_config_id_to_whatsapp_settings', 1),
(44, '2025_07_16_053052_create_modules_table', 1),
(45, '2025_07_18_093520_alter_description__pages_table', 1),
(46, '2025_07_18_102235_add_is_enable_landing_page_setting', 1),
(47, '2025_07_19_061218_alter_contacts_table', 1),
(48, '2025_08_05_120000_add_default_tenant_language_setting', 1),
(49, '2025_08_06_133503_alter_whatsapp_templates_table_add_new_fields', 1),
(50, '2025_08_21_000001_create_tenant_languages_table', 1),
(51, '2025_06_27_040042_add_paypal_to_payment_settings', 2),
(52, '2025_06_27_040042_add_razorpay_to_payment_settings', 2),
(53, '2025_08_18_122205_create_custom_fields_table', 2),
(54, '2025_08_18_122322_add_custom_fields_to_contacts_table', 2),
(55, '2025_08_18_123343_add_custom_fields_permissions', 2),
(56, '2025_08_27_000001_add_max_queue_jobs_setting', 2),
(57, '2025_08_27_000001_create_contact_imports_table', 2),
(58, '2025_08_28_105718_add_deleted_at_to_tenants_table', 3),
(59, '2025_09_08_090013_create_paystack_settings', 3),
(60, '2025_09_13_101740_update_ticket_status_changed_email_template_type', 3),
(61, '2025_07_21_120953_seed_emb_signup_in_features', 4),
(62, '2025_09_24_080751_add_message_id_index_to_chat_messages_tables', 5),
(64, '2025_09_27_210900_add_bayarcash_to_payment_settings', 6);

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

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint UNSIGNED NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_permissions`
--

INSERT INTO `model_has_permissions` (`permission_id`, `model_type`, `model_id`, `tenant_id`) VALUES
(18, 'App\\Models\\User', 1, NULL),
(19, 'App\\Models\\User', 1, NULL);

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

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint UNSIGNED NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`, `tenant_id`) VALUES
(2, 'App\\Models\\User', 4, 2);

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

--
-- Table structure for table `module_validation_logs`
--

CREATE TABLE `module_validation_logs` (
  `id` bigint UNSIGNED NOT NULL,
  `module_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `purchase_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ip_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `status` enum('pending','success','failed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `validation_response` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `module_validation_logs`
--

INSERT INTO `module_validation_logs` (`id`, `module_name`, `username`, `purchase_code`, `ip_address`, `user_agent`, `user_id`, `status`, `validation_response`, `created_at`, `updated_at`) VALUES
(1, 'EmbeddedSignup', 'elienblog', '1d0e8dd3***', '2001:e68:7f22:9500:18ab:2ce9:1b7a:e578', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', 1, 'pending', NULL, '2025-09-22 01:07:08', NULL);

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

--
-- Table structure for table `pages`
--

CREATE TABLE `pages` (
  `id` bigint UNSIGNED NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `description` text COLLATE utf8mb4_general_ci,
  `show_in_menu` tinyint(1) DEFAULT '0',
  `status` tinyint(1) DEFAULT '1',
  `parent_id` bigint UNSIGNED DEFAULT NULL,
  `order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

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

CREATE TABLE `payment_methods` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `payment_method_id` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT '0',
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

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

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

CREATE TABLE `permissions` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `scope` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'tenant',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `scope`, `created_at`, `updated_at`) VALUES
(1, 'admin.tenants.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(2, 'admin.tenants.create', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(3, 'admin.tenants.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(4, 'admin.tenants.delete', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(5, 'admin.tenants.login', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(6, 'admin.subscription.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(7, 'admin.invoices.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(8, 'admin.transactions.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(9, 'admin.transactions.actions', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(10, 'admin.plans.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(11, 'admin.plans.create', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(12, 'admin.plans.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(13, 'admin.plans.delete', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(14, 'admin.website_settings.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(15, 'admin.website_settings.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(16, 'admin.system_settings.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(17, 'admin.system_settings.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(18, 'admin.payment_settings.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(19, 'admin.payment_settings.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(20, 'admin.users.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(21, 'admin.users.create', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(22, 'admin.users.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(23, 'admin.users.delete', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(24, 'admin.roles.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(25, 'admin.roles.create', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(26, 'admin.roles.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(27, 'admin.roles.delete', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(28, 'admin.department.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(29, 'admin.department.create', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(30, 'admin.department.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(31, 'admin.department.delete', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(32, 'admin.currency.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(33, 'admin.currency.create', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(34, 'admin.currency.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(35, 'admin.currency.delete', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(36, 'admin.faq.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(37, 'admin.faq.create', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(38, 'admin.faq.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(39, 'admin.faq.delete', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(40, 'admin.pages.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(41, 'admin.pages.create', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(42, 'admin.pages.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(43, 'admin.pages.delete', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(44, 'admin.email_template.view', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(45, 'admin.email_template.edit', 'web', 'admin', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(46, 'tenant.connect_account.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(47, 'tenant.connect_account.connect', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(48, 'tenant.connect_account.disconnect', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(49, 'tenant.contact.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(50, 'tenant.contact.view_own', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(51, 'tenant.contact.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(52, 'tenant.contact.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(53, 'tenant.contact.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(54, 'tenant.contact.bulk_import', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(55, 'tenant.subscription.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(56, 'tenant.invoices.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(57, 'tenant.template.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(58, 'tenant.template.load_template', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(59, 'tenant.template.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(60, 'tenant.template.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(61, 'tenant.template.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(62, 'tenant.campaigns.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(63, 'tenant.campaigns.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(64, 'tenant.campaigns.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(65, 'tenant.campaigns.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(66, 'tenant.campaigns.show_campaign', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(67, 'tenant.bulk_campaigns.send', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(68, 'tenant.template_bot.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(69, 'tenant.template_bot.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(70, 'tenant.template_bot.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(71, 'tenant.template_bot.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(72, 'tenant.template_bot.clone', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(73, 'tenant.message_bot.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(74, 'tenant.message_bot.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(75, 'tenant.message_bot.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(76, 'tenant.message_bot.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(77, 'tenant.message_bot.clone', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(78, 'tenant.source.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(79, 'tenant.source.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(80, 'tenant.source.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(81, 'tenant.source.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(82, 'tenant.status.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(83, 'tenant.status.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(84, 'tenant.status.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(85, 'tenant.status.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(86, 'tenant.group.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(87, 'tenant.group.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(88, 'tenant.group.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(89, 'tenant.group.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(90, 'tenant.ai_prompt.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(91, 'tenant.ai_prompt.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(92, 'tenant.ai_prompt.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(93, 'tenant.ai_prompt.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(94, 'tenant.canned_reply.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(95, 'tenant.canned_reply.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(96, 'tenant.canned_reply.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(97, 'tenant.canned_reply.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(98, 'tenant.chat.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(99, 'tenant.chat.read_only', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(100, 'tenant.chat.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(101, 'tenant.activity_log.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(102, 'tenant.activity_log.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(103, 'tenant.whatsmark_settings.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(104, 'tenant.whatsmark_settings.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(105, 'tenant.system_settings.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(106, 'tenant.system_settings.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(107, 'tenant.staff.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(108, 'tenant.staff.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(109, 'tenant.staff.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(110, 'tenant.staff.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(111, 'tenant.role.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(112, 'tenant.role.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(113, 'tenant.role.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(114, 'tenant.role.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(115, 'tenant.email_template.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(116, 'tenant.email_template.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(117, 'tenant.bot_flow.view', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(118, 'tenant.bot_flow.create', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(119, 'tenant.bot_flow.edit', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(120, 'tenant.bot_flow.delete', 'web', 'tenant', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(121, 'tenant.custom_fields.view', 'web', 'tenant', '2025-09-18 10:42:38', '2025-09-18 10:42:38'),
(122, 'tenant.custom_fields.create', 'web', 'tenant', '2025-09-18 10:42:38', '2025-09-18 10:42:38'),
(123, 'tenant.custom_fields.edit', 'web', 'tenant', '2025-09-18 10:42:38', '2025-09-18 10:42:38'),
(124, 'tenant.custom_fields.delete', 'web', 'tenant', '2025-09-18 10:42:38', '2025-09-18 10:42:38');

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

--
-- Table structure for table `plans`
--

CREATE TABLE `plans` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `yearly_price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `yearly_discount` int NOT NULL DEFAULT '0',
  `billing_period` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'monthly',
  `trial_days` int NOT NULL DEFAULT '0',
  `interval` int NOT NULL DEFAULT '1',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `is_free` tinyint(1) NOT NULL DEFAULT '0',
  `featured` tinyint(1) NOT NULL DEFAULT '0',
  `color` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `plans`
--

INSERT INTO `plans` (`id`, `name`, `slug`, `description`, `price`, `yearly_price`, `yearly_discount`, `billing_period`, `trial_days`, `interval`, `is_active`, `is_free`, `featured`, `color`, `currency_id`, `created_at`, `updated_at`) VALUES
(1, 'Free', 'free', 'Basic plan for individuals getting started with WhatsApp', 0.00, 0.00, 0, 'monthly', 365, 1, 1, 1, 0, '#EF4444', 2, '2025-09-18 10:41:44', '2025-09-27 12:26:04'),
(2, 'Pro', 'pro', 'For small teams to centralize conversations and automate the basics', 1.00, 390.00, 0, 'monthly', 0, 1, 1, 0, 1, '#000000', 2, '2025-09-18 03:23:58', '2025-09-24 07:49:27'),
(3, 'Pro Plus', 'pro-plus', 'Send WhatsApp messages to thousands of users in one click to improve reach', 89.00, 890.00, 0, 'monthly', 0, 1, 1, 0, 0, '#000000', 2, '2025-09-23 22:59:53', '2025-09-24 08:00:33');

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

--
-- Table structure for table `plan_features`
--

CREATE TABLE `plan_features` (
  `id` bigint UNSIGNED NOT NULL,
  `plan_id` bigint UNSIGNED NOT NULL,
  `feature_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Feature display name',
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'URL-friendly feature name',
  `description` text COLLATE utf8mb4_unicode_ci COMMENT 'Feature description',
  `value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT 'Feature value or limit',
  `resettable_period` int DEFAULT NULL COMMENT 'Period after which usage resets',
  `resettable_interval` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Interval for reset (day, month, year)',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `plan_features`
--

INSERT INTO `plan_features` (`id`, `plan_id`, `feature_id`, `name`, `slug`, `description`, `value`, `resettable_period`, `resettable_interval`, `created_at`, `updated_at`) VALUES
(222, 2, 1, 'Contacts ', 'contacts', NULL, '5000', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(223, 2, 2, 'Template Bots ', 'template_bots', NULL, '50', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(224, 2, 3, 'Message Bots ', 'message_bots', NULL, '50', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(225, 2, 4, 'Campaigns ', 'campaigns', NULL, '50', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(226, 2, 5, 'AI Prompts ', 'ai_prompts', NULL, '0', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(227, 2, 6, 'Canned Replies ', 'canned_replies', NULL, '0', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(228, 2, 7, 'Staff ', 'staff', NULL, '3', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(229, 2, 8, 'Conversation ', 'conversations', NULL, '-1', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(230, 2, 9, 'Bot Flow ', 'bot_flow', NULL, '50', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(231, 2, 10, 'Enable Api ', 'enable_api', NULL, '0', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(232, 2, 11, 'Embedded SignUp', 'emb_signup', NULL, '1', NULL, NULL, '2025-09-24 07:49:27', '2025-09-24 07:49:27'),
(233, 3, 1, 'Contacts ', 'contacts', NULL, '20000', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(234, 3, 11, 'Embedded SignUp', 'emb_signup', NULL, '1', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(235, 3, 2, 'Template Bots ', 'template_bots', NULL, '250', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(236, 3, 3, 'Message Bots ', 'message_bots', NULL, '250', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(237, 3, 4, 'Campaigns ', 'campaigns', NULL, '250', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(238, 3, 5, 'AI Prompts ', 'ai_prompts', NULL, '0', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(239, 3, 6, 'Canned Replies ', 'canned_replies', NULL, '0', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(240, 3, 7, 'Staff ', 'staff', NULL, '5', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(241, 3, 8, 'Conversation ', 'conversations', NULL, '-1', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(242, 3, 9, 'Bot Flow ', 'bot_flow', NULL, '250', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(243, 3, 10, 'Enable Api ', 'enable_api', NULL, '0', NULL, NULL, '2025-09-24 08:00:33', '2025-09-24 08:00:33'),
(288, 1, 1, 'Contacts ', 'contacts', NULL, '100', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(289, 1, 2, 'Template Bots ', 'template_bots', NULL, '5', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(290, 1, 3, 'Message Bots ', 'message_bots', NULL, '5', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(291, 1, 4, 'Campaigns ', 'campaigns', NULL, '5', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(292, 1, 5, 'AI Prompts ', 'ai_prompts', NULL, '0', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(293, 1, 6, 'Canned Replies ', 'canned_replies', NULL, '0', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(294, 1, 7, 'Staff ', 'staff', NULL, '1', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(295, 1, 8, 'Conversation ', 'conversations', NULL, '1000', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(296, 1, 9, 'Bot Flow ', 'bot_flow', NULL, '5', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(297, 1, 10, 'Enable Api ', 'enable_api', NULL, '0', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04'),
(298, 1, 11, 'Embedded SignUp', 'emb_signup', NULL, '0', NULL, NULL, '2025-09-27 12:26:04', '2025-09-27 12:26:04');

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

--
-- Table structure for table `pusher_notifications`
--

CREATE TABLE `pusher_notifications` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `isread` int NOT NULL DEFAULT '0',
  `isread_inline` tinyint(1) NOT NULL DEFAULT '0',
  `date` datetime NOT NULL,
  `description` mediumtext COLLATE utf8mb4_general_ci NOT NULL,
  `fromuserid` int NOT NULL,
  `fromclientid` int NOT NULL DEFAULT '0',
  `from_fullname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `touserid` int NOT NULL,
  `fromcompany` int DEFAULT NULL,
  `link` longtext COLLATE utf8mb4_general_ci,
  `additional_data` mediumtext COLLATE utf8mb4_general_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

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

CREATE TABLE `roles` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` (`id`, `tenant_id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 1, 'Agent', 'web', '2025-09-18 03:24:57', '2025-09-18 03:24:57'),
(2, 2, 'Agent', 'web', '2025-09-21 22:30:43', '2025-09-21 22:30:43');

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

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_has_permissions`
--

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(98, 1),
(98, 2);

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('Jsh0wxC2LebFv3W7carc8dF86XM3lKPko624IBE0', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', 'YTo1OntzOjY6Il90b2tlbiI7czo0MDoiak1hNjlDbXJiY2RCb0hQejQ3UEhKSjF4SHBqVU9IeGlaMjYzZ1BhciI7czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTtzOjk6Il9wcmV2aW91cyI7YToxOntzOjM6InVybCI7czo0NzoiaHR0cDovL3dhby50ZXN0L3RoZW1lLXN0eWxlLWNzcz90PTE3NTkwNzI4MzcyMjciO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjIyOiJQSFBERUJVR0JBUl9TVEFDS19EQVRBIjthOjA6e319', 1759072838),
('kA0InfA1NYCWC8GZ6YZXq3fQLJ2tfZ7vQNDPrih5', NULL, '127.0.0.1', 'curl/8.11.0', 'YTo1OntzOjY6Il90b2tlbiI7czo0MDoibTN1a1pBcEt6dm1rTVV3MzBCbEhodmxnelBOSE81cW5NeUduR1BZNSI7czo1OiJlcnJvciI7czoxMzoiQWNjZXNzIERlbmllZCI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJuZXciO2E6MDp7fXM6Mzoib2xkIjthOjE6e2k6MDtzOjU6ImVycm9yIjt9fXM6MjI6IlBIUERFQlVHQkFSX1NUQUNLX0RBVEEiO2E6MTp7czoyNjoiMDFLNjhFV0FSQlhOWjhGSzNCRDQxRE1HWk0iO047fXM6OToiX3ByZXZpb3VzIjthOjE6e3M6MzoidXJsIjtzOjQ4OiJodHRwOi8vd2FvLnRlc3QvYWRtaW4vc2V0dGluZ3MvcGF5bWVudC9iYXlhcmNhc2giO319', 1759073151),
('QZI5QC9UmguArCHbhJa9e0kVL94WWhnbCKG9tqCv', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoidXVZQ2JTT1R0R2tMQklkeUREak9DenBwVW5Xa1lJQVo3WmdsZHNCZiI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NDc6Imh0dHA6Ly93YW8udGVzdC90aGVtZS1zdHlsZS1jc3M/dD0xNzYxMDg2NzYyNjE2Ijt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czoyMToiaHR0cDovL3dhby50ZXN0L2FkbWluIjt9fQ==', 1761086763),
('T4OafheuSRci3z7M1qvUSNMHTMWhT6DqnQ2PvLOm', NULL, '127.0.0.1', 'curl/8.11.0', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiazF1bFZRcG13ODZGalhUQVNxeUhBeU1WRDJSSkpKUEtXd2NOR3V3MSI7czoyMjoiUEhQREVCVUdCQVJfU1RBQ0tfREFUQSI7YTowOnt9czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly93YW8udGVzdC9sb2dpbiI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1759073152),
('tHI3JPj0f11JWO7cglsckPFL2fV03OM9ypu5bxLV', NULL, '127.0.0.1', 'curl/8.11.0', 'YTo1OntzOjY6Il90b2tlbiI7czo0MDoiMXhDRE1SN0Nha3I1ekhMMjVDN3ZISTczMUpIYXpDQ25lWDFKdXl6WSI7czo1OiJlcnJvciI7czoxMzoiQWNjZXNzIERlbmllZCI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJuZXciO2E6MDp7fXM6Mzoib2xkIjthOjE6e2k6MDtzOjU6ImVycm9yIjt9fXM6MjI6IlBIUERFQlVHQkFSX1NUQUNLX0RBVEEiO2E6MTp7czoyNjoiMDFLNjhFWDFSQk0xREpIMTBUU1RQUDMzSDQiO047fXM6OToiX3ByZXZpb3VzIjthOjE6e3M6MzoidXJsIjtzOjQ4OiJodHRwOi8vd2FvLnRlc3QvYWRtaW4vc2V0dGluZ3MvcGF5bWVudC9iYXlhcmNhc2giO319', 1759073175);

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

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

CREATE TABLE `settings` (
  `id` bigint UNSIGNED NOT NULL,
  `group` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `locked` tinyint(1) NOT NULL DEFAULT '0',
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

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

INSERT INTO `settings` (`id`, `group`, `name`, `locked`, `payload`, `created_at`, `updated_at`) VALUES
(1, 'theme', 'site_logo', 0, '\"settings\\/site_logo_1758697509.png\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(2, 'theme', 'favicon', 0, '\"settings\\/favicon_1758694530.png\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(3, 'theme', 'dark_logo', 0, '\"settings\\/dark_logo_1758697509.png\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(4, 'theme', 'cover_page_image', 0, '\"settings\\/cover_page_image_1758694530.png\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(5, 'theme', 'pricing_section_title', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(6, 'theme', 'pricing_section_subtitle', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(7, 'theme', 'faq_section_title', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(8, 'theme', 'faq_section_subtitle', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(9, 'theme', 'author_name', 0, '\"gengbiz\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(10, 'theme', 'seo_meta_title', 0, '\"Wao\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(11, 'theme', 'seo_meta_keywords', 0, '\"Trusted Messaging. Secure Connections.\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(12, 'theme', 'seo_meta_description', 0, '\"Wao.my is a Malaysia-based platform that enables businesses to connect with customers through the official WhatsApp Business API. We provide secure, reliable, and compliant communication tools to ensure trusted engagement, enhanced customer service, and seamless digital interaction.\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(13, 'theme', 'og_title', 0, '\"Wao\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(14, 'theme', 'og_description', 0, '\"Wao.my is a Malaysia-based platform that enables businesses to connect with customers through the official WhatsApp Business API. We provide secure, reliable, and compliant communication tools to ensure trusted engagement, enhanced customer service, and seamless digital interaction.\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(15, 'theme', 'customCss', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(16, 'theme', 'custom_js_header', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(17, 'theme', 'custom_js_footer', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(18, 'theme', 'partner_logos', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(19, 'theme', 'uni_feature_image', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(20, 'theme', 'uni_feature_title', 0, '\"Innovative Features\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(21, 'theme', 'uni_feature_sub_title', 0, '\"Unlocking New Possibilities with Cutting-Edge Technology\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(22, 'theme', 'uni_feature_description', 0, '\"Deliver great service experiences fast - without the complexity of traditional ITSM solutions.\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(23, 'theme', 'uni_feature_list', 0, '\"[\\\"Continuous integration and deployment\\\",\\\"Development workflow\\\",\\\"Knowledge management\\\"]\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(24, 'theme', 'feature_title', 0, '\"We invest in the world\\u2019s potential\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(25, 'theme', 'feature_subtitle', 0, '\"Deliver great service experiences fast - without the complexity of traditional ITSM solutions. Accelerate critical development work, eliminate toil, and deploy changes with ease.\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(26, 'theme', 'feature_description', 0, '\"Deliver great service experiences fast - without the complexity of traditional ITSM solutions.\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(27, 'theme', 'feature_list', 0, '\"[\\\"Dynamic reports and dashboards\\\",\\\"Templates for everyone\\\",\\\"Development workflow\\\",\\\"Limitless business automation\\\",\\\"Knowledge management\\\"]\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(28, 'theme', 'feature_image', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(29, 'theme', 'title', 0, '\"Scale your business with WhatsApp marketing automation\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(30, 'theme', 'description', 0, '\"Transform customer engagement with our powerful WhatsApp marketing platform. Send bulk messages, create chatbots, and automate conversations to boost sales and customer satisfaction.\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(31, 'theme', 'primary_button_text', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(32, 'theme', 'primary_button_url', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(33, 'theme', 'primary_button_type', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(34, 'theme', 'secondary_button_text', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(35, 'theme', 'secondary_button_url', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(36, 'theme', 'secondary_button_type', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(37, 'theme', 'image_path', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(38, 'theme', 'image_alt_text', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(39, 'theme', 'testimonials', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-24 00:55:10'),
(40, 'system', 'site_name', 0, '\"Wao.my\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(41, 'system', 'site_description', 0, '\"Wao.my enables Malaysian businesses to connect with customers using the official WhatsApp Business API. We provide secure, reliable, and compliant tools for trusted engagement and seamless customer service.\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(42, 'system', 'timezone', 0, '\"Asia\\/Kuala_Lumpur\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(43, 'system', 'date_format', 0, '\"d\\/m\\/Y\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(44, 'system', 'time_format', 0, '\"24\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(45, 'system', 'active_language', 0, '\"en\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(46, 'system', 'company_name', 0, '\"Gengbiz Digital\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(47, 'system', 'company_country_id', 0, '\"133\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(48, 'system', 'company_email', 0, '\"gengbizdigital@gmail.com\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(49, 'system', 'company_city', 0, '\"Kuala Terengganu\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(50, 'system', 'company_state', 0, '\"Terengganu\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(51, 'system', 'company_zip_code', 0, '\"21070\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(52, 'system', 'company_address', 0, '\"Lot474A, Kampung Kolam Atas Tol\"', '2025-09-18 01:06:40', '2025-09-23 23:07:07'),
(53, 're-captcha', 'isReCaptchaEnable', 0, 'false', '2025-09-18 01:06:40', '2025-09-18 01:06:40'),
(54, 're-captcha', 'site_key', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-18 01:06:40'),
(55, 're-captcha', 'secret_key', 0, '\"\"', '2025-09-18 01:06:40', '2025-09-18 01:06:40'),
(56, 'email', 'mailer', 0, '\"smtp\"', '2025-09-18 01:06:40', '2025-09-23 22:32:43'),
(57, 'email', 'smtp_port', 0, '\"465\"', '2025-09-18 01:06:40', '2025-09-23 22:32:43'),
(58, 'email', 'smtp_username', 0, '\"AKIA3YUYISFCYPZBBFFH\"', '2025-09-18 01:06:40', '2025-09-23 22:32:43'),
(59, 'email', 'smtp_password', 0, '\"BDcF3IRHUFsoPg9FEErr5aN0M\\/BPiNozbYC\\/gLo3Ivbv\"', '2025-09-18 01:06:40', '2025-09-23 22:32:43'),
(60, 'email', 'smtp_encryption', 0, '\"SSL\"', '2025-09-18 01:06:40', '2025-09-23 22:32:43'),
(61, 'email', 'sender_name', 0, '\"WAO\"', '2025-09-18 01:06:40', '2025-09-23 22:32:43'),
(62, 'email', 'sender_email', 0, '\"hello@wao.my\"', '2025-09-18 01:06:40', '2025-09-23 22:32:43'),
(63, 'email', 'smtp_host', 0, '\"email-smtp.ap-southeast-1.amazonaws.com\"', '2025-09-18 01:06:40', '2025-09-23 22:32:43'),
(64, 'cron-job', 'last_cron_run', 0, '\"1758959048\"', '2025-09-18 01:06:41', '2025-09-26 23:44:08'),
(65, 'cron-job', 'status', 0, '\"completed\"', '2025-09-18 01:06:41', '2025-09-26 23:44:08'),
(66, 'cron-job', 'last_cron_stats', 0, '\"{}\"', '2025-09-18 01:06:41', '2025-09-26 23:44:08'),
(67, 'cron-job', 'last_execution_time', 0, '6', '2025-09-18 01:06:41', '2025-09-26 23:44:08'),
(68, 'cron-job', 'job_start_time', 0, '1758959042', '2025-09-18 01:06:41', '2025-09-26 23:44:08'),
(69, 'whats-mark', 'wm_version', 0, '\"1.3.8\"', '2025-09-18 01:06:41', '2025-09-27 00:35:14'),
(70, 'whats-mark', 'wm_verification_id', 0, '\"NTg3MTQ5Njh8NTY4fGVsaWVuYmxvZ3wwMmM2MzU3NC0xOTJkLTQ3NGYtYmU5Mi02ZmM1YTE1YWE3ZmE=\"', '2025-09-18 01:06:41', '2025-09-27 00:35:14'),
(71, 'whats-mark', 'wm_verification_token', 0, '\"NTg3MTQ5Njh8NTY4fGVsaWVuYmxvZ3wwMmM2MzU3NC0xOTJkLTQ3NGYtYmU5Mi02ZmM1YTE1YWE3ZmE=|eyJwdXJjaGFzZV9jb2RlIjoiMDJjNjM1NzQtMTkyZC00NzRmLWJlOTItNmZjNWExNWFhN2ZhIiwiaXRlbV9pZCI6NTg3MTQ5NjgsImJ1eWVyIjoiZWxpZW5ibG9nIiwicHVyY2hhc2VfY291bnQiOjEsImFjdGl2YXRlZF9kb21haW4iOiJodHRwczpcL1wvd2FvLm15IiwiaXAiOiIyMDAxOmU2ODo1NDcyOjczM2M6ZDVlZTpkZTExOjIzM2Y6YzM5IiwicHVyY2hhc2VfdGltZSI6IjIwMjUtMDktMTVUMjE6Mjc6NDArMTA6MDAiLCJjaGVja19pbnRlcnZhbCI6NjA0ODAwLCJjcmVhdGVkX2F0IjoxNzU4MTkyMDY4fQ==.9ffbef1da8bca056d2fa74c6bd07b7630c8ce90b989a297cf9fd555ad2cea85941ef886b7e4e877ea3607a30a3d5219b6e21be84370fb4cf7f425e96c4c7fbb1\"', '2025-09-18 01:06:41', '2025-09-27 00:35:14'),
(72, 'whats-mark', 'wm_last_verification', 0, '\"1758958905\"', '2025-09-18 01:06:41', '2025-09-27 00:35:14'),
(73, 'whats-mark', 'wm_support_until', 0, '\"2026-03-17T13:27:40+11:00\"', '2025-09-18 01:06:41', '2025-09-27 00:35:14'),
(74, 'whats-mark', 'wm_validate', 0, 'true', '2025-09-18 01:06:41', '2025-09-27 00:35:14'),
(75, 'whats-mark', 'whatsmark_latest_version', 0, '\"1.3.8\"', '2025-09-18 01:06:41', '2025-09-27 00:35:14'),
(76, 'announcement', 'isEnable', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(77, 'announcement', 'message', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(78, 'announcement', 'link', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(79, 'announcement', 'link_text', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(80, 'announcement', 'background_color', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(81, 'announcement', 'link_text_color', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(82, 'announcement', 'message_color', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(83, 'payment', 'default_gateway', 0, '\"offline\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(84, 'payment', 'offline_enabled', 0, 'true', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(85, 'payment', 'offline_description', 0, '\"Pay via direct bank transfer.\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(86, 'payment', 'offline_instructions', 0, '\"Please transfer the amount to our bank account and email the receipt.\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(87, 'payment', 'stripe_enabled', 0, 'false', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(88, 'payment', 'stripe_key', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(89, 'payment', 'stripe_secret', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(90, 'payment', 'stripe_webhook_secret', 0, '\"whsec_0j2NwvEk5EfzyHFMWjfPf8vq8ed7Qhmk\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(91, 'payment', 'stripe_webhook_id', 0, '\"we_1S8fqWFI9YvZTtjab685pbbZ\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(92, 'payment', 'tax_enabled', 0, 'false', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(93, 'tenant', 'isRegistrationEnabled', 0, 'false', '2025-09-18 01:06:41', '2025-09-18 02:51:46'),
(94, 'tenant', 'isVerificationEnabled', 0, 'false', '2025-09-18 01:06:41', '2025-09-18 02:51:46'),
(95, 'whatsapp', 'wm_fb_app_id', 0, '\"1739469436732494\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(96, 'whatsapp', 'wm_fb_app_secret', 0, '\"7bc6a3200765e49a354e0b1752cfc956\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(97, 'whatsapp', 'is_webhook_connected', 0, '\"1\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(98, 'whatsapp', 'api_version', 0, '\"v21.0\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(99, 'whatsapp', 'daily_limit', 0, '\"1000\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(100, 'whatsapp', 'webhook_verify_token', 0, '\"DwIz4F99KwU6zDRp\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(101, 'whatsapp', 'queue', 0, '\"{\\\"name\\\":\\\"whatsapp-messages\\\",\\\"connection\\\":\\\"database\\\",\\\"retry_after\\\":180,\\\"timeout\\\":60}\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(102, 'whatsapp', 'paths', 0, '\"{\\\"qrcodes\\\":\\\"\\\\\\/var\\\\\\/www\\\\\\/wao.my\\\\\\/storage\\\\\\/app\\\\\\/public\\\\\\/whatsapp\\\\\\/qrcodes\\\",\\\"media\\\":\\\"\\\\\\/var\\\\\\/www\\\\\\/wao.my\\\\\\/storage\\\\\\/app\\\\\\/public\\\\\\/whatsapp\\\\\\/media\\\"}\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(103, 'whatsapp', 'logging', 0, '\"{\\\"enabled\\\":false,\\\"channel\\\":\\\"whatsapp\\\",\\\"level\\\":\\\"info\\\"}\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(104, 'invoice', 'bank_name', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(105, 'invoice', 'account_name', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(106, 'invoice', 'account_number', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(107, 'invoice', 'ifsc_code', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(108, 'invoice', 'prefix', 0, '\"INV\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(109, 'invoice', 'footer_text', 0, '\"Thanks for your purchase. Contact support for help.\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(110, 'privacy-policy', 'title', 0, '\"Privacy Policy\"', '2025-09-18 01:06:41', '2025-09-22 00:17:04'),
(111, 'privacy-policy', 'content', 0, '\"<h1>Privacy Policy<\\/h1><p><br><\\/p><p><strong>Effective Date:<\\/strong> 22 September 2025<\\/p><p><br><\\/p><p>Wao.my (\\u201cwe\\u201d, \\u201cour\\u201d, \\u201cus\\u201d) is committed to protecting your personal data and privacy. This Privacy Policy outlines how we collect, use, store, and protect your information in accordance with the Malaysian Personal Data Protection Act 2010 (PDPA), the General Data Protection Regulation (GDPR), and other applicable laws.<\\/p><p><br><\\/p><h1>About Us<\\/h1><p><br><\\/p><p>Wao.my is operated by <strong>Gengbiz Digital Solution<\\/strong>, registered under the <strong>Companies Commission of Malaysia (SSM)<\\/strong> \\u2013 Registration Number: <strong>202403195596 (003627707V)<\\/strong>.<\\/p><p>\\ud83d\\udccd Address: Lot 474a, Kampung Kolam Atas Tol, 21070, Kuala Terengganu, Terengganu, Malaysia<\\/p><p> \\ud83d\\udcde Phone: +60108316285<\\/p><p> \\ud83d\\udce7 Email: gengbizdigital@gmail.com<\\/p><p><br><\\/p><p>We are an independent service provider utilizing the <strong>official WhatsApp Business API<\\/strong>. Wao.my is <strong>not owned, operated, or endorsed by WhatsApp Inc. or Meta Platforms, Inc.<\\/strong><\\/p><h2><br><\\/h2><h2>1. Information We Collect<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Personal details (name, phone number, email)<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Business details (company name, registration info)<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Communication data (messages sent\\/received via WhatsApp Business API)<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Technical data (IP address, device information, cookies, usage logs)<\\/li><\\/ol><h2><br><\\/h2><h2>2. How We Use Your Data<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>To deliver WhatsApp Business messaging services<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>To verify identity and prevent fraud<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>To comply with Meta (Facebook) platform policies<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>To improve our services and provide customer support<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>To process payments and billing<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>To send you updates, service announcements, and promotional offers (only with your consent \\u2013 as required by PDPA\\/GDPR)<\\/li><\\/ol><h2><br><\\/h2><h2>3. Marketing &amp; Advertising Consent<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>You will only receive marketing messages if you have <strong>opted in<\\/strong>.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>You may <strong>withdraw consent<\\/strong> or unsubscribe at any time by replying \\u201cSTOP\\u201d or managing your preferences in your account.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>We comply with WhatsApp\\u2019s rules against spam and unsolicited promotions.<\\/li><\\/ol><h2><br><\\/h2><h2>4. Data Sharing &amp; Disclosure<\\/h2><p>We may share your data with:<\\/p><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span><strong>Meta Platforms (WhatsApp\\/Facebook)<\\/strong> for enabling WhatsApp Business API services<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span><strong>Third-party service providers<\\/strong> (cloud hosting, payment processors, analytics) under strict confidentiality agreements<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span><strong>Regulatory authorities<\\/strong> where required by law<\\/li><\\/ol><p>We do not sell or trade your personal data.<\\/p><h2><br><\\/h2><h2>5. Data Retention<\\/h2><p>We retain data only as long as necessary to fulfill service obligations, comply with legal requirements, and resolve disputes.<\\/p><h2><br><\\/h2><h2>6. Data Protection<\\/h2><p>We implement technical and organizational measures (encryption, access control, secure servers) to protect your personal information.<\\/p><h2><br><\\/h2><h2>7. Your Rights<\\/h2><p>You have the right to:<\\/p><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Access, correct, or delete your data<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Withdraw consent at any time<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Restrict or object to processing<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Request data portability (GDPR users)<\\/li><\\/ol><h2><br><\\/h2><h2>8. International Data Transfers<\\/h2><p>Data may be transferred and stored on servers outside Malaysia, including in the EU and the United States, in compliance with applicable laws.<\\/p><h2><br><\\/h2><h2>9. Cookies &amp; Tracking<\\/h2><p>We use cookies and tracking tools (including Meta Pixel and analytics services) to improve user experience and measure ad performance.<\\/p><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>You can disable cookies in your browser settings.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Marketing cookies will only be used with your consent (GDPR).<\\/li><\\/ol><h2><br><\\/h2><h2>10. Contact Us<\\/h2><p>For privacy concerns, please contact:<\\/p><p><br><\\/p><p><strong>Gengbiz Digital Solution<\\/strong><\\/p><p> \\ud83d\\udccd Lot 474a, Kampung Kolam Atas Tol, 21070, Kuala Terengganu, Terengganu, Malaysia<\\/p><p> \\ud83d\\udcde +60108316285<\\/p><h2> \\ud83d\\udce7 gengbizdigital@gmail.com<\\/h2>\"', '2025-09-18 01:06:41', '2025-09-22 00:17:04'),
(112, 'privacy-policy', 'updated_at', 0, '\"2025-09-22T08:17:04.911785Z\"', '2025-09-18 01:06:41', '2025-09-22 00:17:04'),
(113, 'terms-conditions', 'title', 0, '\"Terms and Conditions\"', '2025-09-18 01:06:41', '2025-09-22 00:14:43'),
(114, 'terms-conditions', 'content', 0, '\"<h1>Terms &amp; Conditions<\\/h1><p><br><\\/p><p><strong>Effective Date:<\\/strong> 22 September 2025<\\/p><p>Welcome to Wao.my. By using our services, you agree to the following terms:<\\/p><p><br><\\/p><h2>1. Acceptance of Terms<\\/h2><p>By registering and using our platform, you acknowledge that you have read, understood, and agreed to these Terms &amp; Conditions.<\\/p><h2><br><\\/h2><h2>2. Services<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Wao.my provides businesses access to WhatsApp Business API services.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Services are subject to Meta\\u2019s (Facebook\\/WhatsApp) rules and approval.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>We may update or modify services at any time.<\\/li><\\/ol><h2><br><\\/h2><h2>3. User Responsibilities<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Provide accurate and lawful business information.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Do not use the platform for spam, fraud, or illegal activities.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Ensure compliance with PDPA 2010, GDPR, and WhatsApp Business Policy.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Customers are responsible for the content of their messages. Wao.my is not liable for any claims arising from unlawful or misleading messaging.<\\/li><\\/ol><h2><br><\\/h2><h2>4. Payments &amp; Fees<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Service fees must be paid as per agreed pricing.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Failure to pay may result in suspension of service.<\\/li><\\/ol><h2><br><\\/h2><h2>5. Refund &amp; Cancellation Policy<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Subscription or service fees are non-refundable once payment is processed, except where required by Malaysian consumer protection laws.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Users may cancel their subscription with <strong>30 days written notice<\\/strong>.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Refund requests will be handled on a case-by-case basis.<\\/li><\\/ol><h2><br><\\/h2><h2>6. Data &amp; Privacy<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Use of services is subject to our Privacy Policy.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>We do not claim ownership of your communication data, but you grant us limited rights to process it for service delivery.<\\/li><\\/ol><h2><br><\\/h2><h2>7. Marketing &amp; Advertising Compliance<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Users must comply with PDPA, GDPR, and WhatsApp\\u2019s commercial policy for all marketing campaigns.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Sending unsolicited or spam messages is strictly prohibited.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Wao.my reserves the right to suspend accounts that misuse messaging for non-compliant advertising.<\\/li><\\/ol><h2><br><\\/h2><h2>8. Limitation of Liability<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Wao.my is not liable for indirect damages, loss of profits, or disruptions caused by third-party providers (e.g., WhatsApp, Meta, network issues).<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Service availability depends on Meta\\u2019s infrastructure and approval.<\\/li><\\/ol><h2><br><\\/h2><h2>9. Termination<\\/h2><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>We reserve the right to suspend\\/terminate accounts that violate these Terms.<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Users may terminate their account by written notice.<\\/li><\\/ol><h2><br><\\/h2><h2>10. Governing Law<\\/h2><p>These Terms are governed by and construed under the laws of Malaysia.<\\/p><h2><br><\\/h2><h2>11. Changes to Terms<\\/h2><p>We may amend these Terms &amp; Conditions at any time. Continued use of the service constitutes acceptance of the updated terms.<\\/p><h1><br><\\/h1><h1>Cookie Policy<\\/h1><p>Wao.my uses cookies and similar tracking technologies to:<\\/p><ol><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Improve site functionality<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Analyze usage and traffic<\\/li><li data-list=\\\"bullet\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"><\\/span>Deliver relevant ads through platforms such as Meta Ads<\\/li><\\/ol><h2><br><\\/h2><p>You may control cookies through your browser or reject marketing cookies in our consent banner.<\\/p>\"', '2025-09-18 01:06:41', '2025-09-22 00:14:43'),
(115, 'terms-conditions', 'updated_at', 0, '\"2025-09-22T08:14:43.316311Z\"', '2025-09-18 01:06:41', '2025-09-22 00:14:43'),
(116, 'invoice', 'default_taxes', 0, '\"[]\"', '2025-09-18 01:06:41', '2025-09-18 01:06:41'),
(117, 'payment', 'razorpay_enabled', 0, 'false', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(118, 'payment', 'razorpay_key_id', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(119, 'payment', 'razorpay_key_secret', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(120, 'payment', 'razorpay_webhook_secret', 0, '\"\"', '2025-09-18 01:06:41', '2025-09-27 10:31:41'),
(121, 'tenant', 'isEmailConfirmationEnabled', 0, 'false', '2025-09-18 01:06:41', '2025-09-18 02:51:46'),
(122, 'tenant', 'isEnableWelcomeEmail', 0, 'false', '2025-09-18 01:06:41', '2025-09-18 02:51:46'),
(123, 'system', 'default_country_code', 0, '{\"name\":\"Malaysia\",\"iso2\":\"my\"}', '2025-09-18 01:06:41', '2025-09-23 23:07:07'),
(124, 'system', 'tables_pagination_limit', 0, '10', '2025-09-18 01:06:41', '2025-09-23 23:07:07'),
(125, 'theme', 'theme_style', 0, '\"{\\\"primary\\\":{\\\"valueStop\\\":600,\\\"lMax\\\":100,\\\"lMin\\\":0,\\\"hex\\\":\\\"#ff6f00\\\",\\\"swatches\\\":[{\\\"stop\\\":0,\\\"hex\\\":\\\"#FFFFFF\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":100},{\\\"stop\\\":50,\\\"hex\\\":\\\"#FFF3EB\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":96},{\\\"stop\\\":100,\\\"hex\\\":\\\"#FFE8D6\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":92},{\\\"stop\\\":200,\\\"hex\\\":\\\"#FFCEA8\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":83},{\\\"stop\\\":300,\\\"hex\\\":\\\"#FFB780\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":75},{\\\"stop\\\":400,\\\"hex\\\":\\\"#FFA057\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":67},{\\\"stop\\\":500,\\\"hex\\\":\\\"#FF8629\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":58},{\\\"stop\\\":600,\\\"hex\\\":\\\"#FF6F00\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":50},{\\\"stop\\\":700,\\\"hex\\\":\\\"#C25400\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":38},{\\\"stop\\\":800,\\\"hex\\\":\\\"#803700\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":25},{\\\"stop\\\":900,\\\"hex\\\":\\\"#421D00\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":13},{\\\"stop\\\":950,\\\"hex\\\":\\\"#1F0D00\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":6},{\\\"stop\\\":1000,\\\"hex\\\":\\\"#000000\\\",\\\"h\\\":26,\\\"hScale\\\":0,\\\"s\\\":100,\\\"sScale\\\":0,\\\"l\\\":0}]},\\\"danger\\\":{\\\"valueStop\\\":600,\\\"lMax\\\":100,\\\"lMin\\\":0,\\\"hex\\\":\\\"#dc2626\\\",\\\"swatches\\\":[{\\\"stop\\\":0,\\\"hex\\\":\\\"#FFFFFF\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":100},{\\\"stop\\\":50,\\\"hex\\\":\\\"#FCEDED\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":96},{\\\"stop\\\":100,\\\"hex\\\":\\\"#F9DCDC\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":92},{\\\"stop\\\":200,\\\"hex\\\":\\\"#F4B9B9\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":84},{\\\"stop\\\":300,\\\"hex\\\":\\\"#ED9191\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":75},{\\\"stop\\\":400,\\\"hex\\\":\\\"#E86E6E\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":67},{\\\"stop\\\":500,\\\"hex\\\":\\\"#E24B4B\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":59},{\\\"stop\\\":600,\\\"hex\\\":\\\"#DC2626\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":50.6},{\\\"stop\\\":700,\\\"hex\\\":\\\"#A71B1B\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":38},{\\\"stop\\\":800,\\\"hex\\\":\\\"#6E1212\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":25},{\\\"stop\\\":900,\\\"hex\\\":\\\"#390909\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":13},{\\\"stop\\\":950,\\\"hex\\\":\\\"#1A0404\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":6},{\\\"stop\\\":1000,\\\"hex\\\":\\\"#000000\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":72.2,\\\"sScale\\\":0,\\\"l\\\":0}]},\\\"warning\\\":{\\\"valueStop\\\":600,\\\"lMax\\\":100,\\\"lMin\\\":0,\\\"hex\\\":\\\"#eab308\\\",\\\"swatches\\\":[{\\\"stop\\\":0,\\\"hex\\\":\\\"#FFFFFF\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":100},{\\\"stop\\\":50,\\\"hex\\\":\\\"#fefce8\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":95},{\\\"stop\\\":100,\\\"hex\\\":\\\"#fef9c3\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":90},{\\\"stop\\\":200,\\\"hex\\\":\\\"#fef08a\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":80},{\\\"stop\\\":300,\\\"hex\\\":\\\"#fde047\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":70},{\\\"stop\\\":400,\\\"hex\\\":\\\"#facc15\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":60},{\\\"stop\\\":500,\\\"hex\\\":\\\"#eab308\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":50},{\\\"stop\\\":600,\\\"hex\\\":\\\"#eab308\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":40.4},{\\\"stop\\\":700,\\\"hex\\\":\\\"#a16207\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":30},{\\\"stop\\\":800,\\\"hex\\\":\\\"#854d0e\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":20},{\\\"stop\\\":900,\\\"hex\\\":\\\"#713f12\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":10},{\\\"stop\\\":950,\\\"hex\\\":\\\"#191100\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":5},{\\\"stop\\\":1000,\\\"hex\\\":\\\"#000000\\\",\\\"h\\\":41,\\\"hScale\\\":0,\\\"s\\\":96.1,\\\"sScale\\\":0,\\\"l\\\":0}]},\\\"success\\\":{\\\"valueStop\\\":600,\\\"lMax\\\":100,\\\"lMin\\\":0,\\\"hex\\\":\\\"#16a34a\\\",\\\"swatches\\\":[{\\\"stop\\\":0,\\\"hex\\\":\\\"#FFFFFF\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":100},{\\\"stop\\\":50,\\\"hex\\\":\\\"#E9FCF0\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":95},{\\\"stop\\\":100,\\\"hex\\\":\\\"#CEF8DD\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":89},{\\\"stop\\\":200,\\\"hex\\\":\\\"#A1F2BF\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":79},{\\\"stop\\\":300,\\\"hex\\\":\\\"#6FEC9D\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":68},{\\\"stop\\\":400,\\\"hex\\\":\\\"#42E67E\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":58},{\\\"stop\\\":500,\\\"hex\\\":\\\"#1DD35F\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":47},{\\\"stop\\\":600,\\\"hex\\\":\\\"#16A34A\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":36.3},{\\\"stop\\\":700,\\\"hex\\\":\\\"#107937\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":27},{\\\"stop\\\":800,\\\"hex\\\":\\\"#0B5125\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":18},{\\\"stop\\\":900,\\\"hex\\\":\\\"#052812\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":9},{\\\"stop\\\":950,\\\"hex\\\":\\\"#03160A\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":5},{\\\"stop\\\":1000,\\\"hex\\\":\\\"#000000\\\",\\\"h\\\":142,\\\"hScale\\\":0,\\\"s\\\":76.2,\\\"sScale\\\":0,\\\"l\\\":0}]},\\\"info\\\":{\\\"valueStop\\\":600,\\\"lMax\\\":100,\\\"lMin\\\":0,\\\"hex\\\":\\\"#0284c7\\\",\\\"swatches\\\":[{\\\"stop\\\":0,\\\"hex\\\":\\\"#FFFFFF\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":100},{\\\"stop\\\":50,\\\"hex\\\":\\\"#E6F6FF\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":95},{\\\"stop\\\":100,\\\"hex\\\":\\\"#CDEEFE\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":90},{\\\"stop\\\":200,\\\"hex\\\":\\\"#9ADDFE\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":80},{\\\"stop\\\":300,\\\"hex\\\":\\\"#68CBFD\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":70},{\\\"stop\\\":400,\\\"hex\\\":\\\"#35BAFD\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":60},{\\\"stop\\\":500,\\\"hex\\\":\\\"#03A9FC\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":50},{\\\"stop\\\":600,\\\"hex\\\":\\\"#0284C7\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":39.4},{\\\"stop\\\":700,\\\"hex\\\":\\\"#026597\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":30},{\\\"stop\\\":800,\\\"hex\\\":\\\"#014465\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":20},{\\\"stop\\\":900,\\\"hex\\\":\\\"#012232\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":10},{\\\"stop\\\":950,\\\"hex\\\":\\\"#001119\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":5},{\\\"stop\\\":1000,\\\"hex\\\":\\\"#000000\\\",\\\"h\\\":200,\\\"hScale\\\":0,\\\"s\\\":98,\\\"sScale\\\":0,\\\"l\\\":0}]},\\\"neutral\\\":{\\\"valueStop\\\":600,\\\"lMax\\\":100,\\\"lMin\\\":0,\\\"hex\\\":\\\"#525252\\\",\\\"swatches\\\":[{\\\"stop\\\":0,\\\"hex\\\":\\\"#FFFFFF\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":100},{\\\"stop\\\":50,\\\"hex\\\":\\\"#F0F0F0\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":94},{\\\"stop\\\":100,\\\"hex\\\":\\\"#E3E3E3\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":89},{\\\"stop\\\":200,\\\"hex\\\":\\\"#C4C4C4\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":77},{\\\"stop\\\":300,\\\"hex\\\":\\\"#A8A8A8\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":66},{\\\"stop\\\":400,\\\"hex\\\":\\\"#8C8C8C\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":55},{\\\"stop\\\":500,\\\"hex\\\":\\\"#707070\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":44},{\\\"stop\\\":600,\\\"hex\\\":\\\"#525252\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":32.2},{\\\"stop\\\":700,\\\"hex\\\":\\\"#3D3D3D\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":24},{\\\"stop\\\":800,\\\"hex\\\":\\\"#292929\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":16},{\\\"stop\\\":900,\\\"hex\\\":\\\"#141414\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":8},{\\\"stop\\\":950,\\\"hex\\\":\\\"#0A0A0A\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":4},{\\\"stop\\\":1000,\\\"hex\\\":\\\"#000000\\\",\\\"h\\\":0,\\\"hScale\\\":0,\\\"s\\\":0,\\\"sScale\\\":0,\\\"l\\\":0}]},\\\"secondary\\\":{\\\"valueStop\\\":600,\\\"lMax\\\":100,\\\"lMin\\\":0,\\\"hex\\\":\\\"#4b5563\\\",\\\"swatches\\\":[{\\\"stop\\\":0,\\\"hex\\\":\\\"#FFFFFF\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":100},{\\\"stop\\\":50,\\\"hex\\\":\\\"#F0F2F4\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":95},{\\\"stop\\\":100,\\\"hex\\\":\\\"#DFE2E7\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":89},{\\\"stop\\\":200,\\\"hex\\\":\\\"#BFC6CF\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":78},{\\\"stop\\\":300,\\\"hex\\\":\\\"#9FA9B6\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":67},{\\\"stop\\\":400,\\\"hex\\\":\\\"#7F8C9E\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":56},{\\\"stop\\\":500,\\\"hex\\\":\\\"#637083\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":45},{\\\"stop\\\":600,\\\"hex\\\":\\\"#4B5563\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":34.1},{\\\"stop\\\":700,\\\"hex\\\":\\\"#39414B\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":26},{\\\"stop\\\":800,\\\"hex\\\":\\\"#252A31\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":17},{\\\"stop\\\":900,\\\"hex\\\":\\\"#14161A\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":9},{\\\"stop\\\":950,\\\"hex\\\":\\\"#090A0C\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":4},{\\\"stop\\\":1000,\\\"hex\\\":\\\"#000000\\\",\\\"h\\\":215,\\\"hScale\\\":0,\\\"s\\\":13.8,\\\"sScale\\\":0,\\\"l\\\":0}]}}\"', '2025-09-18 01:06:41', '2025-09-24 00:55:10'),
(126, 'theme', 'theme_style_modified_at', 0, '\"1758695459\"', '2025-09-18 01:06:41', '2025-09-24 00:55:10'),
(127, 'whatsapp', 'wm_fb_config_id', 0, '\"2014300252712728\"', '2025-09-18 01:06:41', '2025-09-25 01:04:44'),
(128, 'system', 'is_enable_landing_page', 0, 'false', '2025-09-18 01:06:41', '2025-09-23 23:07:07'),
(129, 'tenant', 'set_default_tenant_language', 0, '\"en\"', '2025-09-18 01:06:41', '2025-09-18 02:51:46'),
(4185, 'payment', 'paypal_enabled', 0, 'false', '2025-09-18 10:42:38', '2025-09-27 10:31:41'),
(4186, 'payment', 'paypal_mode', 0, '\"sandbox\"', '2025-09-18 10:42:38', '2025-09-27 10:31:41'),
(4187, 'payment', 'paypal_client_id', 0, '\"\"', '2025-09-18 10:42:38', '2025-09-27 10:31:41'),
(4188, 'payment', 'paypal_client_secret', 0, '\"\"', '2025-09-18 10:42:38', '2025-09-27 10:31:41'),
(4189, 'payment', 'paypal_webhook_id', 0, '\"\"', '2025-09-18 10:42:38', '2025-09-27 10:31:41'),
(4190, 'payment', 'paypal_brand_name', 0, '\"WhatsMarks\"', '2025-09-18 10:42:38', '2025-09-27 10:31:41'),
(4191, 'system', 'max_queue_jobs', 0, '100', '2025-09-18 10:42:38', '2025-09-23 23:07:07'),
(4199, 'paystack', 'enabled', 0, 'false', '2025-09-18 02:43:00', '2025-09-18 02:43:00'),
(4200, 'paystack', 'public_key', 0, '\"\"', '2025-09-18 02:43:00', '2025-09-18 02:43:00'),
(4201, 'paystack', 'secret_key', 0, '\"\"', '2025-09-18 02:43:00', '2025-09-18 02:43:00'),
(5525, 'payment', 'paystack_enabled', 0, 'false', '2025-09-18 03:15:18', '2025-09-27 10:31:41'),
(5526, 'payment', 'paystack_public_key', 0, '\"\"', '2025-09-18 03:15:18', '2025-09-27 10:31:41'),
(5527, 'payment', 'paystack_secret_key', 0, '\"\"', '2025-09-18 03:15:18', '2025-09-27 10:31:41'),
(5767, 'payment', 'bayarcash_enabled', 0, 'true', '2025-09-27 06:47:03', '2025-09-27 10:31:41'),
(5768, 'payment', 'bayarcash_portal_key', 0, '\"fef135471207bb579355f93facc81753\"', '2025-09-27 06:47:03', '2025-09-27 10:31:41'),
(5769, 'payment', 'bayarcash_pat_key', 0, '\"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI1IiwianRpIjoiYjczYjJlNzBlNWExMjQyNThkYmFlMTlmYThjNmE1ZjM0N2VhN2M4MGRkODE2YmVkMzdjNGUzNzE1MzNhY2ViMGUzZjNjODc3NzYxNjhkODgiLCJpYXQiOjE3NDcyOTc3NTguNjU2MTExLCJuYmYiOjE3NDcyOTc3NTguNjU2MTEzLCJleHAiOjIwNjI4MzA1NTguNjU0NTkxLCJzdWIiOiIyMTQxIiwic2NvcGVzIjpbIioiXX0.vb9ZY4tx0aTTJH8PNBIh_z80-IDUSksGau0-BGfrOzIzJXPpnMZriKMn-ggkbBkYuOdspZRRP_W2cAy1tCYPMdeDvsARBNnfYPvT9JE7kM7beBqYWqwy90gExoyitItPrzWs_YSKG8i4ALOsl_mW4KpdDh3e8CnmLKJk48caOQTydtwGtGuMEPufXM-QXyDq_kOHXSl1Zmx7a1JOWDR0kKBsEUhctV-E4XvlA9G9NeDdtOxJkaAGbn8x6z7uOdmBjTOaE2ilRAs0B9q26s0hxg9bS_v-cA4oXRq5IfIWXaXEcqp_LtICOuZTGT_vPQNWVcKtR-HqGoOZpJDAaFZ7s07boyelcpfjt4jDgNQx5iMw-q_2pYwEekcK4vxnJV8LMprvrewGT6E39r8H7sWAgSXMy6J3J9UYqev60ITwdwCP-WXCqmTVw5oeuttCKcGjHsNiypbVZs3rcwnac64U_jRQxTeTXktJeSwYikjmn08vbNVYAIeTmEbXz52jpKEKObrS10mTFyIy4I_37EzLvrZ10sFsgpsLTy6tYO_UG8y0a53qHqe-v8KzRfrRdYnMnRMcQXxl7cNDUtI2VhYrpd33GLZpoPxd3HACsPym03lYTIx3JAYnkc4avq0h0u-UU7iapNPCQu0yT4fBjez52PHvOeFx44VK60XuBats25s\"', '2025-09-27 06:47:03', '2025-09-27 10:31:41'),
(5770, 'payment', 'bayarcash_api_secret_key', 0, '\"ruHT5jrsArYqibiByhbDyKlJ5r95yoYm\"', '2025-09-27 06:47:03', '2025-09-27 10:31:41'),
(5771, 'payment', 'bayarcash_sandbox', 0, 'false', '2025-09-27 06:47:03', '2025-09-27 10:31:41');

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

--
-- Table structure for table `sources`
--

CREATE TABLE `sources` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `sources`
--

INSERT INTO `sources` (`id`, `tenant_id`, `name`, `created_at`, `updated_at`) VALUES
(1, 1, 'facebook', '2025-09-18 03:24:57', '2025-09-18 03:24:57'),
(2, 1, 'whatsapp', '2025-09-18 03:24:57', '2025-09-18 03:24:57'),
(3, 2, 'facebook', '2025-09-21 22:30:43', '2025-09-21 22:30:43'),
(4, 2, 'whatsapp', '2025-09-21 22:30:43', '2025-09-21 22:30:43');

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

--
-- Table structure for table `statuses`
--

CREATE TABLE `statuses` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `color` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#28B8DA',
  `isdefault` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `statuses`
--

INSERT INTO `statuses` (`id`, `tenant_id`, `name`, `color`, `isdefault`, `created_at`, `updated_at`) VALUES
(1, 1, 'New', '#4CAF50', 1, '2025-09-18 03:24:57', '2025-09-18 03:24:57'),
(2, 1, 'In Progress', '#2196F3', 0, '2025-09-18 03:24:57', '2025-09-18 03:24:57'),
(3, 1, 'Contacted', '#FFC107', 0, '2025-09-18 03:24:57', '2025-09-18 03:24:57'),
(4, 1, 'Qualified', '#9C27B0', 0, '2025-09-18 03:24:57', '2025-09-18 03:24:57'),
(5, 1, 'Closed', '#F44336', 0, '2025-09-18 03:24:57', '2025-09-18 03:24:57'),
(6, 2, 'New', '#4CAF50', 1, '2025-09-21 22:30:43', '2025-09-21 22:30:43'),
(7, 2, 'In Progress', '#2196F3', 0, '2025-09-21 22:30:43', '2025-09-21 22:30:43'),
(8, 2, 'Contacted', '#FFC107', 0, '2025-09-21 22:30:43', '2025-09-21 22:30:43'),
(9, 2, 'Qualified', '#9C27B0', 0, '2025-09-21 22:30:43', '2025-09-21 22:30:43'),
(10, 2, 'Closed', '#F44336', 0, '2025-09-21 22:30:43', '2025-09-21 22:30:43');

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

--
-- Table structure for table `subscriptions`
--

CREATE TABLE `subscriptions` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `plan_id` bigint UNSIGNED NOT NULL,
  `status` enum('new','active','ended','cancelled','terminated','trial','paused') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'new',
  `current_period_ends_at` timestamp NULL DEFAULT NULL,
  `trial_starts_at` timestamp NULL DEFAULT NULL,
  `trial_ends_at` timestamp NULL DEFAULT NULL,
  `is_recurring` tinyint(1) NOT NULL DEFAULT '1',
  `cancelled_at` timestamp NULL DEFAULT NULL,
  `ended_at` timestamp NULL DEFAULT NULL,
  `terminated_at` timestamp NULL DEFAULT NULL,
  `canceled_at` timestamp NULL DEFAULT NULL,
  `cancellation_reason` text COLLATE utf8mb4_general_ci,
  `payment_attempt_count` int NOT NULL DEFAULT '0',
  `last_payment_attempt_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `subscriptions`
--

INSERT INTO `subscriptions` (`id`, `tenant_id`, `plan_id`, `status`, `current_period_ends_at`, `trial_starts_at`, `trial_ends_at`, `is_recurring`, `cancelled_at`, `ended_at`, `terminated_at`, `canceled_at`, `cancellation_reason`, `payment_attempt_count`, `last_payment_attempt_at`, `created_at`, `updated_at`) VALUES
(2, 2, 2, 'active', '2025-10-22 23:47:48', NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2025-09-21 22:30:53', '2025-09-22 23:47:48'),
(8, 1, 2, 'active', '2025-10-28 03:50:27', NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2025-09-28 03:50:28', '2025-09-28 03:50:56');

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

--
-- Table structure for table `subscription_logs`
--

CREATE TABLE `subscription_logs` (
  `id` bigint UNSIGNED NOT NULL,
  `subscription_id` bigint UNSIGNED NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `transaction_id` bigint UNSIGNED DEFAULT NULL,
  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

--
-- Dumping data for table `subscription_logs`
--

INSERT INTO `subscription_logs` (`id`, `subscription_id`, `type`, `description`, `transaction_id`, `data`, `created_at`, `updated_at`) VALUES
(3, 2, 'updated', NULL, NULL, '\"{\\\"plan\\\":\\\"Pro\\\",\\\"price\\\":\\\"39.00\\\"}\"', '2025-09-22 23:46:59', '2025-09-22 23:46:59'),
(4, 2, 'activated', NULL, NULL, '\"{\\\"plan\\\":\\\"Pro\\\",\\\"price\\\":\\\"39.00\\\"}\"', '2025-09-22 23:47:48', '2025-09-22 23:47:48'),
(28, 8, 'created', NULL, NULL, '\"{\\\"plan\\\":\\\"Pro\\\",\\\"price\\\":\\\"1.00\\\"}\"', '2025-09-28 03:50:28', '2025-09-28 03:50:28'),
(29, 8, 'activated', NULL, NULL, '\"{\\\"plan\\\":\\\"Pro\\\",\\\"price\\\":\\\"1.00\\\"}\"', '2025-09-28 03:50:56', '2025-09-28 03:50:56');

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

--
-- Table structure for table `taxes`
--

CREATE TABLE `taxes` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `rate` decimal(8,2) NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `taxes`
--

INSERT INTO `taxes` (`id`, `name`, `rate`, `description`, `created_at`, `updated_at`) VALUES
(1, 'CGST', 9.00, 'Standard CGST rate (9%)', '2025-09-18 10:41:44', '2025-09-18 10:41:44'),
(2, 'SGST', 9.00, 'Standard SGST rate (9%)', '2025-09-18 10:41:44', '2025-09-18 10:41:44');

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

--
-- Table structure for table `template_bots`
--

CREATE TABLE `template_bots` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `rel_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `template_id` bigint UNSIGNED DEFAULT NULL,
  `header_params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `body_params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `footer_params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `filename` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `trigger` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `reply_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_bot_active` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `sending_count` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `tenants`
--

CREATE TABLE `tenants` (
  `id` bigint UNSIGNED NOT NULL,
  `company_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `domain` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Custom domain if available',
  `subdomain` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Subdomain for tenant access',
  `stripe_customer_id` text COLLATE utf8mb4_unicode_ci,
  `status` enum('active','deactive','suspended') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `custom_colors` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'Tenant UI customization colors',
  `timezone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT 'UTC',
  `has_custom_domain` tinyint(1) DEFAULT '0',
  `features_config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'Tenant-specific feature configuration',
  `address` text COLLATE utf8mb4_unicode_ci,
  `country_id` int DEFAULT NULL,
  `payment_method` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `billing_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_address` text COLLATE utf8mb4_unicode_ci,
  `billing_city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_state` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_zip_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billing_phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_date` timestamp NULL DEFAULT NULL
) ;

--
-- Dumping data for table `tenants`
--

INSERT INTO `tenants` (`id`, `company_name`, `domain`, `subdomain`, `stripe_customer_id`, `status`, `custom_colors`, `timezone`, `has_custom_domain`, `features_config`, `address`, `country_id`, `payment_method`, `payment_details`, `billing_name`, `billing_email`, `billing_address`, `billing_city`, `billing_state`, `billing_zip_code`, `billing_country`, `billing_phone`, `expires_at`, `created_at`, `updated_at`, `deleted_date`) VALUES
(1, 'GS', NULL, 'gs', 'cus_T4pc4AL6iGGHmF', 'active', NULL, 'Asia/Kuala_Lumpur', 0, NULL, NULL, 133, NULL, NULL, 'GS Name', 'gengbizmail@gmail.com', 'Lot474A', 'Kuala Terengganu', 'Terengganu', '21070', '133', '+60123456789', NULL, '2025-09-18 03:24:57', '2025-09-27 11:54:18', NULL),
(2, 'Mamadil', NULL, 'mamadil', NULL, 'active', NULL, 'Asia/Kuala_Lumpur', 0, NULL, NULL, 133, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2025-09-21 22:30:43', '2025-09-21 22:30:43', NULL);

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

--
-- Table structure for table `tenant_credit_balances`
--

CREATE TABLE `tenant_credit_balances` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `balance` decimal(13,2) NOT NULL DEFAULT '0.00',
  `currency_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tenant_credit_balances`
--

INSERT INTO `tenant_credit_balances` (`id`, `tenant_id`, `balance`, `currency_id`, `created_at`, `updated_at`) VALUES
(1, 1, 0.97, 2, '2025-09-18 03:25:13', '2025-09-28 03:26:12'),
(2, 2, 0.00, 2, '2025-09-22 23:46:59', '2025-09-22 23:46:59');

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

--
-- Table structure for table `tenant_email_templates`
--

CREATE TABLE `tenant_email_templates` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` longtext COLLATE utf8mb4_general_ci,
  `merge_fields_groups` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `is_system` tinyint(1) NOT NULL DEFAULT '0',
  `category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `layout_id` int UNSIGNED DEFAULT NULL,
  `use_layout` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint UNSIGNED DEFAULT NULL,
  `updated_by` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

--
-- Dumping data for table `tenant_email_templates`
--

INSERT INTO `tenant_email_templates` (`id`, `tenant_id`, `name`, `slug`, `description`, `subject`, `content`, `merge_fields_groups`, `is_active`, `is_system`, `category`, `type`, `layout_id`, `use_layout`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(1, 1, 'Email Confirmation', 'tenant-email-confirmation', NULL, 'Email Confirmation', '<p>Thank you for signing up with {company_name}, {first_name} {last_name}!</p><p>We\'re thrilled to have you on board. Before you get started, we need to verify your email address to ensure the security of your account.</p><p>Please click the button below to verify your email:</p><p><br></p><p> {verification_url}</p><p><br></p><p>Thank you.</p>', '[\"tenant-other-group\",\"tenant-user-group\"]', 1, 0, NULL, 'tenant', 1, 1, NULL, NULL, NULL, NULL),
(2, 1, 'Welcome Email', 'tenants-welcome-mail', NULL, 'Welcome to {company_name}!', '<p>Dear {first_name} {last_name},</p><p>Welcome to {company_name}! We\'re excited to have you on board. 🚀</p><p>Get ready to explore our amazing features and make your life easier.</p><p>If you have any questions, our support team at <a href=\"mailto:{company_email}\">{company_email}</a> is always here to help.</p><p>Start your journey here: <a href=\"{base_url}\">{base_url}</a></p><p>Looking forward to seeing you thrive!</p>', '[\"tenant-other-group\",\"tenant-user-group\"]', 1, 0, NULL, 'tenant', 1, 1, NULL, NULL, NULL, NULL),
(3, 1, 'Password Reset', 'tenant-password-reset', NULL, 'Password Reset Request', '<p>Hello {first_name} {last_name},</p><p>We received a request to reset your password for your {company_name} account.</p><p>If you made this request, click the button below to reset your password:</p><p><a href=\"{reset_url}\" rel=\"noopener noreferrer\" target=\"_blank\">{reset_url}</a></p><p>If you did not request a password reset, please ignore this email or contact support at <a href=\"mailto:{company_email}\" rel=\"noopener noreferrer\" target=\"_blank\">{company_email}</a>.</p>', '[\"tenant-other-group\",\"tenant-user-group\"]', 1, 0, NULL, 'tenant', 1, 1, NULL, NULL, NULL, NULL),
(4, 1, 'New Contact Assigned', 'tenant-new-contact-assigned', NULL, '📌 New Contact Assigned to You', '<p>Hi {first_name} {last_name},</p><p>A new contact has been assigned to you. Here are the details:</p><ol><li data-list=\"bullet\"><span class=\"ql-ui\" contenteditable=\"false\"></span><strong>Contact Name:</strong> {contact_first_name} {contact_last_name}</li><li data-list=\"bullet\"><span class=\"ql-ui\" contenteditable=\"false\"></span><strong>Email:</strong> {contact_email}</li><li data-list=\"bullet\"><span class=\"ql-ui\" contenteditable=\"false\"></span><strong>Phone:</strong> {contact_phone_number}</li><li data-list=\"bullet\"><span class=\"ql-ui\" contenteditable=\"false\"></span><strong>Assigned By:</strong> {assigned_by}</li></ol><p>Please reach out to them promptly and ensure a smooth follow-up.</p><p>If you have any questions, feel free to get in touch.</p><p><strong>Best regards,</strong></p><p> {company_name}</p>', '[\"tenant-other-group\",\"tenant-user-group\",\"tenant-contact-group\"]', 1, 0, NULL, 'tenant', 1, 1, NULL, NULL, NULL, NULL),
(5, 2, 'Email Confirmation', 'tenant-email-confirmation', NULL, 'Email Confirmation', '<p>Thank you for signing up with {company_name}, {first_name} {last_name}!</p><p>We\'re thrilled to have you on board. Before you get started, we need to verify your email address to ensure the security of your account.</p><p>Please click the button below to verify your email:</p><p><br></p><p> {verification_url}</p><p><br></p><p>Thank you.</p>', '[\"tenant-other-group\",\"tenant-user-group\"]', 1, 0, NULL, 'tenant', 1, 1, NULL, NULL, NULL, NULL),
(6, 2, 'Welcome Email', 'tenants-welcome-mail', NULL, 'Welcome to {company_name}!', '<p>Dear {first_name} {last_name},</p><p>Welcome to {company_name}! We\'re excited to have you on board. 🚀</p><p>Get ready to explore our amazing features and make your life easier.</p><p>If you have any questions, our support team at <a href=\"mailto:{company_email}\">{company_email}</a> is always here to help.</p><p>Start your journey here: <a href=\"{base_url}\">{base_url}</a></p><p>Looking forward to seeing you thrive!</p>', '[\"tenant-other-group\",\"tenant-user-group\"]', 1, 0, NULL, 'tenant', 1, 1, NULL, NULL, NULL, NULL),
(7, 2, 'Password Reset', 'tenant-password-reset', NULL, 'Password Reset Request', '<p>Hello {first_name} {last_name},</p><p>We received a request to reset your password for your {company_name} account.</p><p>If you made this request, click the button below to reset your password:</p><p><a href=\"{reset_url}\" rel=\"noopener noreferrer\" target=\"_blank\">{reset_url}</a></p><p>If you did not request a password reset, please ignore this email or contact support at <a href=\"mailto:{company_email}\" rel=\"noopener noreferrer\" target=\"_blank\">{company_email}</a>.</p>', '[\"tenant-other-group\",\"tenant-user-group\"]', 1, 0, NULL, 'tenant', 1, 1, NULL, NULL, NULL, NULL),
(8, 2, 'New Contact Assigned', 'tenant-new-contact-assigned', NULL, '📌 New Contact Assigned to You', '<p>Hi {first_name} {last_name},</p><p>A new contact has been assigned to you. Here are the details:</p><ol><li data-list=\"bullet\"><span class=\"ql-ui\" contenteditable=\"false\"></span><strong>Contact Name:</strong> {contact_first_name} {contact_last_name}</li><li data-list=\"bullet\"><span class=\"ql-ui\" contenteditable=\"false\"></span><strong>Email:</strong> {contact_email}</li><li data-list=\"bullet\"><span class=\"ql-ui\" contenteditable=\"false\"></span><strong>Phone:</strong> {contact_phone_number}</li><li data-list=\"bullet\"><span class=\"ql-ui\" contenteditable=\"false\"></span><strong>Assigned By:</strong> {assigned_by}</li></ol><p>Please reach out to them promptly and ensure a smooth follow-up.</p><p>If you have any questions, feel free to get in touch.</p><p><strong>Best regards,</strong></p><p> {company_name}</p>', '[\"tenant-other-group\",\"tenant-user-group\",\"tenant-contact-group\"]', 1, 0, NULL, 'tenant', 1, 1, NULL, NULL, NULL, NULL);

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

--
-- Table structure for table `tenant_languages`
--

CREATE TABLE `tenant_languages` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tenant_languages`
--

INSERT INTO `tenant_languages` (`id`, `name`, `code`, `created_at`, `updated_at`) VALUES
(1, 'Portuguese', 'br', '2025-09-27 00:35:14', '2025-09-27 00:35:14');

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

--
-- Table structure for table `test_users`
--

CREATE TABLE `test_users` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

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

--
-- Table structure for table `themes`
--

CREATE TABLE `themes` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `folder` varchar(191) COLLATE utf8mb4_general_ci NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `version` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `theme_url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `themes`
--

INSERT INTO `themes` (`id`, `name`, `folder`, `active`, `version`, `theme_url`, `created_at`, `updated_at`) VALUES
(1, 'thecore', 'thecore', 1, '1.0', 'themes/thecore/theme.jpg', '2025-09-18 02:43:09', '2025-09-18 02:43:09');

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

--
-- Table structure for table `tickets`
--

CREATE TABLE `tickets` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `tenant_staff_id` bigint UNSIGNED DEFAULT NULL,
  `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `department_id` bigint UNSIGNED NOT NULL,
  `assignee_id` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `priority` enum('low','medium','high') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'medium',
  `status` enum('open','answered','closed','on_hold') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'open',
  `ticket_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `admin_viewed` tinyint(1) NOT NULL DEFAULT '0',
  `tenant_viewed` tinyint(1) NOT NULL DEFAULT '1',
  `attachments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `closed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

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

--
-- Table structure for table `ticket_replies`
--

CREATE TABLE `ticket_replies` (
  `id` bigint UNSIGNED NOT NULL,
  `ticket_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `user_type` enum('admin','tenant','tenant_staff','system') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'tenant',
  `attachments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `viewed` tinyint(1) NOT NULL DEFAULT '0',
  `send_notification` tinyint(1) DEFAULT '0',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

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

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `id` bigint UNSIGNED NOT NULL,
  `invoice_id` bigint UNSIGNED NOT NULL,
  `payment_method_id` bigint UNSIGNED DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `status` enum('pending','success','failed') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `amount` decimal(13,2) NOT NULL,
  `idempotency_key` text COLLATE utf8mb4_general_ci,
  `currency_id` bigint UNSIGNED NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `error` text COLLATE utf8mb4_general_ci,
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

--
-- Dumping data for table `transactions`
--

INSERT INTO `transactions` (`id`, `invoice_id`, `payment_method_id`, `type`, `status`, `amount`, `idempotency_key`, `currency_id`, `description`, `error`, `metadata`, `created_at`, `updated_at`) VALUES
(1, 3, NULL, 'offline', 'success', 39.00, NULL, 2, 'Payment for Invoice', NULL, '{\"payment_reference\":\"101\",\"payment_date\":\"2025-09-23\",\"payment_method\":\"Bank Transfer\",\"payment_details\":\"Test Payment\"}', '2025-09-22 23:47:16', '2025-09-22 23:47:48'),
(14, 15, NULL, 'bayarcash_duitnow_qr', 'success', 0.03, 'pi_zL80mA', 2, 'Payment for Invoice', NULL, '{\"order_id\":\"DNQ_INV_15_1759060230_a1d0d606\",\"bayarcash_payment_intent_id\":\"pi_zL80mA\",\"bayarcash_order_id\":\"DNQ_INV_15_1759060230_a1d0d606\",\"payment_url\":\"https:\\/\\/console.bayar.cash\\/payment-intent\\/pi_zL80mA\",\"payment_method\":\"duitnow_qr\",\"payment_channel\":\"DuitNow QR\",\"remaining_credit\":0,\"final_amount\":1,\"bayarcash_transaction_id\":\"trx_Yb8y2V\",\"bayarcash_response\":{\"id\":\"trx_Yb8y2V\",\"status\":\"3\",\"amount\":1,\"currency\":\"MYR\",\"order_number\":\"DNQ_INV_15_1759060230_a1d0d606\",\"payer_name\":\"Customer\",\"payer_email\":\"customer@example.com\",\"metadata\":{\"invoice_id\":15,\"tenant_id\":1,\"transaction_id\":14,\"remaining_credit\":0,\"final_amount\":1,\"invoice_number\":null,\"payment_method\":\"duitnow_qr\",\"payment_channel\":\"DuitNow QR\"},\"created_at\":\"2025-09-28 19:50:51\",\"updated_at\":null},\"verified_at\":\"2025-09-28T11:50:56.597304Z\"}', '2025-09-28 03:50:30', '2025-09-28 03:50:56');

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

--
-- Table structure for table `uploaded_files`
--

CREATE TABLE `uploaded_files` (
  `id` bigint UNSIGNED NOT NULL,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `webhook_logs`
--

CREATE TABLE `webhook_logs` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED DEFAULT NULL,
  `event` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `model` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempt` int NOT NULL DEFAULT '1',
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `response` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `error_message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status_code` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ;

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

--
-- Table structure for table `whatsapp_templates`
--

CREATE TABLE `whatsapp_templates` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `template_id` bigint UNSIGNED DEFAULT NULL,
  `template_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `language` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `status` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `category` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `header_data_format` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `header_data_text` text COLLATE utf8mb4_general_ci,
  `header_params_count` int DEFAULT NULL,
  `body_data` text COLLATE utf8mb4_general_ci NOT NULL,
  `body_params_count` int DEFAULT NULL,
  `footer_data` text COLLATE utf8mb4_general_ci,
  `footer_params_count` int DEFAULT NULL,
  `buttons_data` text COLLATE utf8mb4_general_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `header_file_url` text COLLATE utf8mb4_general_ci,
  `header_variable_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `body_variable_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
) ;

--
-- Dumping data for table `whatsapp_templates`
--

INSERT INTO `whatsapp_templates` (`id`, `tenant_id`, `template_id`, `template_name`, `language`, `status`, `category`, `header_data_format`, `header_data_text`, `header_params_count`, `body_data`, `body_params_count`, `footer_data`, `footer_params_count`, `buttons_data`, `created_at`, `updated_at`, `header_file_url`, `header_variable_value`, `body_variable_value`) VALUES
(3, 2, 2170696070110208, 'hello_world', 'en_US', 'APPROVED', 'UTILITY', 'TEXT', 'Hello World', 0, 'Welcome and congratulations!! This message demonstrates your ability to send a WhatsApp message notification from the Cloud API, hosted by Meta. Thank you for taking the time to test with us.', 0, 'WhatsApp Business Platform sample message', 0, NULL, '2025-09-23 00:36:39', '2025-09-23 00:36:39', NULL, NULL, NULL),
(5, 1, 767273176172655, 'reply_for_info', 'en_GB', 'APPROVED', 'MARKETING', NULL, NULL, 0, 'Hello,\n\nThank your for contacting us, \nTo learn more just reply *{{1}}* so we can get back to you shortly.', 1, NULL, 0, NULL, '2025-09-24 00:27:13', '2025-09-25 01:07:11', NULL, NULL, '[[\"Sample Value 1\"]]'),
(6, 1, 791164326896563, 'hello_world', 'en_US', 'APPROVED', 'UTILITY', 'TEXT', 'Hello World', 0, 'Welcome and congratulations!! This message demonstrates your ability to send a WhatsApp message notification from the Cloud API, hosted by Meta. Thank you for taking the time to test with us.', 0, 'WhatsApp Business Platform sample message', 0, NULL, '2025-09-25 01:07:11', '2025-09-25 01:07:11', NULL, NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `ai_prompts`
--
ALTER TABLE `ai_prompts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ai_prompts_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `bot_flows`
--
ALTER TABLE `bot_flows`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bot_flows_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `campaigns`
--
ALTER TABLE `campaigns`
  ADD PRIMARY KEY (`id`),
  ADD KEY `campaigns_name_is_sent_scheduled_send_time_index` (`name`,`is_sent`,`scheduled_send_time`),
  ADD KEY `campaigns_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `campaign_details`
--
ALTER TABLE `campaign_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `campaign_details_campaign_id_tenant_id_index` (`campaign_id`,`tenant_id`),
  ADD KEY `campaign_details_tenant_id_foreign` (`tenant_id`),
  ADD KEY `idx_whatsapp_id_tenant_id` (`whatsapp_id`(191),`tenant_id`);

--
-- Indexes for table `canned_replies`
--
ALTER TABLE `canned_replies`
  ADD PRIMARY KEY (`id`),
  ADD KEY `canned_replies_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `contact_imports`
--
ALTER TABLE `contact_imports`
  ADD PRIMARY KEY (`id`),
  ADD KEY `contact_imports_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `credit_transactions`
--
ALTER TABLE `credit_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `credit_transactions_currency_id_foreign` (`currency_id`),
  ADD KEY `credit_transactions_invoice_id_foreign` (`invoice_id`),
  ADD KEY `credit_transactions_tenant_id_foreign` (`tenant_id`);

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

--
-- Indexes for table `custom_fields`
--
ALTER TABLE `custom_fields`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `custom_fields_tenant_id_field_name_unique` (`tenant_id`,`field_name`),
  ADD KEY `custom_fields_tenant_id_is_active_index` (`tenant_id`,`is_active`),
  ADD KEY `custom_fields_tenant_id_display_order_index` (`tenant_id`,`display_order`);

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

--
-- Indexes for table `email_layouts`
--
ALTER TABLE `email_layouts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email_layouts_slug_unique` (`slug`);

--
-- Indexes for table `email_logs`
--
ALTER TABLE `email_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `email_logs_email_template_id_foreign` (`email_template_id`);

--
-- Indexes for table `email_templates`
--
ALTER TABLE `email_templates`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email_templates_slug_unique` (`slug`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

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

--
-- Indexes for table `features`
--
ALTER TABLE `features`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `features_name_unique` (`name`),
  ADD UNIQUE KEY `features_slug_unique` (`slug`);

--
-- Indexes for table `feature_limits`
--
ALTER TABLE `feature_limits`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `feature_limits_plan_id_feature_id_tenant_id_unique` (`plan_id`,`feature_id`,`tenant_id`),
  ADD KEY `feature_limits_plan_id_feature_id_tenant_id_index` (`plan_id`,`feature_id`,`tenant_id`),
  ADD KEY `feature_limits_feature_id_foreign` (`feature_id`),
  ADD KEY `feature_limits_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `feature_usages`
--
ALTER TABLE `feature_usages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `feature_usages_tenant_id_subscription_id_feature_slug_unique` (`tenant_id`,`subscription_id`,`feature_slug`),
  ADD KEY `feature_usages_subscription_id_foreign` (`subscription_id`);

--
-- Indexes for table `groups`
--
ALTER TABLE `groups`
  ADD PRIMARY KEY (`id`),
  ADD KEY `groups_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `gs_chats`
--
ALTER TABLE `gs_chats`
  ADD PRIMARY KEY (`id`),
  ADD KEY `gs_chats_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `gs_chat_messages`
--
ALTER TABLE `gs_chat_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `gs_chat_messages_tenant_id_index` (`tenant_id`),
  ADD KEY `idx_message_id_tenant_id` (`message_id`,`tenant_id`);

--
-- Indexes for table `gs_contacts`
--
ALTER TABLE `gs_contacts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `gs_contacts_status_id_index` (`status_id`),
  ADD KEY `gs_contacts_source_id_index` (`source_id`),
  ADD KEY `gs_contacts_assigned_id_index` (`assigned_id`),
  ADD KEY `gs_contacts_type_index` (`type`),
  ADD KEY `gs_contacts_phone_index` (`phone`),
  ADD KEY `gs_contacts_firstname_lastname_index` (`firstname`,`lastname`),
  ADD KEY `gs_contacts_is_enabled_index` (`is_enabled`),
  ADD KEY `gs_contacts_tenant_id_index` (`tenant_id`),
  ADD KEY `gs_contacts_tenant_id_email_index` (`tenant_id`,`email`),
  ADD KEY `gs_contacts_tenant_id_phone_index` (`tenant_id`,`phone`),
  ADD KEY `gs_contacts_tenant_id_status_id_index` (`tenant_id`,`status_id`),
  ADD KEY `gs_contacts_tenant_id_created_at_index` (`tenant_id`,`created_at`),
  ADD KEY `idx_tenant_contact_search` (`tenant_id`,`firstname`,`lastname`,`email`,`phone`);

--
-- Indexes for table `gs_contact_notes`
--
ALTER TABLE `gs_contact_notes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `gs_contact_notes_contact_id_index` (`contact_id`),
  ADD KEY `gs_contact_notes_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `invoices`
--
ALTER TABLE `invoices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoices_currency_id_foreign` (`currency_id`),
  ADD KEY `invoices_subscription_id_foreign` (`subscription_id`),
  ADD KEY `invoices_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `invoice_items`
--
ALTER TABLE `invoice_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_items_invoice_id_foreign` (`invoice_id`);

--
-- Indexes for table `invoice_taxes`
--
ALTER TABLE `invoice_taxes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_taxes_invoice_id_index` (`invoice_id`),
  ADD KEY `invoice_taxes_tax_id_foreign` (`tax_id`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

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

--
-- Indexes for table `languages`
--
ALTER TABLE `languages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `languages_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `mamadil_chats`
--
ALTER TABLE `mamadil_chats`
  ADD PRIMARY KEY (`id`),
  ADD KEY `mamadil_chats_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `mamadil_chat_messages`
--
ALTER TABLE `mamadil_chat_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `mamadil_chat_messages_tenant_id_index` (`tenant_id`),
  ADD KEY `idx_message_id_tenant_id` (`message_id`,`tenant_id`);

--
-- Indexes for table `mamadil_contacts`
--
ALTER TABLE `mamadil_contacts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `mamadil_contacts_status_id_index` (`status_id`),
  ADD KEY `mamadil_contacts_source_id_index` (`source_id`),
  ADD KEY `mamadil_contacts_assigned_id_index` (`assigned_id`),
  ADD KEY `mamadil_contacts_type_index` (`type`),
  ADD KEY `mamadil_contacts_phone_index` (`phone`),
  ADD KEY `mamadil_contacts_firstname_lastname_index` (`firstname`,`lastname`),
  ADD KEY `mamadil_contacts_is_enabled_index` (`is_enabled`),
  ADD KEY `mamadil_contacts_tenant_id_index` (`tenant_id`),
  ADD KEY `mamadil_contacts_tenant_id_email_index` (`tenant_id`,`email`),
  ADD KEY `mamadil_contacts_tenant_id_phone_index` (`tenant_id`,`phone`),
  ADD KEY `mamadil_contacts_tenant_id_status_id_index` (`tenant_id`,`status_id`),
  ADD KEY `mamadil_contacts_tenant_id_created_at_index` (`tenant_id`,`created_at`),
  ADD KEY `idx_tenant_contact_search` (`tenant_id`,`firstname`,`lastname`,`email`,`phone`);

--
-- Indexes for table `mamadil_contact_notes`
--
ALTER TABLE `mamadil_contact_notes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `mamadil_contact_notes_contact_id_index` (`contact_id`),
  ADD KEY `mamadil_contact_notes_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `message_bots`
--
ALTER TABLE `message_bots`
  ADD PRIMARY KEY (`id`),
  ADD KEY `message_bots_tenant_id_index` (`tenant_id`);

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

--
-- Indexes for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD UNIQUE KEY `model_has_permissions_permission_model_type_unique` (`tenant_id`,`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`),
  ADD KEY `model_has_permissions_team_foreign_key_index` (`tenant_id`);

--
-- Indexes for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD UNIQUE KEY `model_has_roles_role_model_type_unique` (`tenant_id`,`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`),
  ADD KEY `model_has_roles_team_foreign_key_index` (`tenant_id`);

--
-- Indexes for table `module_validation_logs`
--
ALTER TABLE `module_validation_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `module_validation_logs_module_name_created_at_index` (`module_name`,`created_at`),
  ADD KEY `module_validation_logs_user_id_created_at_index` (`user_id`,`created_at`);

--
-- Indexes for table `pages`
--
ALTER TABLE `pages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `pages_slug_unique` (`slug`),
  ADD KEY `pages_parent_id_foreign` (`parent_id`);

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

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

--
-- Indexes for table `plans`
--
ALTER TABLE `plans`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `plans_name_unique` (`name`),
  ADD UNIQUE KEY `plans_slug_unique` (`slug`),
  ADD KEY `plans_is_active_slug_index` (`is_active`,`slug`);

--
-- Indexes for table `plan_features`
--
ALTER TABLE `plan_features`
  ADD PRIMARY KEY (`id`),
  ADD KEY `plan_features_plan_id_index` (`plan_id`),
  ADD KEY `plan_features_feature_id_index` (`feature_id`);

--
-- Indexes for table `pusher_notifications`
--
ALTER TABLE `pusher_notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pusher_notifications_tenant_id_index` (`tenant_id`);

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

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

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

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

--
-- Indexes for table `sources`
--
ALTER TABLE `sources`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sources_name_tenant_id_index` (`name`,`tenant_id`),
  ADD KEY `sources_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `statuses`
--
ALTER TABLE `statuses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `statuses_name_tenant_id_index` (`name`,`tenant_id`),
  ADD KEY `statuses_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `subscriptions`
--
ALTER TABLE `subscriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subscriptions_plan_id_foreign` (`plan_id`),
  ADD KEY `subscriptions_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `subscription_logs`
--
ALTER TABLE `subscription_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subscription_logs_subscription_id_foreign` (`subscription_id`),
  ADD KEY `subscription_logs_transaction_id_foreign` (`transaction_id`);

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

--
-- Indexes for table `template_bots`
--
ALTER TABLE `template_bots`
  ADD PRIMARY KEY (`id`),
  ADD KEY `template_bots_tenant_id_index` (`tenant_id`),
  ADD KEY `template_bots_template_id_foreign` (`template_id`);

--
-- Indexes for table `tenants`
--
ALTER TABLE `tenants`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tenants_subdomain_unique` (`subdomain`),
  ADD KEY `tenants_status_index` (`status`),
  ADD KEY `tenants_subdomain_index` (`subdomain`),
  ADD KEY `tenants_expires_at_index` (`expires_at`);

--
-- Indexes for table `tenant_credit_balances`
--
ALTER TABLE `tenant_credit_balances`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tenant_credit_balances_tenant_id_unique` (`tenant_id`),
  ADD KEY `tenant_credit_balances_currency_id_foreign` (`currency_id`);

--
-- Indexes for table `tenant_email_templates`
--
ALTER TABLE `tenant_email_templates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tenant_email_templates_created_by_foreign` (`created_by`),
  ADD KEY `tenant_email_templates_tenant_id_foreign` (`tenant_id`),
  ADD KEY `tenant_email_templates_updated_by_foreign` (`updated_by`);

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

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

--
-- Indexes for table `themes`
--
ALTER TABLE `themes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `themes_folder_unique` (`folder`);

--
-- Indexes for table `tickets`
--
ALTER TABLE `tickets`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tickets_ticket_id_unique` (`ticket_id`),
  ADD KEY `tickets_department_id_foreign` (`department_id`),
  ADD KEY `tickets_tenant_id_foreign` (`tenant_id`),
  ADD KEY `tickets_tenant_staff_id_foreign` (`tenant_staff_id`);

--
-- Indexes for table `ticket_replies`
--
ALTER TABLE `ticket_replies`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ticket_replies_ticket_id_foreign` (`ticket_id`),
  ADD KEY `ticket_replies_user_id_foreign` (`user_id`);

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `transactions_currency_id_foreign` (`currency_id`),
  ADD KEY `transactions_invoice_id_foreign` (`invoice_id`),
  ADD KEY `transactions_payment_method_id_foreign` (`payment_method_id`);

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

--
-- Indexes for table `webhook_logs`
--
ALTER TABLE `webhook_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `webhook_logs_model_event_status_created_at_tenant_id_index` (`model`,`event`,`status`,`created_at`,`tenant_id`),
  ADD KEY `webhook_logs_tenant_id_foreign` (`tenant_id`);

--
-- Indexes for table `whatsapp_templates`
--
ALTER TABLE `whatsapp_templates`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `whatsapp_templates_template_id_unique` (`template_id`),
  ADD KEY `whatsapp_templates_tenant_id_category_status_index` (`tenant_id`,`category`,`status`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `ai_prompts`
--
ALTER TABLE `ai_prompts`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bot_flows`
--
ALTER TABLE `bot_flows`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `campaigns`
--
ALTER TABLE `campaigns`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `campaign_details`
--
ALTER TABLE `campaign_details`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `canned_replies`
--
ALTER TABLE `canned_replies`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `contact_imports`
--
ALTER TABLE `contact_imports`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `credit_transactions`
--
ALTER TABLE `credit_transactions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `currencies`
--
ALTER TABLE `currencies`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `custom_fields`
--
ALTER TABLE `custom_fields`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `departments`
--
ALTER TABLE `departments`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `email_layouts`
--
ALTER TABLE `email_layouts`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `email_logs`
--
ALTER TABLE `email_logs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `email_templates`
--
ALTER TABLE `email_templates`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `faqs`
--
ALTER TABLE `faqs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `features`
--
ALTER TABLE `features`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `feature_limits`
--
ALTER TABLE `feature_limits`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `feature_usages`
--
ALTER TABLE `feature_usages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `groups`
--
ALTER TABLE `groups`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `gs_chats`
--
ALTER TABLE `gs_chats`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `gs_chat_messages`
--
ALTER TABLE `gs_chat_messages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `gs_contacts`
--
ALTER TABLE `gs_contacts`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `gs_contact_notes`
--
ALTER TABLE `gs_contact_notes`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `invoices`
--
ALTER TABLE `invoices`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `invoice_items`
--
ALTER TABLE `invoice_items`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT for table `invoice_taxes`
--
ALTER TABLE `invoice_taxes`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `languages`
--
ALTER TABLE `languages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `mamadil_chats`
--
ALTER TABLE `mamadil_chats`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `mamadil_chat_messages`
--
ALTER TABLE `mamadil_chat_messages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT for table `mamadil_contacts`
--
ALTER TABLE `mamadil_contacts`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mamadil_contact_notes`
--
ALTER TABLE `mamadil_contact_notes`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `message_bots`
--
ALTER TABLE `message_bots`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=65;

--
-- AUTO_INCREMENT for table `module_validation_logs`
--
ALTER TABLE `module_validation_logs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `pages`
--
ALTER TABLE `pages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `payment_methods`
--
ALTER TABLE `payment_methods`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=125;

--
-- AUTO_INCREMENT for table `plans`
--
ALTER TABLE `plans`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `plan_features`
--
ALTER TABLE `plan_features`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=310;

--
-- AUTO_INCREMENT for table `pusher_notifications`
--
ALTER TABLE `pusher_notifications`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sources`
--
ALTER TABLE `sources`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `statuses`
--
ALTER TABLE `statuses`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `subscriptions`
--
ALTER TABLE `subscriptions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `subscription_logs`
--
ALTER TABLE `subscription_logs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `taxes`
--
ALTER TABLE `taxes`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `template_bots`
--
ALTER TABLE `template_bots`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tenants`
--
ALTER TABLE `tenants`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tenant_credit_balances`
--
ALTER TABLE `tenant_credit_balances`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tenant_email_templates`
--
ALTER TABLE `tenant_email_templates`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tenant_languages`
--
ALTER TABLE `tenant_languages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `test_users`
--
ALTER TABLE `test_users`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `themes`
--
ALTER TABLE `themes`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tickets`
--
ALTER TABLE `tickets`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ticket_replies`
--
ALTER TABLE `ticket_replies`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `uploaded_files`
--
ALTER TABLE `uploaded_files`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `webhook_logs`
--
ALTER TABLE `webhook_logs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `whatsapp_templates`
--
ALTER TABLE `whatsapp_templates`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `ai_prompts`
--
ALTER TABLE `ai_prompts`
  ADD CONSTRAINT `ai_prompts_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `bot_flows`
--
ALTER TABLE `bot_flows`
  ADD CONSTRAINT `bot_flows_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `campaigns`
--
ALTER TABLE `campaigns`
  ADD CONSTRAINT `campaigns_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `campaign_details`
--
ALTER TABLE `campaign_details`
  ADD CONSTRAINT `campaign_details_campaign_id_foreign` FOREIGN KEY (`campaign_id`) REFERENCES `campaigns` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `campaign_details_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `canned_replies`
--
ALTER TABLE `canned_replies`
  ADD CONSTRAINT `canned_replies_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `credit_transactions`
--
ALTER TABLE `credit_transactions`
  ADD CONSTRAINT `credit_transactions_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`),
  ADD CONSTRAINT `credit_transactions_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `credit_transactions_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `custom_fields`
--
ALTER TABLE `custom_fields`
  ADD CONSTRAINT `custom_fields_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `email_logs`
--
ALTER TABLE `email_logs`
  ADD CONSTRAINT `email_logs_email_template_id_foreign` FOREIGN KEY (`email_template_id`) REFERENCES `email_templates` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `feature_limits`
--
ALTER TABLE `feature_limits`
  ADD CONSTRAINT `feature_limits_feature_id_foreign` FOREIGN KEY (`feature_id`) REFERENCES `features` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `feature_limits_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `feature_limits_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `feature_usages`
--
ALTER TABLE `feature_usages`
  ADD CONSTRAINT `feature_usages_subscription_id_foreign` FOREIGN KEY (`subscription_id`) REFERENCES `subscriptions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `feature_usages_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `groups`
--
ALTER TABLE `groups`
  ADD CONSTRAINT `groups_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `gs_chats`
--
ALTER TABLE `gs_chats`
  ADD CONSTRAINT `gs_chats_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `gs_chat_messages`
--
ALTER TABLE `gs_chat_messages`
  ADD CONSTRAINT `gs_chat_messages_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `gs_contacts`
--
ALTER TABLE `gs_contacts`
  ADD CONSTRAINT `gs_contacts_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `gs_contact_notes`
--
ALTER TABLE `gs_contact_notes`
  ADD CONSTRAINT `gs_contact_notes_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `gs_contacts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `gs_contact_notes_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `invoices`
--
ALTER TABLE `invoices`
  ADD CONSTRAINT `invoices_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`),
  ADD CONSTRAINT `invoices_subscription_id_foreign` FOREIGN KEY (`subscription_id`) REFERENCES `subscriptions` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `invoices_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

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

--
-- Constraints for table `invoice_taxes`
--
ALTER TABLE `invoice_taxes`
  ADD CONSTRAINT `invoice_taxes_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `invoice_taxes_tax_id_foreign` FOREIGN KEY (`tax_id`) REFERENCES `taxes` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `languages`
--
ALTER TABLE `languages`
  ADD CONSTRAINT `languages_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `mamadil_chats`
--
ALTER TABLE `mamadil_chats`
  ADD CONSTRAINT `mamadil_chats_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `mamadil_chat_messages`
--
ALTER TABLE `mamadil_chat_messages`
  ADD CONSTRAINT `mamadil_chat_messages_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `mamadil_contacts`
--
ALTER TABLE `mamadil_contacts`
  ADD CONSTRAINT `mamadil_contacts_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `mamadil_contact_notes`
--
ALTER TABLE `mamadil_contact_notes`
  ADD CONSTRAINT `mamadil_contact_notes_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `mamadil_contacts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `mamadil_contact_notes_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `message_bots`
--
ALTER TABLE `message_bots`
  ADD CONSTRAINT `message_bots_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

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

--
-- Constraints for table `payment_methods`
--
ALTER TABLE `payment_methods`
  ADD CONSTRAINT `payment_methods_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `plan_features`
--
ALTER TABLE `plan_features`
  ADD CONSTRAINT `plan_features_feature_id_foreign` FOREIGN KEY (`feature_id`) REFERENCES `features` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `plan_features_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `pusher_notifications`
--
ALTER TABLE `pusher_notifications`
  ADD CONSTRAINT `pusher_notifications_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

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

--
-- Constraints for table `sources`
--
ALTER TABLE `sources`
  ADD CONSTRAINT `sources_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `statuses`
--
ALTER TABLE `statuses`
  ADD CONSTRAINT `statuses_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `subscriptions`
--
ALTER TABLE `subscriptions`
  ADD CONSTRAINT `subscriptions_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`),
  ADD CONSTRAINT `subscriptions_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `subscription_logs`
--
ALTER TABLE `subscription_logs`
  ADD CONSTRAINT `subscription_logs_subscription_id_foreign` FOREIGN KEY (`subscription_id`) REFERENCES `subscriptions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `subscription_logs_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `template_bots`
--
ALTER TABLE `template_bots`
  ADD CONSTRAINT `template_bots_template_id_foreign` FOREIGN KEY (`template_id`) REFERENCES `whatsapp_templates` (`template_id`) ON DELETE SET NULL,
  ADD CONSTRAINT `template_bots_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tenant_credit_balances`
--
ALTER TABLE `tenant_credit_balances`
  ADD CONSTRAINT `tenant_credit_balances_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`),
  ADD CONSTRAINT `tenant_credit_balances_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tenant_email_templates`
--
ALTER TABLE `tenant_email_templates`
  ADD CONSTRAINT `tenant_email_templates_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tenant_email_templates_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tenant_email_templates_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `tickets`
--
ALTER TABLE `tickets`
  ADD CONSTRAINT `tickets_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tickets_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tickets_tenant_staff_id_foreign` FOREIGN KEY (`tenant_staff_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `ticket_replies`
--
ALTER TABLE `ticket_replies`
  ADD CONSTRAINT `ticket_replies_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ticket_replies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `transactions_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`),
  ADD CONSTRAINT `transactions_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `transactions_payment_method_id_foreign` FOREIGN KEY (`payment_method_id`) REFERENCES `payment_methods` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `webhook_logs`
--
ALTER TABLE `webhook_logs`
  ADD CONSTRAINT `webhook_logs_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `whatsapp_templates`
--
ALTER TABLE `whatsapp_templates`
  ADD CONSTRAINT `whatsapp_templates_tenant_id_foreign` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE;
COMMIT;

