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

START TRANSACTION;



--
-- Database: `smartlead_saas`
--
CREATE DATABASE IF NOT EXISTS `smartlead_saas` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE `smartlead_saas`;

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

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

CREATE TABLE `campaigns` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `smartlead_client_id` bigint UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `smartlead_campaign_id` bigint UNSIGNED NOT NULL,
  `smartlead_user_id` bigint UNSIGNED DEFAULT NULL,
  `smartlead_status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `smartlead_track_settings_json` longtext COLLATE utf8mb4_unicode_ci,
  `smartlead_scheduler_cron_json` longtext COLLATE utf8mb4_unicode_ci,
  `min_time_btwn_emails` int DEFAULT NULL,
  `max_leads_per_day` int DEFAULT NULL,
  `stop_lead_settings` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `schedule_start_time` datetime DEFAULT NULL,
  `enable_ai_esp_matching` tinyint(1) DEFAULT NULL,
  `send_as_plain_text` tinyint(1) DEFAULT NULL,
  `follow_up_percentage` int DEFAULT NULL,
  `unsubscribe_text` text COLLATE utf8mb4_unicode_ci,
  `parent_campaign_id` bigint UNSIGNED DEFAULT NULL,
  `smartlead_created_at` datetime DEFAULT NULL,
  `smartlead_updated_at` datetime DEFAULT NULL,
  `smartlead_last_synced_at` datetime DEFAULT NULL,
  `total_leads` int DEFAULT '0',
  `synced_leads_count` int NOT NULL DEFAULT '0',
  `last_synced_offset` int DEFAULT '0',
  `sync_status` tinyint DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `campaigns`
--

INSERT INTO `campaigns` (`id`, `tenant_id`, `smartlead_client_id`, `name`, `smartlead_campaign_id`, `smartlead_user_id`, `smartlead_status`, `smartlead_track_settings_json`, `smartlead_scheduler_cron_json`, `min_time_btwn_emails`, `max_leads_per_day`, `stop_lead_settings`, `schedule_start_time`, `enable_ai_esp_matching`, `send_as_plain_text`, `follow_up_percentage`, `unsubscribe_text`, `parent_campaign_id`, `smartlead_created_at`, `smartlead_updated_at`, `smartlead_last_synced_at`, `total_leads`, `synced_leads_count`, `last_synced_offset`, `sync_status`, `created_at`, `updated_at`) VALUES(1, 4, 244671, 'Empowers - Fast IT- Feb 2026', 2931637, 113367, 'ACTIVE', '[]', '{\"tz\":\"America/Chicago\",\"days\":[1,2,3,4,5],\"endHour\":\"16:00\",\"startHour\":\"08:00\"}', 6, 675, 'REPLY_TO_AN_EMAIL', '2026-02-12 14:00:00', 0, 0, 100, NULL, NULL, '2026-02-12 17:02:21', '2026-03-01 06:00:20', '2026-03-01 14:39:55', 0, 0, 0, 0, '2026-03-01 14:39:55', '2026-03-01 14:39:55');
INSERT INTO `campaigns` (`id`, `tenant_id`, `smartlead_client_id`, `name`, `smartlead_campaign_id`, `smartlead_user_id`, `smartlead_status`, `smartlead_track_settings_json`, `smartlead_scheduler_cron_json`, `min_time_btwn_emails`, `max_leads_per_day`, `stop_lead_settings`, `schedule_start_time`, `enable_ai_esp_matching`, `send_as_plain_text`, `follow_up_percentage`, `unsubscribe_text`, `parent_campaign_id`, `smartlead_created_at`, `smartlead_updated_at`, `smartlead_last_synced_at`, `total_leads`, `synced_leads_count`, `last_synced_offset`, `sync_status`, `created_at`, `updated_at`) VALUES(3, 3, 261147, 'Vinod Client 1 Campaign 1', 2982900, 113367, 'DRAFTED', '[\"DONT_TRACK_EMAIL_OPEN\"]', '{\"tz\":\"America/Chicago\",\"days\":[1],\"endHour\":\"18:00\",\"startHour\":\"09:00\"}', 10, 20, 'REPLY_TO_AN_EMAIL', '2026-03-20 01:52:00', 1, 0, 100, '', NULL, '2026-03-01 10:22:48', '2026-03-01 11:06:02', '2026-03-01 13:32:06', 7, 7, 8, 2, '2026-03-01 15:52:49', '2026-03-01 19:02:07');

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

--
-- Table structure for table `campaign_lead_events`
--

CREATE TABLE `campaign_lead_events` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `campaign_id` bigint UNSIGNED NOT NULL,
  `lead_id` bigint UNSIGNED NOT NULL,
  `campaign_lead_map_id` bigint UNSIGNED NOT NULL,
  `event_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `event_title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `event_description` text COLLATE utf8mb4_unicode_ci,
  `event_meta_json` longtext COLLATE utf8mb4_unicode_ci,
  `occurred_at` datetime NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `campaign_lead_events`
--

INSERT INTO `campaign_lead_events` (`id`, `tenant_id`, `campaign_id`, `lead_id`, `campaign_lead_map_id`, `event_type`, `event_title`, `event_description`, `event_meta_json`, `occurred_at`, `created_at`) VALUES(1, 3, 3, 15, 15, 'LEAD_DELETE', 'Lead deleted from campaign', 'Lead deleted from Smartlead first, then soft deleted locally while in STARTED state.', '{\"smartlead_status\":\"STARTED\",\"smartlead_campaign_id\":2982900,\"smartlead_lead_id\":3405161193,\"smartlead_delete_endpoint\":\"/api/v1/campaigns/2982900/leads/3405161193\",\"smartlead_delete_response\":null}', '2026-03-01 13:24:33', '2026-03-01 18:54:33');

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

--
-- Table structure for table `campaign_lead_map`
--

CREATE TABLE `campaign_lead_map` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `campaign_id` bigint UNSIGNED NOT NULL,
  `lead_id` bigint UNSIGNED NOT NULL,
  `smartlead_lead_id` bigint UNSIGNED DEFAULT NULL,
  `campaign_lead_map_id` bigint UNSIGNED DEFAULT NULL,
  `campaign_status` tinyint DEFAULT '1',
  `smartlead_status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `smartlead_created_at` datetime DEFAULT NULL,
  `is_deleted_in_smartlead` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_in_smartlead_at` datetime DEFAULT NULL,
  `last_seen_in_smartlead_at` datetime DEFAULT NULL,
  `last_synced_at` datetime DEFAULT NULL,
  `unsubscribed_at` datetime DEFAULT NULL,
  `replied_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `campaign_lead_map`
--

INSERT INTO `campaign_lead_map` (`id`, `tenant_id`, `campaign_id`, `lead_id`, `smartlead_lead_id`, `campaign_lead_map_id`, `campaign_status`, `smartlead_status`, `smartlead_created_at`, `is_deleted_in_smartlead`, `deleted_in_smartlead_at`, `last_seen_in_smartlead_at`, `last_synced_at`, `unsubscribed_at`, `replied_at`, `created_at`, `updated_at`) VALUES(1, 3, 3, 1, 3311882936, 2768249930, 1, 'STARTED', '2026-03-01 12:25:13', 0, NULL, '2026-03-01 12:55:07', '2026-03-01 12:55:07', NULL, NULL, '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `campaign_lead_map` (`id`, `tenant_id`, `campaign_id`, `lead_id`, `smartlead_lead_id`, `campaign_lead_map_id`, `campaign_status`, `smartlead_status`, `smartlead_created_at`, `is_deleted_in_smartlead`, `deleted_in_smartlead_at`, `last_seen_in_smartlead_at`, `last_synced_at`, `unsubscribed_at`, `replied_at`, `created_at`, `updated_at`) VALUES(2, 3, 3, 2, 3311882941, 2768249931, 1, 'STARTED', '2026-03-01 12:25:13', 0, NULL, '2026-03-01 12:55:07', '2026-03-01 12:55:07', NULL, NULL, '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `campaign_lead_map` (`id`, `tenant_id`, `campaign_id`, `lead_id`, `smartlead_lead_id`, `campaign_lead_map_id`, `campaign_status`, `smartlead_status`, `smartlead_created_at`, `is_deleted_in_smartlead`, `deleted_in_smartlead_at`, `last_seen_in_smartlead_at`, `last_synced_at`, `unsubscribed_at`, `replied_at`, `created_at`, `updated_at`) VALUES(3, 3, 3, 3, 3311882940, 2768249932, 1, 'STARTED', '2026-03-01 12:25:13', 0, NULL, '2026-03-01 12:55:07', '2026-03-01 12:55:07', NULL, NULL, '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `campaign_lead_map` (`id`, `tenant_id`, `campaign_id`, `lead_id`, `smartlead_lead_id`, `campaign_lead_map_id`, `campaign_status`, `smartlead_status`, `smartlead_created_at`, `is_deleted_in_smartlead`, `deleted_in_smartlead_at`, `last_seen_in_smartlead_at`, `last_synced_at`, `unsubscribed_at`, `replied_at`, `created_at`, `updated_at`) VALUES(4, 3, 3, 4, 3311882938, 2768249933, 1, 'STARTED', '2026-03-01 12:25:13', 0, NULL, '2026-03-01 12:55:07', '2026-03-01 12:55:07', NULL, NULL, '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `campaign_lead_map` (`id`, `tenant_id`, `campaign_id`, `lead_id`, `smartlead_lead_id`, `campaign_lead_map_id`, `campaign_status`, `smartlead_status`, `smartlead_created_at`, `is_deleted_in_smartlead`, `deleted_in_smartlead_at`, `last_seen_in_smartlead_at`, `last_synced_at`, `unsubscribed_at`, `replied_at`, `created_at`, `updated_at`) VALUES(5, 3, 3, 5, 3311882937, 2768249934, 1, 'STARTED', '2026-03-01 12:25:13', 0, NULL, '2026-03-01 12:55:07', '2026-03-01 12:55:07', NULL, NULL, '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `campaign_lead_map` (`id`, `tenant_id`, `campaign_id`, `lead_id`, `smartlead_lead_id`, `campaign_lead_map_id`, `campaign_status`, `smartlead_status`, `smartlead_created_at`, `is_deleted_in_smartlead`, `deleted_in_smartlead_at`, `last_seen_in_smartlead_at`, `last_synced_at`, `unsubscribed_at`, `replied_at`, `created_at`, `updated_at`) VALUES(6, 3, 3, 6, 3311882943, 2768249935, 1, 'STARTED', '2026-03-01 12:25:13', 0, NULL, '2026-03-01 12:55:07', '2026-03-01 12:55:07', NULL, NULL, '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `campaign_lead_map` (`id`, `tenant_id`, `campaign_id`, `lead_id`, `smartlead_lead_id`, `campaign_lead_map_id`, `campaign_status`, `smartlead_status`, `smartlead_created_at`, `is_deleted_in_smartlead`, `deleted_in_smartlead_at`, `last_seen_in_smartlead_at`, `last_synced_at`, `unsubscribed_at`, `replied_at`, `created_at`, `updated_at`) VALUES(7, 3, 3, 7, 3311882944, 2768249936, 1, 'STARTED', '2026-03-01 12:25:13', 0, NULL, '2026-03-01 12:55:07', '2026-03-01 12:55:07', NULL, NULL, '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `campaign_lead_map` (`id`, `tenant_id`, `campaign_id`, `lead_id`, `smartlead_lead_id`, `campaign_lead_map_id`, `campaign_status`, `smartlead_status`, `smartlead_created_at`, `is_deleted_in_smartlead`, `deleted_in_smartlead_at`, `last_seen_in_smartlead_at`, `last_synced_at`, `unsubscribed_at`, `replied_at`, `created_at`, `updated_at`) VALUES(15, 3, 3, 15, 3405161193, 2768269214, 1, 'STARTED', '2026-03-01 12:53:57', 1, '2026-03-01 13:24:33', '2026-03-01 12:55:07', '2026-03-01 13:24:33', NULL, NULL, '2026-03-01 18:23:58', '2026-03-01 18:54:33');

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

--
-- Table structure for table `campaign_lead_messages`
--

CREATE TABLE `campaign_lead_messages` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `campaign_id` bigint UNSIGNED NOT NULL,
  `lead_id` bigint UNSIGNED NOT NULL,
  `campaign_lead_map_id` bigint UNSIGNED NOT NULL,
  `direction` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject` text COLLATE utf8mb4_unicode_ci,
  `message_body` longtext COLLATE utf8mb4_unicode_ci,
  `smartlead_message_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `occurred_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `campaign_sequences`
--

CREATE TABLE `campaign_sequences` (
  `id` bigint UNSIGNED NOT NULL,
  `campaign_id` bigint UNSIGNED NOT NULL,
  `smartlead_sequence_id` bigint UNSIGNED NOT NULL,
  `email_campaign_id` bigint UNSIGNED DEFAULT NULL,
  `seq_number` int DEFAULT NULL,
  `seq_delay_details_json` longtext COLLATE utf8mb4_unicode_ci,
  `subject` text COLLATE utf8mb4_unicode_ci,
  `email_body` longtext COLLATE utf8mb4_unicode_ci,
  `sequence_variants_json` longtext COLLATE utf8mb4_unicode_ci,
  `smartlead_created_at` datetime DEFAULT NULL,
  `smartlead_updated_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `campaign_sequences`
--

INSERT INTO `campaign_sequences` (`id`, `campaign_id`, `smartlead_sequence_id`, `email_campaign_id`, `seq_number`, `seq_delay_details_json`, `subject`, `email_body`, `sequence_variants_json`, `smartlead_created_at`, `smartlead_updated_at`, `created_at`, `updated_at`) VALUES(1, 1, 6059596, 2931637, 1, '{\"delayInDays\":1}', '', '', '[{\"id\":4547758,\"created_at\":\"2026-02-12T17:44:04.402689+00:00\",\"updated_at\":\"2026-02-25T15:49:09.35387+00:00\",\"is_deleted\":false,\"subject\":\"{{First Name}} - Quick question about your IT hiring\",\"email_body\":\"<div>&nbsp;Hi {{First Name}},</div><div>&nbsp;</div><div>You have nothing to lose but to win by scheduling a free 10-minute call. I\\u2019ll show you how we can simplify your IT talent hiring and send you vetted candidates within 24\\u201348 hours.</div><div>&nbsp;<br>{{First Name}}, we cut our placement fees by 10% for life of the contracts signed before our Q1 cutoff. I\\u2019m happy to schedule a 10-minute meeting to see if this makes sense for your team.</div><div>Reply \\\"LET\\u2019S BOOK 10 MINUTES\\\" and I\\u2019ll send you a meeting slot with zero obligation where you can learn more.</div><div>&nbsp;</div><div>We are Empowers Staffing Inc., based in Saint Paul, MN, and we specialize in:</div><div>\\u2022 Contract</div><div>\\u2022 Direct hire</div><div>\\u2022 Contract-to-perm</div><div>\\u2022 Onshore and offshore</div><div>&nbsp;</div><div>Looking forward to helping you find the right talent!</div><div><br></div><div><br></div>\",\"email_campaign_seq_id\":6059596,\"variant_label\":\"A\",\"optional_email_body_1\":null,\"variant_distribution_percentage\":null,\"year\":2024,\"user_id\":113367},{\"id\":4547759,\"created_at\":\"2026-02-12T17:44:04.402689+00:00\",\"updated_at\":\"2026-02-25T15:49:09.360213+00:00\",\"is_deleted\":false,\"subject\":\"{{last_name}} - Quick question about your IT hiring\",\"email_body\":\"<div>Happy {{sl_day_of_week}},&nbsp;{{First Name}},</div><div>&nbsp;</div><div>Quick question - is your current hiring process for senior IT talent moving as fast as you\\u2019d like it to? &nbsp;</div><div><br>{{First Name}}, we cut our placement fees by 10% for life of the contracts signed before our Q1 cutoff. I\\u2019m happy to schedule a 10-minute meeting to see if this makes sense for your team.</div><div>&nbsp;</div><div>We partner with companies like Abbott Laboratories to line up vetted candidates within 24-48 hours, supporting contract, direct hire, and contract-to-perm roles (onshore and offshore).</div><div>&nbsp;</div><div>Looking forward to talking to you,</div><div>&nbsp;</div><div>Thanks</div>\",\"email_campaign_seq_id\":6059596,\"variant_label\":\"B\",\"optional_email_body_1\":null,\"variant_distribution_percentage\":null,\"year\":2024,\"user_id\":113367}]', '2026-02-12 17:24:47', '2026-02-25 15:49:09', '2026-03-01 14:39:55', '2026-03-01 14:39:55');
INSERT INTO `campaign_sequences` (`id`, `campaign_id`, `smartlead_sequence_id`, `email_campaign_id`, `seq_number`, `seq_delay_details_json`, `subject`, `email_body`, `sequence_variants_json`, `smartlead_created_at`, `smartlead_updated_at`, `created_at`, `updated_at`) VALUES(2, 1, 6059808, 2931637, 2, '{\"delayInDays\":2}', '', '', '[{\"id\":4547771,\"created_at\":\"2026-02-12T17:45:43.586612+00:00\",\"updated_at\":\"2026-02-25T15:49:09.370152+00:00\",\"is_deleted\":false,\"subject\":\"{{First Name}} - Following Up about your IT hiring\",\"email_body\":\"<div>Happy {{sl_day_of_week}},&nbsp;{{First Name}},</div><div>&nbsp;</div><div>This is a follow up from my previous note. {{First Name}}, we cut our placement fees by 10% for life of the contracts signed before our Q1 cutoff. I\\u2019m happy to schedule a 10-minute meeting to see if this makes sense for your team.</div><div>&nbsp;</div><div>We partner with companies like Abbott Laboratories to line up vetted IT candidates within 24-48 hours, supporting contract, direct hire, and contract-to-perm roles (onshore and offshore).</div><div>&nbsp;</div><div>Should I send you our website, or would you rather set a quick 10-minute conversation?</div><div>&nbsp;</div><div>Thanks,</div><div><div><br></div></div>\",\"email_campaign_seq_id\":6059808,\"variant_label\":\"A\",\"optional_email_body_1\":null,\"variant_distribution_percentage\":null,\"year\":2024,\"user_id\":113367},{\"id\":4547772,\"created_at\":\"2026-02-12T17:45:43.586612+00:00\",\"updated_at\":\"2026-02-25T15:49:09.374473+00:00\",\"is_deleted\":false,\"subject\":\"{{last_name}} - Following Up about your IT hiring\",\"email_body\":\"<div>Happy {{sl_day_of_week}},&nbsp;{{First Name}},</div><div>&nbsp;</div><div>I wanted to follow up in case my previous email got buried.</div><div>We\\u2019re currently partnering with companies that need senior IT talent quickly and are introducing vetted candidates within 24-48 hours (contract, direct hire, and contract-to-perm).</div><div>&nbsp;</div><div>If hiring is on your roadmap, would a brief 15-minute conversation make sense?</div><div>&nbsp;</div>Best,<div><br></div>\",\"email_campaign_seq_id\":6059808,\"variant_label\":\"B\",\"optional_email_body_1\":null,\"variant_distribution_percentage\":null,\"year\":2024,\"user_id\":113367}]', '2026-02-12 17:41:07', '2026-02-25 15:49:09', '2026-03-01 14:39:55', '2026-03-01 14:39:55');
INSERT INTO `campaign_sequences` (`id`, `campaign_id`, `smartlead_sequence_id`, `email_campaign_id`, `seq_number`, `seq_delay_details_json`, `subject`, `email_body`, `sequence_variants_json`, `smartlead_created_at`, `smartlead_updated_at`, `created_at`, `updated_at`) VALUES(3, 1, 6060079, 2931637, 3, '{\"delayInDays\":4}', '', '', '[{\"id\":4547921,\"created_at\":\"2026-02-12T17:56:06.292127+00:00\",\"updated_at\":\"2026-02-25T15:49:09.384786+00:00\",\"is_deleted\":false,\"subject\":\"{{first_name}}\\u00a0 -\\u00a0Checking in \\u2013 senior IT hiring\",\"email_body\":\"<div>Happy {{sl_day_of_week}},&nbsp;{{First Name}},</div><div><br></div><div>Just following up in case my previous emails got buried.</div><div>We at Empowers Staffing partner with companies to line up vetted senior IT candidates within 24\\u201348 hours, supporting contract, direct hire, and contract-to-perm roles (onshore and offshore).</div><div><br></div><div>Voted #1 IT staffing firm in the Midwest, we\\u2019ve helped dozens of teams hire faster without the usual delays.</div><div><br></div><div>If hiring senior IT talent is on your roadmap, would a brief 15-minute conversation make sense?</div><div><br></div><div>Thanks</div><div><br></div>\",\"email_campaign_seq_id\":6060079,\"variant_label\":\"A\",\"optional_email_body_1\":null,\"variant_distribution_percentage\":null,\"year\":2024,\"user_id\":113367},{\"id\":4547922,\"created_at\":\"2026-02-12T17:56:06.292127+00:00\",\"updated_at\":\"2026-02-25T15:49:09.385047+00:00\",\"is_deleted\":false,\"subject\":\"{{first_name}}\\u00a0 -\\u00a0Following up \\u2013 senior IT hiring\",\"email_body\":\"<div>Happy {{sl_day_of_week}},&nbsp;{{First Name}},</div><div>&nbsp;</div><div>Just following up in case my previous emails got buried.</div><div>We at Empowers Staffing partner with companies to line up vetted senior IT candidates within 24\\u201348 hours, supporting contract, direct hire, and contract-to-perm roles (onshore and offshore).</div><div>&nbsp;</div><div>Empowers Staffing voted the fastest-growing IT staffing companies in the Midwest, we\\u2019ve helped numerous teams accelerate hiring and avoid weeks of delays.</div><div>&nbsp;</div><div>If hiring senior IT talent is on your roadmap, would a brief 15-minute conversation make sense?</div><div>&nbsp;</div><div>Thanks,</div><div><br></div>\",\"email_campaign_seq_id\":6060079,\"variant_label\":\"B\",\"optional_email_body_1\":null,\"variant_distribution_percentage\":null,\"year\":2024,\"user_id\":113367}]', '2026-02-12 17:47:21', '2026-02-25 15:49:09', '2026-03-01 14:39:55', '2026-03-01 14:39:55');
INSERT INTO `campaign_sequences` (`id`, `campaign_id`, `smartlead_sequence_id`, `email_campaign_id`, `seq_number`, `seq_delay_details_json`, `subject`, `email_body`, `sequence_variants_json`, `smartlead_created_at`, `smartlead_updated_at`, `created_at`, `updated_at`) VALUES(4, 1, 6060347, 2931637, 4, '{\"delayInDays\":4}', '', '', '[{\"id\":4548043,\"created_at\":\"2026-02-12T18:04:05.629212+00:00\",\"updated_at\":\"2026-02-25T15:49:09.393995+00:00\",\"is_deleted\":false,\"subject\":\"{{last_name}} - Should I close your file?\",\"email_body\":\"<div>Hello {{First Name}},</div><div>&nbsp;</div><div>I know things get busy, so I\\u2019ll keep this brief.</div><div>We at Empowers Staffing partner with companies to line up vetted senior IT candidates within 24\\u201348 hours contract, direct hire, or contract-to-perm (onshore/offshore).</div><div>&nbsp;</div><div>Voted #1 IT staffing firm in the Midwest, we\\u2019ve helped dozens of teams hire faster without the usual delays.</div><div>&nbsp;</div><div>If hiring senior IT talent is still on your roadmap, would a quick 15-minute conversation make sense? Otherwise, I won\\u2019t follow up again.</div><div>&nbsp;</div><div>&nbsp;</div><div>Thanks,</div><div><br></div>\",\"email_campaign_seq_id\":6060347,\"variant_label\":\"A\",\"optional_email_body_1\":null,\"variant_distribution_percentage\":null,\"year\":2024,\"user_id\":113367},{\"id\":4548044,\"created_at\":\"2026-02-12T18:04:05.629212+00:00\",\"updated_at\":\"2026-02-25T15:49:09.394661+00:00\",\"is_deleted\":false,\"subject\":\"{{last_name}} -\\u00a0Last attempt \\u2013 senior IT roles\",\"email_body\":\"<div>Hello {{First Name}},</div><div>&nbsp;</div><div>I realize now might not be the right time, so this will be my final note.</div><div>We at Empowers Staffing, one of the fastest-growing IT staffing firms in the Midwest, partner with companies to quickly line up vetted senior IT talent contract, direct hire, or contract-to-perm.</div><div>&nbsp;</div><div>If hiring senior IT roles becomes a priority, I\\u2019d be glad to schedule a brief 15-minute conversation.</div><div>&nbsp;</div><div>Thanks for your time,</div><div><br></div>\",\"email_campaign_seq_id\":6060347,\"variant_label\":\"B\",\"optional_email_body_1\":null,\"variant_distribution_percentage\":null,\"year\":2024,\"user_id\":113367}]', '2026-02-12 17:59:44', '2026-02-25 15:49:09', '2026-03-01 14:39:55', '2026-03-01 14:39:55');
INSERT INTO `campaign_sequences` (`id`, `campaign_id`, `smartlead_sequence_id`, `email_campaign_id`, `seq_number`, `seq_delay_details_json`, `subject`, `email_body`, `sequence_variants_json`, `smartlead_created_at`, `smartlead_updated_at`, `created_at`, `updated_at`) VALUES(8, 3, 6309670, 2982900, 1, '{\"delayInDays\":1}', 'Hi Vinod', 'Hi Vinod Body seq1', '[]', '2026-03-01 11:12:22', '2026-03-01 11:12:22', '2026-03-01 16:42:23', '2026-03-01 16:42:23');

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

--
-- Table structure for table `custom_field_definitions`
--

CREATE TABLE `custom_field_definitions` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `field_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `field_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `leads_master`
--

CREATE TABLE `leads_master` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `smartlead_client_id` bigint UNSIGNED NOT NULL DEFAULT '0',
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_hash` binary(16) NOT NULL,
  `first_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `location` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_globally_suppressed` tinyint(1) DEFAULT '0',
  `globally_suppressed_at` datetime DEFAULT NULL,
  `last_synced_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `leads_master`
--

INSERT INTO `leads_master` (`id`, `tenant_id`, `smartlead_client_id`, `email`, `email_hash`, `first_name`, `last_name`, `company_name`, `location`, `is_globally_suppressed`, `globally_suppressed_at`, `last_synced_at`, `created_at`, `updated_at`) VALUES(1, 3, 261147, 'phpweblamp+25@gmail.com', 0xfc49c70830bd2811bc7b41cc7ccbc009, 'Vinod32', 'Ram32', 'Test_Comp_1', NULL, 0, NULL, '2026-03-01 12:55:07', '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `leads_master` (`id`, `tenant_id`, `smartlead_client_id`, `email`, `email_hash`, `first_name`, `last_name`, `company_name`, `location`, `is_globally_suppressed`, `globally_suppressed_at`, `last_synced_at`, `created_at`, `updated_at`) VALUES(2, 3, 261147, 'phpweblamp+26@gmail.com', 0x7c889b6605db708cd01646948cc4e67a, 'Vinod33', 'Ram33', 'Test_Comp_2', NULL, 0, NULL, '2026-03-01 12:55:07', '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `leads_master` (`id`, `tenant_id`, `smartlead_client_id`, `email`, `email_hash`, `first_name`, `last_name`, `company_name`, `location`, `is_globally_suppressed`, `globally_suppressed_at`, `last_synced_at`, `created_at`, `updated_at`) VALUES(3, 3, 261147, 'phpweblamp+27@gmail.com', 0x49b5ce687bfdf75a36eb3421488f9383, 'Vinod34', 'Ram34', 'Test_Comp_3', NULL, 0, NULL, '2026-03-01 12:55:07', '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `leads_master` (`id`, `tenant_id`, `smartlead_client_id`, `email`, `email_hash`, `first_name`, `last_name`, `company_name`, `location`, `is_globally_suppressed`, `globally_suppressed_at`, `last_synced_at`, `created_at`, `updated_at`) VALUES(4, 3, 261147, 'phpweblamp+28@gmail.com', 0x8a7efc1062237865de5f0db79e9fbfd4, 'Vinod35', 'Ram35', 'Test_Comp_4', NULL, 0, NULL, '2026-03-01 12:55:07', '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `leads_master` (`id`, `tenant_id`, `smartlead_client_id`, `email`, `email_hash`, `first_name`, `last_name`, `company_name`, `location`, `is_globally_suppressed`, `globally_suppressed_at`, `last_synced_at`, `created_at`, `updated_at`) VALUES(5, 3, 261147, 'phpweblamp+29@gmail.com', 0x9abf04af1cc2a188e65df309f2b8f3a0, 'Vinod36', 'Ram36', 'Test_Comp_5', NULL, 0, NULL, '2026-03-01 12:55:07', '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `leads_master` (`id`, `tenant_id`, `smartlead_client_id`, `email`, `email_hash`, `first_name`, `last_name`, `company_name`, `location`, `is_globally_suppressed`, `globally_suppressed_at`, `last_synced_at`, `created_at`, `updated_at`) VALUES(6, 3, 261147, 'phpweblamp+30@gmail.com', 0xf67860c61c0dd3e926431938071af09e, 'Vinod37', 'Ram37', 'Test_Comp_6', NULL, 0, NULL, '2026-03-01 12:55:07', '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `leads_master` (`id`, `tenant_id`, `smartlead_client_id`, `email`, `email_hash`, `first_name`, `last_name`, `company_name`, `location`, `is_globally_suppressed`, `globally_suppressed_at`, `last_synced_at`, `created_at`, `updated_at`) VALUES(7, 3, 261147, 'phpweblamp+31@gmail.com', 0x9f21c03b860767b6845ec74c6c815a82, 'Vinod38', 'Ram38', 'Test_Comp_7', NULL, 0, NULL, '2026-03-01 12:55:07', '2026-03-01 17:58:08', '2026-03-01 18:25:07');
INSERT INTO `leads_master` (`id`, `tenant_id`, `smartlead_client_id`, `email`, `email_hash`, `first_name`, `last_name`, `company_name`, `location`, `is_globally_suppressed`, `globally_suppressed_at`, `last_synced_at`, `created_at`, `updated_at`) VALUES(15, 3, 261147, 'cristiano@example.com', 0x8415f0f7e4bd74ef905e918b0b8717dc, 'Cristiano', 'Ronaldo', 'Manchester United', 'London', 0, NULL, '2026-03-01 12:55:07', '2026-03-01 18:23:58', '2026-03-01 18:25:07');

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

--
-- Table structure for table `lead_custom_field_values`
--

CREATE TABLE `lead_custom_field_values` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `lead_id` bigint UNSIGNED NOT NULL,
  `field_id` bigint UNSIGNED NOT NULL,
  `field_value` text COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `tenants` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `logo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `logo_url` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `smartlead_client_id` bigint UNSIGNED DEFAULT NULL,
  `smartlead_api_ok` tinyint(1) DEFAULT NULL,
  `smartlead_api_response` longtext COLLATE utf8mb4_unicode_ci,
  `smartlead_api_synced_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `tenants` (`id`, `name`, `logo`, `logo_url`, `smartlead_client_id`, `smartlead_api_ok`, `smartlead_api_response`, `smartlead_api_synced_at`, `created_at`, `updated_at`) VALUES(1, 'Global Admin', 'Global Admin', NULL, NULL, NULL, NULL, NULL, '2026-02-28 23:11:48', '2026-02-28 23:11:48');
INSERT INTO `tenants` (`id`, `name`, `logo`, `logo_url`, `smartlead_client_id`, `smartlead_api_ok`, `smartlead_api_response`, `smartlead_api_synced_at`, `created_at`, `updated_at`) VALUES(2, 'Internal Tenant', 'Internal Tenant', NULL, 262268, 1, '{\"ok\":true,\"message\":\"Client created in Smartlead.\",\"status_code\":0,\"clientId\":262268,\"response\":{\"ok\":true,\"clientId\":262268,\"name\":\"Internal Tenant Admin\",\"email\":\"tenant.admin@internal.test\",\"password\":\"Password@123\"},\"request\":{\"name\":\"Internal Tenant Admin\",\"email\":\"tenant.admin@internal.test\",\"permission\":[\"reply_master_inbox\"],\"logo\":\"Internal Tenant\",\"logo_url\":null}}', '2026-03-01 12:58:42', '2026-02-28 23:11:48', '2026-03-01 12:58:42');
INSERT INTO `tenants` (`id`, `name`, `logo`, `logo_url`, `smartlead_client_id`, `smartlead_api_ok`, `smartlead_api_response`, `smartlead_api_synced_at`, `created_at`, `updated_at`) VALUES(3, 'Vin1', 'Vin1', 'https://localhost.vinod/empower-laserguide/smartlead-saas/uploads/tenant-logos/tenant-logo-20260228175621-1ef48b0d025c.png', 261147, 1, '{\"ok\":true,\"message\":\"Client created in Smartlead.\",\"status_code\":0,\"clientId\":261147,\"response\":{\"ok\":true,\"clientId\":261147,\"name\":\"Vinod Client 1\",\"email\":\"vinodkram@gmail.com\",\"password\":\"Vinod Client 1\"},\"request\":{\"name\":\"Vinod Client 1\",\"email\":\"vinodkram@gmail.com\",\"permission\":[\"reply_master_inbox\"],\"logo\":\"Vin1\",\"logo_url\":\"https://localhost.vinod/empower-laserguide/smartlead-saas/uploads/tenant-logos/tenant-logo-20260228175621-1ef48b0d025c.png\"}}', '2026-02-28 23:26:22', '2026-02-28 23:26:21', '2026-02-28 23:55:30');
INSERT INTO `tenants` (`id`, `name`, `logo`, `logo_url`, `smartlead_client_id`, `smartlead_api_ok`, `smartlead_api_response`, `smartlead_api_synced_at`, `created_at`, `updated_at`) VALUES(4, 'Empowers Staffing Inc', 'Empowers Staffing Inc', NULL, 244671, 1, '{\"ok\":true,\"source\":\"smartlead_client_list_import\",\"clientId\":244671,\"response\":{\"id\":244671,\"name\":\"Empowers Staffing Inc\",\"email\":\"ckmarriott@empowersstaffing.com\",\"uuid\":\"bdc4ecb5-06c3-492a-a897-9a86c67a31fb\",\"created_at\":\"2026-02-12T16:57:48.882Z\",\"user_id\":113367,\"logo\":\"Empowers Staffing Inc\",\"logo_url\":null,\"client_permision\":{\"permission\":[\"reply_master_inbox\"],\"retricted_category\":[]}}}', '2026-03-01 12:55:50', '2026-03-01 12:55:50', '2026-03-01 12:55:50');

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

--
-- Table structure for table `tenant_roles`
--

CREATE TABLE `tenant_roles` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `role_key` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tenant_roles`
--

INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(1, 1, 'global_admin', 'Global Admin', '2026-02-28 20:15:35', '2026-02-28 20:15:35');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(2, 1, 'tenant_admin', 'Tenant Admin', '2026-02-28 20:15:35', '2026-02-28 20:15:35');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(3, 1, 'campaign_manager', 'Campaign Manager', '2026-02-28 20:15:35', '2026-02-28 20:15:35');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(4, 1, 'campaign_viewer', 'Campaign Viewer', '2026-02-28 20:15:35', '2026-02-28 20:15:35');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(5, 2, 'tenant_admin', 'Tenant Admin', '2026-02-28 20:15:35', '2026-02-28 20:15:35');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(6, 2, 'campaign_manager', 'Campaign Manager', '2026-02-28 20:15:35', '2026-02-28 20:15:35');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(7, 2, 'campaign_viewer', 'Campaign Viewer', '2026-02-28 20:15:35', '2026-02-28 20:15:35');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(8, 3, 'tenant_admin', 'Tenant Admin', '2026-02-28 23:26:21', '2026-02-28 23:26:21');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(9, 3, 'campaign_manager', 'Campaign Manager', '2026-02-28 23:26:21', '2026-02-28 23:26:21');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(10, 3, 'campaign_viewer', 'Campaign Viewer', '2026-02-28 23:26:21', '2026-02-28 23:26:21');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(11, 4, 'tenant_admin', 'Tenant Admin', '2026-03-01 12:55:50', '2026-03-01 12:55:50');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(12, 4, 'campaign_manager', 'Campaign Manager', '2026-03-01 12:55:50', '2026-03-01 12:55:50');
INSERT INTO `tenant_roles` (`id`, `tenant_id`, `role_key`, `role_name`, `created_at`, `updated_at`) VALUES(13, 4, 'campaign_viewer', 'Campaign Viewer', '2026-03-01 12:55:50', '2026-03-01 12:55:50');

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

--
-- Table structure for table `tenant_role_permissions`
--

CREATE TABLE `tenant_role_permissions` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED NOT NULL,
  `permission_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tenant_role_permissions`
--

INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(1, 1, 3, 'campaign.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(2, 1, 3, 'campaign.create', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(3, 1, 3, 'campaign.edit', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(4, 1, 4, 'campaign.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(5, 1, 1, 'campaign.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(6, 1, 1, 'campaign.create', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(7, 1, 1, 'campaign.edit', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(8, 1, 1, 'campaign.delete', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(9, 1, 1, 'role.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(10, 1, 1, 'role.create', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(11, 1, 1, 'role.edit', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(12, 1, 1, 'role.delete', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(13, 1, 1, 'reply_master_inbox', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(14, 1, 2, 'campaign.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(15, 1, 2, 'campaign.create', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(16, 1, 2, 'campaign.edit', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(17, 1, 2, 'campaign.delete', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(18, 1, 2, 'role.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(19, 1, 2, 'role.create', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(20, 1, 2, 'role.edit', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(21, 1, 2, 'role.delete', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(22, 1, 2, 'reply_master_inbox', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(23, 2, 6, 'campaign.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(24, 2, 6, 'campaign.create', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(25, 2, 6, 'campaign.edit', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(26, 2, 7, 'campaign.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(27, 2, 5, 'campaign.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(28, 2, 5, 'campaign.create', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(29, 2, 5, 'campaign.edit', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(30, 2, 5, 'campaign.delete', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(31, 2, 5, 'role.view', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(32, 2, 5, 'role.create', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(33, 2, 5, 'role.edit', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(34, 2, 5, 'role.delete', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(35, 2, 5, 'reply_master_inbox', '2026-02-28 20:15:35');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(64, 3, 8, 'campaign.view', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(65, 3, 8, 'campaign.create', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(66, 3, 8, 'campaign.edit', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(67, 3, 8, 'campaign.delete', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(68, 3, 8, 'role.view', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(69, 3, 8, 'role.create', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(70, 3, 8, 'role.edit', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(71, 3, 8, 'role.delete', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(72, 3, 9, 'campaign.view', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(73, 3, 9, 'campaign.create', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(74, 3, 9, 'campaign.edit', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(75, 3, 10, 'campaign.view', '2026-02-28 23:26:21');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(76, 4, 11, 'campaign.view', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(77, 4, 11, 'campaign.create', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(78, 4, 11, 'campaign.edit', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(79, 4, 11, 'campaign.delete', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(80, 4, 11, 'role.view', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(81, 4, 11, 'role.create', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(82, 4, 11, 'role.edit', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(83, 4, 11, 'role.delete', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(84, 4, 12, 'campaign.view', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(85, 4, 12, 'campaign.create', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(86, 4, 12, 'campaign.edit', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(87, 4, 13, 'campaign.view', '2026-03-01 12:55:50');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(88, 1, 3, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(89, 1, 3, 'campaign.lead.upload', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(90, 1, 3, 'campaign.lead.sync', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(91, 1, 3, 'campaign.lead.edit', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(92, 1, 3, 'campaign.lead.delete', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(93, 1, 4, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(94, 1, 1, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(95, 1, 1, 'campaign.lead.upload', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(96, 1, 1, 'campaign.lead.sync', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(97, 1, 1, 'campaign.lead.edit', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(98, 1, 1, 'campaign.lead.delete', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(99, 1, 2, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(100, 1, 2, 'campaign.lead.upload', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(101, 1, 2, 'campaign.lead.sync', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(102, 1, 2, 'campaign.lead.edit', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(103, 1, 2, 'campaign.lead.delete', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(104, 2, 6, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(105, 2, 6, 'campaign.lead.upload', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(106, 2, 6, 'campaign.lead.sync', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(107, 2, 6, 'campaign.lead.edit', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(108, 2, 6, 'campaign.lead.delete', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(109, 2, 7, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(110, 2, 5, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(111, 2, 5, 'campaign.lead.upload', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(112, 2, 5, 'campaign.lead.sync', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(113, 2, 5, 'campaign.lead.edit', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(114, 2, 5, 'campaign.lead.delete', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(115, 3, 9, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(116, 3, 9, 'campaign.lead.upload', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(117, 3, 9, 'campaign.lead.sync', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(118, 3, 9, 'campaign.lead.edit', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(119, 3, 9, 'campaign.lead.delete', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(120, 3, 10, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(121, 3, 8, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(122, 3, 8, 'campaign.lead.upload', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(123, 3, 8, 'campaign.lead.sync', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(124, 3, 8, 'campaign.lead.edit', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(125, 3, 8, 'campaign.lead.delete', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(126, 4, 12, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(127, 4, 12, 'campaign.lead.upload', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(128, 4, 12, 'campaign.lead.sync', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(129, 4, 12, 'campaign.lead.edit', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(130, 4, 12, 'campaign.lead.delete', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(131, 4, 13, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(132, 4, 11, 'campaign.lead.view', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(133, 4, 11, 'campaign.lead.upload', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(134, 4, 11, 'campaign.lead.sync', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(135, 4, 11, 'campaign.lead.edit', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(136, 4, 11, 'campaign.lead.delete', '2026-03-01 19:05:18');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(152, 1, 1, 'user.view', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(153, 1, 1, 'user.create', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(154, 1, 1, 'user.edit', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(155, 1, 1, 'user.delete', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(156, 1, 2, 'user.view', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(157, 1, 2, 'user.create', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(158, 1, 2, 'user.edit', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(159, 1, 2, 'user.delete', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(160, 2, 5, 'user.view', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(161, 2, 5, 'user.create', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(162, 2, 5, 'user.edit', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(163, 2, 5, 'user.delete', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(164, 3, 8, 'user.view', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(165, 3, 8, 'user.create', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(166, 3, 8, 'user.edit', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(167, 3, 8, 'user.delete', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(168, 4, 11, 'user.view', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(169, 4, 11, 'user.create', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(170, 4, 11, 'user.edit', '2026-03-01 19:30:58');
INSERT INTO `tenant_role_permissions` (`id`, `tenant_id`, `role_id`, `permission_key`, `created_at`) VALUES(171, 4, 11, 'user.delete', '2026-03-01 19:30:58');

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

--
-- Table structure for table `tenant_smartlead_permissions`
--

CREATE TABLE `tenant_smartlead_permissions` (
  `id` bigint UNSIGNED NOT NULL,
  `tenant_id` bigint UNSIGNED NOT NULL,
  `permission_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tenant_smartlead_permissions`
--

INSERT INTO `tenant_smartlead_permissions` (`id`, `tenant_id`, `permission_key`, `created_at`) VALUES(1, 1, 'full_access', '2026-02-28 22:57:36');
INSERT INTO `tenant_smartlead_permissions` (`id`, `tenant_id`, `permission_key`, `created_at`) VALUES(2, 2, 'reply_master_inbox', '2026-02-28 22:57:36');
INSERT INTO `tenant_smartlead_permissions` (`id`, `tenant_id`, `permission_key`, `created_at`) VALUES(4, 3, 'reply_master_inbox', '2026-02-28 23:55:30');
INSERT INTO `tenant_smartlead_permissions` (`id`, `tenant_id`, `permission_key`, `created_at`) VALUES(5, 4, 'reply_master_inbox', '2026-03-01 12:55:50');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `campaigns`
--
ALTER TABLE `campaigns`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_tenant_campaign` (`tenant_id`,`smartlead_campaign_id`),
  ADD UNIQUE KEY `uq_campaigns_tenant_id_id` (`tenant_id`,`id`),
  ADD KEY `idx_tenant` (`tenant_id`),
  ADD KEY `idx_sync` (`sync_status`),
  ADD KEY `idx_parent_campaign_id` (`parent_campaign_id`);

--
-- Indexes for table `campaign_lead_events`
--
ALTER TABLE `campaign_lead_events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_campaign_lead_map` (`tenant_id`,`campaign_id`,`campaign_lead_map_id`),
  ADD KEY `idx_occurred_at` (`occurred_at`),
  ADD KEY `idx_cle_tenant_lead_occurred_id` (`tenant_id`,`lead_id`,`occurred_at`,`id`);

--
-- Indexes for table `campaign_lead_map`
--
ALTER TABLE `campaign_lead_map`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_campaign_lead` (`tenant_id`,`campaign_id`,`lead_id`),
  ADD UNIQUE KEY `uq_campaign_lead_map_tenant_id_id` (`tenant_id`,`id`),
  ADD UNIQUE KEY `uq_campaign_lead_map_tenant_campaign_id_id` (`tenant_id`,`campaign_id`,`id`),
  ADD KEY `idx_campaign` (`tenant_id`,`campaign_id`),
  ADD KEY `idx_lead` (`tenant_id`,`lead_id`),
  ADD KEY `idx_status` (`campaign_status`),
  ADD KEY `idx_deleted` (`is_deleted_in_smartlead`),
  ADD KEY `idx_clm_tenant_campaign_status_id` (`tenant_id`,`campaign_id`,`campaign_status`,`id`),
  ADD KEY `idx_clm_tenant_campaign_deleted_id` (`tenant_id`,`campaign_id`,`is_deleted_in_smartlead`,`id`),
  ADD KEY `idx_clm_tenant_lead_status_id` (`tenant_id`,`lead_id`,`campaign_status`,`id`);

--
-- Indexes for table `campaign_lead_messages`
--
ALTER TABLE `campaign_lead_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_campaign_lead_map` (`tenant_id`,`campaign_id`,`campaign_lead_map_id`),
  ADD KEY `idx_occurred_at` (`occurred_at`),
  ADD KEY `idx_clm_msg_tenant_lead_occurred_id` (`tenant_id`,`lead_id`,`occurred_at`,`id`);

--
-- Indexes for table `campaign_sequences`
--
ALTER TABLE `campaign_sequences`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_campaign_sequence` (`campaign_id`,`smartlead_sequence_id`),
  ADD KEY `idx_campaign` (`campaign_id`);

--
-- Indexes for table `custom_field_definitions`
--
ALTER TABLE `custom_field_definitions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_tenant_field` (`tenant_id`,`field_key`),
  ADD UNIQUE KEY `uq_custom_field_definitions_tenant_id_id` (`tenant_id`,`id`),
  ADD KEY `idx_tenant` (`tenant_id`);

--
-- Indexes for table `leads_master`
--
ALTER TABLE `leads_master`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_tenant_client_email` (`tenant_id`,`smartlead_client_id`,`email_hash`),
  ADD UNIQUE KEY `uq_leads_master_tenant_id_id` (`tenant_id`,`id`),
  ADD KEY `idx_tenant` (`tenant_id`),
  ADD KEY `idx_global` (`is_globally_suppressed`),
  ADD KEY `idx_tenant_client` (`tenant_id`,`smartlead_client_id`),
  ADD KEY `idx_leads_tenant_synced_id` (`tenant_id`,`last_synced_at`,`id`),
  ADD KEY `idx_leads_tenant_created_id` (`tenant_id`,`created_at`,`id`);

--
-- Indexes for table `lead_custom_field_values`
--
ALTER TABLE `lead_custom_field_values`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_lead_field` (`tenant_id`,`lead_id`,`field_id`),
  ADD KEY `idx_lead` (`tenant_id`,`lead_id`),
  ADD KEY `idx_lcfv_field_id` (`field_id`),
  ADD KEY `fk_lcfv_field_tenant_safe` (`tenant_id`,`field_id`);

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

--
-- Indexes for table `tenant_roles`
--
ALTER TABLE `tenant_roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_tenant_role` (`tenant_id`,`role_key`),
  ADD UNIQUE KEY `uniq_tenant_role_name` (`tenant_id`,`role_name`),
  ADD UNIQUE KEY `uq_tenant_roles_tenant_id_id` (`tenant_id`,`id`),
  ADD KEY `idx_tenant` (`tenant_id`);

--
-- Indexes for table `tenant_role_permissions`
--
ALTER TABLE `tenant_role_permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_role_permission` (`tenant_id`,`role_id`,`permission_key`),
  ADD KEY `idx_tenant_role` (`tenant_id`,`role_id`),
  ADD KEY `idx_permission` (`permission_key`);

--
-- Indexes for table `tenant_smartlead_permissions`
--
ALTER TABLE `tenant_smartlead_permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_tenant_smartlead_permission` (`tenant_id`,`permission_key`),
  ADD KEY `idx_tenant` (`tenant_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `lead_custom_field_values`
--
ALTER TABLE `lead_custom_field_values`
  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=5;

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `campaigns`
--
ALTER TABLE `campaigns`
  ADD CONSTRAINT `fk_campaigns_parent_campaign` FOREIGN KEY (`parent_campaign_id`) REFERENCES `campaigns` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_campaigns_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `campaign_lead_events`
--
ALTER TABLE `campaign_lead_events`
  ADD CONSTRAINT `fk_cle_campaign_map_tenant_safe` FOREIGN KEY (`tenant_id`,`campaign_id`,`campaign_lead_map_id`) REFERENCES `campaign_lead_map` (`tenant_id`, `campaign_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_cle_campaign_tenant_safe` FOREIGN KEY (`tenant_id`,`campaign_id`) REFERENCES `campaigns` (`tenant_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_cle_lead_tenant_safe` FOREIGN KEY (`tenant_id`,`lead_id`) REFERENCES `leads_master` (`tenant_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_cle_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `campaign_lead_map`
--
ALTER TABLE `campaign_lead_map`
  ADD CONSTRAINT `fk_clm_campaign_tenant_safe` FOREIGN KEY (`tenant_id`,`campaign_id`) REFERENCES `campaigns` (`tenant_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_clm_lead_tenant_safe` FOREIGN KEY (`tenant_id`,`lead_id`) REFERENCES `leads_master` (`tenant_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_clm_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `campaign_lead_messages`
--
ALTER TABLE `campaign_lead_messages`
  ADD CONSTRAINT `fk_clmsg_campaign_map_tenant_safe` FOREIGN KEY (`tenant_id`,`campaign_id`,`campaign_lead_map_id`) REFERENCES `campaign_lead_map` (`tenant_id`, `campaign_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_clmsg_campaign_tenant_safe` FOREIGN KEY (`tenant_id`,`campaign_id`) REFERENCES `campaigns` (`tenant_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_clmsg_lead_tenant_safe` FOREIGN KEY (`tenant_id`,`lead_id`) REFERENCES `leads_master` (`tenant_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_clmsg_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `campaign_sequences`
--
ALTER TABLE `campaign_sequences`
  ADD CONSTRAINT `fk_campaign_sequences_campaign` FOREIGN KEY (`campaign_id`) REFERENCES `campaigns` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `custom_field_definitions`
--
ALTER TABLE `custom_field_definitions`
  ADD CONSTRAINT `fk_cfd_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `leads_master`
--
ALTER TABLE `leads_master`
  ADD CONSTRAINT `fk_leads_master_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `lead_custom_field_values`
--
ALTER TABLE `lead_custom_field_values`
  ADD CONSTRAINT `fk_lcfv_field_tenant_safe` FOREIGN KEY (`tenant_id`,`field_id`) REFERENCES `custom_field_definitions` (`tenant_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_lcfv_lead_tenant_safe` FOREIGN KEY (`tenant_id`,`lead_id`) REFERENCES `leads_master` (`tenant_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_lcfv_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `tenant_roles`
--
ALTER TABLE `tenant_roles`
  ADD CONSTRAINT `fk_tenant_roles_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `tenant_role_permissions`
--
ALTER TABLE `tenant_role_permissions`
  ADD CONSTRAINT `fk_tenant_role_permissions_role_tenant_safe` FOREIGN KEY (`tenant_id`,`role_id`) REFERENCES `tenant_roles` (`tenant_id`, `id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_tenant_role_permissions_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `tenant_smartlead_permissions`
--
ALTER TABLE `tenant_smartlead_permissions`
  ADD CONSTRAINT `fk_tenant_smartlead_permissions_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
COMMIT;

