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

START TRANSACTION;



--
-- Database: `sales_service1`
--

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

--
-- Table structure for table `crmactivities`
--

CREATE TABLE `crmactivities` (
  `id` int(10) UNSIGNED NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `type` varchar(255) NOT NULL,
  `comment` text DEFAULT NULL,
  `additional` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`additional`)),
  `schedule_from` datetime DEFAULT NULL,
  `schedule_to` datetime DEFAULT NULL,
  `is_done` tinyint(1) NOT NULL DEFAULT 0,
  `user_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `location` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmactivities`
--

INSERT INTO `crmactivities` (`id`, `title`, `type`, `comment`, `additional`, `schedule_from`, `schedule_to`, `is_done`, `user_id`, `created_at`, `updated_at`, `location`) VALUES
(1, 'Created', 'system', NULL, NULL, NULL, NULL, 1, 1, '2024-11-20 07:48:07', '2024-11-20 07:48:07', NULL),
(2, 'Updated Name', 'system', NULL, '{\"attribute\":\"Name\",\"new\":{\"value\":\"sadasd\",\"label\":\"sadasd\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:48:07', '2024-11-20 07:48:07', NULL),
(3, 'Updated Emails', 'system', NULL, '{\"attribute\":\"Emails\",\"new\":{\"value\":[{\"label\":\"work\",\"value\":\"aaa@hh.com\"}],\"label\":\"aaa@hh.com (work)\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:48:07', '2024-11-20 07:48:07', NULL),
(4, 'Updated Contact Numbers', 'system', NULL, '{\"attribute\":\"Contact Numbers\",\"new\":{\"value\":[{\"label\":\"work\",\"value\":\"234234\"}],\"label\":\"234234 (work)\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:48:07', '2024-11-20 07:48:07', NULL),
(5, 'Updated Job Title', 'system', NULL, '{\"attribute\":\"Job Title\",\"new\":{\"value\":\"das\",\"label\":\"das\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:48:07', '2024-11-20 07:48:07', NULL),
(6, 'Updated Organization', 'system', NULL, '{\"attribute\":\"Organization\",\"new\":{\"value\":5,\"label\":\"Pertamina\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(7, 'Created', 'system', NULL, NULL, NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(8, 'Updated Title', 'system', NULL, '{\"attribute\":\"Title\",\"new\":{\"value\":\"ads\",\"label\":\"ads\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(9, 'Updated Description', 'system', NULL, '{\"attribute\":\"Description\",\"new\":{\"value\":\"sd\",\"label\":\"sd\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(10, 'Updated Lead Value', 'system', NULL, '{\"attribute\":\"Lead Value\",\"new\":{\"value\":1232,\"label\":\"IDR\\u00a01,232.00\"},\"old\":{\"value\":null,\"label\":\"IDR\\u00a00.00\"}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(11, 'Updated Source', 'system', NULL, '{\"attribute\":\"Source\",\"new\":{\"value\":3,\"label\":\"Web Form\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(12, 'Updated Type', 'system', NULL, '{\"attribute\":\"Type\",\"new\":{\"value\":1,\"label\":\"New Business\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(13, 'Updated Sales Owner', 'system', NULL, '{\"attribute\":\"Sales Owner\",\"new\":{\"value\":1,\"label\":\"Example Admin\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(14, 'Updated Expected Close Date', 'system', NULL, '{\"attribute\":\"Expected Close Date\",\"new\":{\"value\":\"2024-11-19\",\"label\":\"Tue Nov 19, 2024\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(15, 'Updated Pipeline', 'system', NULL, '{\"attribute\":\"Pipeline\",\"new\":{\"value\":1,\"label\":\"Default Pipeline\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(16, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":1,\"label\":\"New\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-20 07:49:46', '2024-11-20 07:49:46', NULL),
(17, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":2,\"label\":\"Follow Up\"},\"old\":{\"value\":1,\"label\":\"New\"}}', NULL, NULL, 1, 1, '2024-11-20 07:49:54', '2024-11-20 07:49:54', NULL),
(18, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":1,\"label\":\"New\"},\"old\":{\"value\":2,\"label\":\"Follow Up\"}}', NULL, NULL, 1, 1, '2024-11-20 07:49:57', '2024-11-20 07:49:57', NULL),
(19, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":2,\"label\":\"Follow Up\"},\"old\":{\"value\":1,\"label\":\"New\"}}', NULL, NULL, 1, 1, '2024-11-20 07:49:58', '2024-11-20 07:49:58', NULL),
(20, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":1,\"label\":\"New\"},\"old\":{\"value\":2,\"label\":\"Follow Up\"}}', NULL, NULL, 1, 1, '2024-11-20 07:50:00', '2024-11-20 07:50:00', NULL),
(21, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":2,\"label\":\"Follow Up\"},\"old\":{\"value\":1,\"label\":\"New\"}}', NULL, NULL, 1, 1, '2024-11-20 07:50:14', '2024-11-20 07:50:14', NULL),
(22, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":1,\"label\":\"New\"},\"old\":{\"value\":2,\"label\":\"Follow Up\"}}', NULL, NULL, 1, 1, '2024-11-20 07:50:15', '2024-11-20 07:50:15', NULL),
(23, 'Created', 'system', NULL, NULL, NULL, NULL, 1, 3, '2024-11-21 01:25:44', '2024-11-21 01:25:44', NULL),
(24, 'Updated Name', 'system', NULL, '{\"attribute\":\"Name\",\"new\":{\"value\":\"saidi\",\"label\":\"saidi\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 3, '2024-11-21 01:25:44', '2024-11-21 01:25:44', NULL),
(25, 'Updated Emails', 'system', NULL, '{\"attribute\":\"Emails\",\"new\":{\"value\":[{\"label\":\"work\",\"value\":\"aaa@hh.comj\"}],\"label\":\"aaa@hh.comj (work)\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 3, '2024-11-21 01:25:44', '2024-11-21 01:25:44', NULL),
(26, 'Updated Contact Numbers', 'system', NULL, '{\"attribute\":\"Contact Numbers\",\"new\":{\"value\":[{\"label\":\"work\",\"value\":\"2342349\"}],\"label\":\"2342349 (work)\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 3, '2024-11-21 01:25:44', '2024-11-21 01:25:44', NULL),
(27, 'Updated Job Title', 'system', NULL, '{\"attribute\":\"Job Title\",\"new\":{\"value\":\"qqq\",\"label\":\"qqq\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 3, '2024-11-21 01:25:44', '2024-11-21 01:25:44', NULL),
(28, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":2,\"label\":\"Follow Up\"},\"old\":{\"value\":1,\"label\":\"New\"}}', NULL, NULL, 1, 1, '2024-11-21 01:57:01', '2024-11-21 01:57:01', NULL),
(29, 'activities.created', 'system', NULL, NULL, NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(30, 'Updated Name', 'system', NULL, '{\"attribute\":\"Name\",\"new\":{\"value\":\"syabab\",\"label\":\"syabab\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(31, 'Updated Emails', 'system', NULL, '{\"attribute\":\"Emails\",\"new\":{\"value\":[{\"label\":\"work\",\"value\":\"regergerg@ff.com\"}],\"label\":\"regergerg@ff.com (work)\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(32, 'Updated Contact Numbers', 'system', NULL, '{\"attribute\":\"Contact Numbers\",\"new\":{\"value\":[{\"label\":\"work\",\"value\":\"12122\"}],\"label\":\"12122 (work)\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(33, 'activities.created', 'system', NULL, NULL, NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(34, 'Updated Title', 'system', NULL, '{\"attribute\":\"Title\",\"new\":{\"value\":\"wamen\",\"label\":\"wamen\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(35, 'Updated Description', 'system', NULL, '{\"attribute\":\"Description\",\"new\":{\"value\":\"menwa\",\"label\":\"menwa\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(36, 'Updated Lead Value', 'system', NULL, '{\"attribute\":\"Lead Value\",\"new\":{\"value\":233232,\"label\":\"IDR\\u00a0233,232.00\"},\"old\":{\"value\":null,\"label\":\"IDR\\u00a00.00\"}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(37, 'Updated Source', 'system', NULL, '{\"attribute\":\"Source\",\"new\":{\"value\":3,\"label\":\"Web Form\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(38, 'Updated Type', 'system', NULL, '{\"attribute\":\"Type\",\"new\":{\"value\":1,\"label\":\"New Business\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(39, 'Updated Sales Owner', 'system', NULL, '{\"attribute\":\"Sales Owner\",\"new\":{\"value\":1,\"label\":\"Example Admin\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(40, 'Updated Expected Close Date', 'system', NULL, '{\"attribute\":\"Expected Close Date\",\"new\":{\"value\":\"2024-11-12\",\"label\":\"Tue Nov 12, 2024\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(41, 'Updated Pipeline', 'system', NULL, '{\"attribute\":\"Pipeline\",\"new\":{\"value\":1,\"label\":\"Default Pipeline\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(42, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":1,\"label\":\"New\"},\"old\":{\"value\":null,\"label\":null}}', NULL, NULL, 1, 1, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL),
(43, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":2,\"label\":\"Follow Up\"},\"old\":{\"value\":1,\"label\":\"New\"}}', NULL, NULL, 1, 1, '2024-11-25 02:23:16', '2024-11-25 02:23:16', NULL),
(44, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":1,\"label\":\"New\"},\"old\":{\"value\":2,\"label\":\"Follow Up\"}}', NULL, NULL, 1, 1, '2024-11-25 02:23:23', '2024-11-25 02:23:23', NULL),
(45, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":3,\"label\":\"Prospect\"},\"old\":{\"value\":1,\"label\":\"New\"}}', NULL, NULL, 1, 1, '2024-11-25 02:23:24', '2024-11-25 02:23:24', NULL),
(46, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":2,\"label\":\"Follow Up\"},\"old\":{\"value\":3,\"label\":\"Prospect\"}}', NULL, NULL, 1, 1, '2024-11-25 02:23:32', '2024-11-25 02:23:32', NULL),
(47, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":3,\"label\":\"Prospect\"},\"old\":{\"value\":2,\"label\":\"Follow Up\"}}', NULL, NULL, 1, 1, '2024-11-25 02:23:33', '2024-11-25 02:23:33', NULL),
(48, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":1,\"label\":\"New\"},\"old\":{\"value\":2,\"label\":\"Follow Up\"}}', NULL, NULL, 1, 1, '2024-11-25 02:38:31', '2024-11-25 02:38:31', NULL),
(49, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":2,\"label\":\"Follow Up\"},\"old\":{\"value\":1,\"label\":\"New\"}}', NULL, NULL, 1, 1, '2024-11-25 02:38:32', '2024-11-25 02:38:32', NULL),
(50, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":4,\"label\":\"Negotiation\"},\"old\":{\"value\":3,\"label\":\"Prospect\"}}', NULL, NULL, 1, 1, '2024-11-25 02:38:35', '2024-11-25 02:38:35', NULL),
(51, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":3,\"label\":\"Prospect\"},\"old\":{\"value\":4,\"label\":\"Negotiation\"}}', NULL, NULL, 1, 7, '2024-12-03 01:18:52', '2024-12-03 01:18:52', NULL),
(52, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":4,\"label\":\"Negotiation\"},\"old\":{\"value\":2,\"label\":\"Follow Up\"}}', NULL, NULL, 1, 1, '2024-12-07 05:35:08', '2024-12-07 05:35:08', NULL),
(53, 'Updated Stage', 'system', NULL, '{\"attribute\":\"Stage\",\"new\":{\"value\":2,\"label\":\"Follow Up\"},\"old\":{\"value\":3,\"label\":\"Prospect\"}}', NULL, NULL, 1, 1, '2024-12-07 05:35:09', '2024-12-07 05:35:09', NULL);

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

--
-- Table structure for table `crmactivity_files`
--

CREATE TABLE `crmactivity_files` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `path` varchar(255) NOT NULL,
  `activity_id` int(10) UNSIGNED 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 `crmactivity_participants`
--

CREATE TABLE `crmactivity_participants` (
  `id` int(10) UNSIGNED NOT NULL,
  `activity_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `person_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmall_tickets`
--

CREATE TABLE `crmall_tickets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `activities` text NOT NULL,
  `priority` varchar(255) NOT NULL,
  `customer` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `helpdesk_team` bigint(20) UNSIGNED NOT NULL,
  `assigned_to` bigint(20) UNSIGNED NOT NULL,
  `sla_deadline` timestamp NULL DEFAULT NULL,
  `stage` varchar(255) NOT NULL,
  `tags` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `ticket_url` varchar(100) DEFAULT NULL,
  `customer_id` varchar(255) DEFAULT NULL,
  `sla_time` timestamp NULL DEFAULT NULL,
  `sla_policy_id` int(11) DEFAULT NULL,
  `created_by` varchar(100) DEFAULT NULL,
  `posted_by` varchar(100) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `image_url` text DEFAULT NULL,
  `ticket_number` varchar(255) DEFAULT NULL,
  `problem_modal` text DEFAULT NULL,
  `solved_modal` text DEFAULT NULL,
  `organizations` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmattributes`
--

CREATE TABLE `crmattributes` (
  `id` int(10) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `lookup_type` varchar(255) DEFAULT NULL,
  `entity_type` varchar(255) NOT NULL,
  `sort_order` int(11) DEFAULT NULL,
  `validation` varchar(255) DEFAULT NULL,
  `is_required` tinyint(1) NOT NULL DEFAULT 0,
  `is_unique` tinyint(1) NOT NULL DEFAULT 0,
  `quick_add` tinyint(1) NOT NULL DEFAULT 0,
  `is_user_defined` tinyint(1) NOT NULL DEFAULT 1,
  `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 `crmattributes`
--

INSERT INTO `crmattributes` (`id`, `code`, `name`, `type`, `lookup_type`, `entity_type`, `sort_order`, `validation`, `is_required`, `is_unique`, `quick_add`, `is_user_defined`, `created_at`, `updated_at`) VALUES
(19, 'title', 'Title', 'text', NULL, 'leads', 1, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(20, 'description', 'Description', 'textarea', NULL, 'leads', 2, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(21, 'lead_value', 'Lead Value', 'price', NULL, 'leads', 3, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(22, 'lead_source_id', 'Source', 'select', 'lead_sources', 'leads', 4, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(23, 'lead_type_id', 'Type', 'select', 'lead_types', 'leads', 5, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(24, 'user_id', 'Sales Owner', 'select', 'users', 'leads', 7, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(25, 'expected_close_date', 'Expected Close Date', 'date', NULL, 'leads', 8, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(26, 'lead_pipeline_id', 'Pipeline', 'lookup', 'lead_pipelines', 'leads', 9, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(27, 'lead_pipeline_stage_id', 'Stage', 'lookup', 'lead_pipeline_stages', 'leads', 10, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(28, 'name', 'Name', 'text', NULL, 'persons', 1, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(29, 'emails', 'Emails', 'email', NULL, 'persons', 2, NULL, 1, 1, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(30, 'contact_numbers', 'Contact Numbers', 'phone', NULL, 'persons', 3, 'numeric', 0, 1, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(31, 'job_title', 'Job Title', 'text', NULL, 'persons', 4, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(32, 'user_id', 'Sales Owner', 'lookup', 'users', 'persons', 5, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(33, 'organization_id', 'Organization', 'lookup', 'organizations', 'persons', 6, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(34, 'name', 'Name', 'text', NULL, 'organizations', 1, NULL, 1, 1, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(35, 'address', 'Address', 'address', NULL, 'organizations', 2, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(36, 'user_id', 'Sales Owner', 'lookup', 'users', 'organizations', 3, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(37, 'name', 'Name', 'text', NULL, 'products', 1, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(38, 'description', 'Description', 'textarea', NULL, 'products', 2, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(39, 'sku', 'SKU', 'text', NULL, 'products', 3, NULL, 1, 1, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(40, 'quantity', 'Quantity', 'text', NULL, 'products', 4, 'numeric', 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(41, 'price', 'Price', 'text', NULL, 'products', 5, 'decimal', 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(42, 'user_id', 'Sales Owner', 'select', 'users', 'quotes', 1, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(43, 'subject', 'Subject', 'text', NULL, 'quotes', 2, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(44, 'description', 'Description', 'textarea', NULL, 'quotes', 3, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(45, 'billing_address', 'Billing Address', 'address', NULL, 'quotes', 4, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(46, 'shipping_address', 'Shipping Address', 'address', NULL, 'quotes', 5, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(47, 'discount_percent', 'Discount Percent', 'text', NULL, 'quotes', 6, 'decimal', 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(48, 'discount_amount', 'Discount Amount', 'price', NULL, 'quotes', 7, 'decimal', 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(49, 'tax_amount', 'Tax Amount', 'price', NULL, 'quotes', 8, 'decimal', 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(50, 'adjustment_amount', 'Adjustment Amount', 'price', NULL, 'quotes', 9, 'decimal', 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(51, 'sub_total', 'Sub Total', 'price', NULL, 'quotes', 10, 'decimal', 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(52, 'grand_total', 'Grand Total', 'price', NULL, 'quotes', 11, 'decimal', 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(53, 'expired_at', 'Expired At', 'date', NULL, 'quotes', 12, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(54, 'person_id', 'Person', 'lookup', 'persons', 'quotes', 13, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(55, 'name', 'Name', 'text', NULL, 'warehouses', 1, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(56, 'description', 'Description', 'textarea', NULL, 'warehouses', 2, NULL, 0, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(57, 'contact_name', 'Contact Name', 'text', NULL, 'warehouses', 3, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(58, 'contact_emails', 'Contact Emails', 'email', NULL, 'warehouses', 4, NULL, 1, 1, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(59, 'contact_numbers', 'Contact Numbers', 'phone', NULL, 'warehouses', 5, 'numeric', 0, 1, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(60, 'contact_address', 'Contact Address', 'address', NULL, 'warehouses', 6, NULL, 1, 0, 1, 0, '2024-11-14 16:54:20', '2024-11-14 16:54:20');

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

--
-- Table structure for table `crmattribute_options`
--

CREATE TABLE `crmattribute_options` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `sort_order` int(11) DEFAULT NULL,
  `attribute_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmattribute_values`
--

CREATE TABLE `crmattribute_values` (
  `id` int(10) UNSIGNED NOT NULL,
  `entity_type` varchar(255) NOT NULL DEFAULT 'leads',
  `text_value` text DEFAULT NULL,
  `boolean_value` tinyint(1) DEFAULT NULL,
  `integer_value` int(11) DEFAULT NULL,
  `float_value` double DEFAULT NULL,
  `datetime_value` datetime DEFAULT NULL,
  `date_value` date DEFAULT NULL,
  `json_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`json_value`)),
  `entity_id` int(10) UNSIGNED NOT NULL,
  `attribute_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmattribute_values`
--

INSERT INTO `crmattribute_values` (`id`, `entity_type`, `text_value`, `boolean_value`, `integer_value`, `float_value`, `datetime_value`, `date_value`, `json_value`, `entity_id`, `attribute_id`) VALUES
(1, 'organizations', 'Blackrock', NULL, NULL, NULL, NULL, NULL, NULL, 1, 34),
(2, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, '{\"address\":\"\",\"country\":\"AL\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', 1, 35),
(3, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 36),
(4, 'organizations', 'Temasek', NULL, NULL, NULL, NULL, NULL, NULL, 2, 34),
(5, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', 2, 35),
(6, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 36),
(7, 'organizations', 'Vanguard', NULL, NULL, NULL, NULL, NULL, NULL, 3, 34),
(8, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', 3, 35),
(9, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, 36),
(10, 'organizations', 'Berkshire Hathaway', NULL, NULL, NULL, NULL, NULL, NULL, 4, 34),
(11, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', 4, 35),
(12, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 36),
(13, 'organizations', 'Pertamina', NULL, NULL, NULL, NULL, NULL, NULL, 5, 34),
(14, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', 5, 35),
(15, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5, 36),
(16, 'organizations', 'Bank Central Asia', NULL, NULL, NULL, NULL, NULL, NULL, 6, 34),
(17, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', 6, 35),
(18, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 6, 36),
(19, 'organizations', 'Astra International', NULL, NULL, NULL, NULL, NULL, NULL, 7, 34),
(20, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', 7, 35),
(21, 'organizations', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 7, 36),
(22, 'persons', 'sadasd', NULL, NULL, NULL, NULL, NULL, NULL, 1, 28),
(23, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, '[{\"value\":\"aaa@hh.com\",\"label\":\"work\"}]', 1, 29),
(24, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, '[{\"value\":\"234234\",\"label\":\"work\"}]', 1, 30),
(25, 'persons', 'das', NULL, NULL, NULL, NULL, NULL, NULL, 1, 31),
(26, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 32),
(27, 'persons', NULL, NULL, 5, NULL, NULL, NULL, NULL, 1, 33),
(28, 'leads', 'ads', NULL, NULL, NULL, NULL, NULL, NULL, 1, 19),
(29, 'leads', 'sd', NULL, NULL, NULL, NULL, NULL, NULL, 1, 20),
(30, 'leads', NULL, NULL, NULL, 1232, NULL, NULL, NULL, 1, 21),
(31, 'leads', NULL, NULL, 3, NULL, NULL, NULL, NULL, 1, 22),
(32, 'leads', NULL, NULL, 1, NULL, NULL, NULL, NULL, 1, 23),
(33, 'leads', NULL, NULL, 1, NULL, NULL, NULL, NULL, 1, 24),
(34, 'leads', NULL, NULL, NULL, NULL, NULL, '2024-11-19', NULL, 1, 25),
(35, 'leads', NULL, NULL, 1, NULL, NULL, NULL, NULL, 1, 26),
(36, 'leads', NULL, NULL, 4, NULL, NULL, NULL, NULL, 1, 27),
(37, 'persons', 'saidi', NULL, NULL, NULL, NULL, NULL, NULL, 2, 28),
(38, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, '[{\"value\":\"aaa@hh.comj\",\"label\":\"work\"}]', 2, 29),
(39, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, '[{\"value\":\"2342349\",\"label\":\"work\"}]', 2, 30),
(40, 'persons', 'qqq', NULL, NULL, NULL, NULL, NULL, NULL, 2, 31),
(41, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 32),
(42, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 33),
(43, 'persons', 'syabab', NULL, NULL, NULL, NULL, NULL, NULL, 3, 28),
(44, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, '[{\"value\":\"regergerg@ff.com\",\"label\":\"work\"}]', 3, 29),
(45, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, '[{\"value\":\"12122\",\"label\":\"work\"}]', 3, 30),
(46, 'persons', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, 33),
(47, 'leads', 'wamen', NULL, NULL, NULL, NULL, NULL, NULL, 2, 19),
(48, 'leads', 'menwa', NULL, NULL, NULL, NULL, NULL, NULL, 2, 20),
(49, 'leads', NULL, NULL, NULL, 233232, NULL, NULL, NULL, 2, 21),
(50, 'leads', NULL, NULL, 3, NULL, NULL, NULL, NULL, 2, 22),
(51, 'leads', NULL, NULL, 1, NULL, NULL, NULL, NULL, 2, 23),
(52, 'leads', NULL, NULL, 1, NULL, NULL, NULL, NULL, 2, 24),
(53, 'leads', NULL, NULL, NULL, NULL, NULL, '2024-11-12', NULL, 2, 25),
(54, 'leads', NULL, NULL, 1, NULL, NULL, NULL, NULL, 2, 26),
(55, 'leads', NULL, NULL, 2, NULL, NULL, NULL, NULL, 2, 27);

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

--
-- Table structure for table `crmcore_config`
--

CREATE TABLE `crmcore_config` (
  `id` int(10) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `value` varchar(255) 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 `crmcountries`
--

CREATE TABLE `crmcountries` (
  `id` int(10) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmcountries`
--

INSERT INTO `crmcountries` (`id`, `code`, `name`) VALUES
(1, 'AF', 'Afghanistan'),
(2, 'AX', 'Åland Islands'),
(3, 'AL', 'Albania'),
(4, 'DZ', 'Algeria'),
(5, 'AS', 'American Samoa'),
(6, 'AD', 'Andorra'),
(7, 'AO', 'Angola'),
(8, 'AI', 'Anguilla'),
(9, 'AQ', 'Antarctica'),
(10, 'AG', 'Antigua & Barbuda'),
(11, 'AR', 'Argentina'),
(12, 'AM', 'Armenia'),
(13, 'AW', 'Aruba'),
(14, 'AC', 'Ascension Island'),
(15, 'AU', 'Australia'),
(16, 'AT', 'Austria'),
(17, 'AZ', 'Azerbaijan'),
(18, 'BS', 'Bahamas'),
(19, 'BH', 'Bahrain'),
(20, 'BD', 'Bangladesh'),
(21, 'BB', 'Barbados'),
(22, 'BY', 'Belarus'),
(23, 'BE', 'Belgium'),
(24, 'BZ', 'Belize'),
(25, 'BJ', 'Benin'),
(26, 'BM', 'Bermuda'),
(27, 'BT', 'Bhutan'),
(28, 'BO', 'Bolivia'),
(29, 'BA', 'Bosnia & Herzegovina'),
(30, 'BW', 'Botswana'),
(31, 'BR', 'Brazil'),
(32, 'IO', 'British Indian Ocean Territory'),
(33, 'VG', 'British Virgin Islands'),
(34, 'BN', 'Brunei'),
(35, 'BG', 'Bulgaria'),
(36, 'BF', 'Burkina Faso'),
(37, 'BI', 'Burundi'),
(38, 'KH', 'Cambodia'),
(39, 'CM', 'Cameroon'),
(40, 'CA', 'Canada'),
(41, 'IC', 'Canary Islands'),
(42, 'CV', 'Cape Verde'),
(43, 'BQ', 'Caribbean Netherlands'),
(44, 'KY', 'Cayman Islands'),
(45, 'CF', 'Central African Republic'),
(46, 'EA', 'Ceuta & Melilla'),
(47, 'TD', 'Chad'),
(48, 'CL', 'Chile'),
(49, 'CN', 'China'),
(50, 'CX', 'Christmas Island'),
(51, 'CC', 'Cocos (Keeling) Islands'),
(52, 'CO', 'Colombia'),
(53, 'KM', 'Comoros'),
(54, 'CG', 'Congo - Brazzaville'),
(55, 'CD', 'Congo - Kinshasa'),
(56, 'CK', 'Cook Islands'),
(57, 'CR', 'Costa Rica'),
(58, 'CI', 'Côte d’Ivoire'),
(59, 'HR', 'Croatia'),
(60, 'CU', 'Cuba'),
(61, 'CW', 'Curaçao'),
(62, 'CY', 'Cyprus'),
(63, 'CZ', 'Czechia'),
(64, 'DK', 'Denmark'),
(65, 'DG', 'Diego Garcia'),
(66, 'DJ', 'Djibouti'),
(67, 'DM', 'Dominica'),
(68, 'DO', 'Dominican Republic'),
(69, 'EC', 'Ecuador'),
(70, 'EG', 'Egypt'),
(71, 'SV', 'El Salvador'),
(72, 'GQ', 'Equatorial Guinea'),
(73, 'ER', 'Eritrea'),
(74, 'EE', 'Estonia'),
(75, 'ET', 'Ethiopia'),
(76, 'EZ', 'Eurozone'),
(77, 'FK', 'Falkland Islands'),
(78, 'FO', 'Faroe Islands'),
(79, 'FJ', 'Fiji'),
(80, 'FI', 'Finland'),
(81, 'FR', 'France'),
(82, 'GF', 'French Guiana'),
(83, 'PF', 'French Polynesia'),
(84, 'TF', 'French Southern Territories'),
(85, 'GA', 'Gabon'),
(86, 'GM', 'Gambia'),
(87, 'GE', 'Georgia'),
(88, 'DE', 'Germany'),
(89, 'GH', 'Ghana'),
(90, 'GI', 'Gibraltar'),
(91, 'GR', 'Greece'),
(92, 'GL', 'Greenland'),
(93, 'GD', 'Grenada'),
(94, 'GP', 'Guadeloupe'),
(95, 'GU', 'Guam'),
(96, 'GT', 'Guatemala'),
(97, 'GG', 'Guernsey'),
(98, 'GN', 'Guinea'),
(99, 'GW', 'Guinea-Bissau'),
(100, 'GY', 'Guyana'),
(101, 'HT', 'Haiti'),
(102, 'HN', 'Honduras'),
(103, 'HK', 'Hong Kong SAR China'),
(104, 'HU', 'Hungary'),
(105, 'IS', 'Iceland'),
(106, 'IN', 'India'),
(107, 'ID', 'Indonesia'),
(108, 'IR', 'Iran'),
(109, 'IQ', 'Iraq'),
(110, 'IE', 'Ireland'),
(111, 'IM', 'Isle of Man'),
(112, 'IL', 'Israel'),
(113, 'IT', 'Italy'),
(114, 'JM', 'Jamaica'),
(115, 'JP', 'Japan'),
(116, 'JE', 'Jersey'),
(117, 'JO', 'Jordan'),
(118, 'KZ', 'Kazakhstan'),
(119, 'KE', 'Kenya'),
(120, 'KI', 'Kiribati'),
(121, 'XK', 'Kosovo'),
(122, 'KW', 'Kuwait'),
(123, 'KG', 'Kyrgyzstan'),
(124, 'LA', 'Laos'),
(125, 'LV', 'Latvia'),
(126, 'LB', 'Lebanon'),
(127, 'LS', 'Lesotho'),
(128, 'LR', 'Liberia'),
(129, 'LY', 'Libya'),
(130, 'LI', 'Liechtenstein'),
(131, 'LT', 'Lithuania'),
(132, 'LU', 'Luxembourg'),
(133, 'MO', 'Macau SAR China'),
(134, 'MK', 'Macedonia'),
(135, 'MG', 'Madagascar'),
(136, 'MW', 'Malawi'),
(137, 'MY', 'Malaysia'),
(138, 'MV', 'Maldives'),
(139, 'ML', 'Mali'),
(140, 'MT', 'Malta'),
(141, 'MH', 'Marshall Islands'),
(142, 'MQ', 'Martinique'),
(143, 'MR', 'Mauritania'),
(144, 'MU', 'Mauritius'),
(145, 'YT', 'Mayotte'),
(146, 'MX', 'Mexico'),
(147, 'FM', 'Micronesia'),
(148, 'MD', 'Moldova'),
(149, 'MC', 'Monaco'),
(150, 'MN', 'Mongolia'),
(151, 'ME', 'Montenegro'),
(152, 'MS', 'Montserrat'),
(153, 'MA', 'Morocco'),
(154, 'MZ', 'Mozambique'),
(155, 'MM', 'Myanmar (Burma)'),
(156, 'NA', 'Namibia'),
(157, 'NR', 'Nauru'),
(158, 'NP', 'Nepal'),
(159, 'NL', 'Netherlands'),
(160, 'NC', 'New Caledonia'),
(161, 'NZ', 'New Zealand'),
(162, 'NI', 'Nicaragua'),
(163, 'NE', 'Niger'),
(164, 'NG', 'Nigeria'),
(165, 'NU', 'Niue'),
(166, 'NF', 'Norfolk Island'),
(167, 'KP', 'North Korea'),
(168, 'MP', 'Northern Mariana Islands'),
(169, 'NO', 'Norway'),
(170, 'OM', 'Oman'),
(171, 'PK', 'Pakistan'),
(172, 'PW', 'Palau'),
(173, 'PS', 'Palestinian Territories'),
(174, 'PA', 'Panama'),
(175, 'PG', 'Papua New Guinea'),
(176, 'PY', 'Paraguay'),
(177, 'PE', 'Peru'),
(178, 'PH', 'Philippines'),
(179, 'PN', 'Pitcairn Islands'),
(180, 'PL', 'Poland'),
(181, 'PT', 'Portugal'),
(182, 'PR', 'Puerto Rico'),
(183, 'QA', 'Qatar'),
(184, 'RE', 'Réunion'),
(185, 'RO', 'Romania'),
(186, 'RU', 'Russia'),
(187, 'RW', 'Rwanda'),
(188, 'WS', 'Samoa'),
(189, 'SM', 'San Marino'),
(190, 'ST', 'São Tomé & Príncipe'),
(191, 'SA', 'Saudi Arabia'),
(192, 'SN', 'Senegal'),
(193, 'RS', 'Serbia'),
(194, 'SC', 'Seychelles'),
(195, 'SL', 'Sierra Leone'),
(196, 'SG', 'Singapore'),
(197, 'SX', 'Sint Maarten'),
(198, 'SK', 'Slovakia'),
(199, 'SI', 'Slovenia'),
(200, 'SB', 'Solomon Islands'),
(201, 'SO', 'Somalia'),
(202, 'ZA', 'South Africa'),
(203, 'GS', 'South Georgia & South Sandwich Islands'),
(204, 'KR', 'South Korea'),
(205, 'SS', 'South Sudan'),
(206, 'ES', 'Spain'),
(207, 'LK', 'Sri Lanka'),
(208, 'BL', 'St. Barthélemy'),
(209, 'SH', 'St. Helena'),
(210, 'KN', 'St. Kitts & Nevis'),
(211, 'LC', 'St. Lucia'),
(212, 'MF', 'St. Martin'),
(213, 'PM', 'St. Pierre & Miquelon'),
(214, 'VC', 'St. Vincent & Grenadines'),
(215, 'SD', 'Sudan'),
(216, 'SR', 'Suriname'),
(217, 'SJ', 'Svalbard & Jan Mayen'),
(218, 'SZ', 'Swaziland'),
(219, 'SE', 'Sweden'),
(220, 'CH', 'Switzerland'),
(221, 'SY', 'Syria'),
(222, 'TW', 'Taiwan'),
(223, 'TJ', 'Tajikistan'),
(224, 'TZ', 'Tanzania'),
(225, 'TH', 'Thailand'),
(226, 'TL', 'Timor-Leste'),
(227, 'TG', 'Togo'),
(228, 'TK', 'Tokelau'),
(229, 'TO', 'Tonga'),
(230, 'TT', 'Trinidad & Tobago'),
(231, 'TA', 'Tristan da Cunha'),
(232, 'TN', 'Tunisia'),
(233, 'TR', 'Turkey'),
(234, 'TM', 'Turkmenistan'),
(235, 'TC', 'Turks & Caicos Islands'),
(236, 'TV', 'Tuvalu'),
(237, 'UM', 'U.S. Outlying Islands'),
(238, 'VI', 'U.S. Virgin Islands'),
(239, 'UG', 'Uganda'),
(240, 'UA', 'Ukraine'),
(241, 'AE', 'United Arab Emirates'),
(242, 'GB', 'United Kingdom'),
(243, 'UN', 'United Nations'),
(244, 'US', 'United States'),
(245, 'UY', 'Uruguay'),
(246, 'UZ', 'Uzbekistan'),
(247, 'VU', 'Vanuatu'),
(248, 'VA', 'Vatican City'),
(249, 'VE', 'Venezuela'),
(250, 'VN', 'Vietnam'),
(251, 'WF', 'Wallis & Futuna'),
(252, 'EH', 'Western Sahara'),
(253, 'YE', 'Yemen'),
(254, 'ZM', 'Zambia'),
(255, 'ZW', 'Zimbabwe');

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

--
-- Table structure for table `crmcountry_states`
--

CREATE TABLE `crmcountry_states` (
  `id` int(10) UNSIGNED NOT NULL,
  `country_code` varchar(255) NOT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `country_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmcountry_states`
--

INSERT INTO `crmcountry_states` (`id`, `country_code`, `code`, `name`, `country_id`) VALUES
(1, 'US', 'AL', 'Alabama', 244),
(2, 'US', 'AK', 'Alaska', 244),
(3, 'US', 'AS', 'American Samoa', 244),
(4, 'US', 'AZ', 'Arizona', 244),
(5, 'US', 'AR', 'Arkansas', 244),
(6, 'US', 'AE', 'Armed Forces Africa', 244),
(7, 'US', 'AA', 'Armed Forces Americas', 244),
(8, 'US', 'AE', 'Armed Forces Canada', 244),
(9, 'US', 'AE', 'Armed Forces Europe', 244),
(10, 'US', 'AE', 'Armed Forces Middle East', 244),
(11, 'US', 'AP', 'Armed Forces Pacific', 244),
(12, 'US', 'CA', 'California', 244),
(13, 'US', 'CO', 'Colorado', 244),
(14, 'US', 'CT', 'Connecticut', 244),
(15, 'US', 'DE', 'Delaware', 244),
(16, 'US', 'DC', 'District of Columbia', 244),
(17, 'US', 'FM', 'Federated States Of Micronesia', 244),
(18, 'US', 'FL', 'Florida', 244),
(19, 'US', 'GA', 'Georgia', 244),
(20, 'US', 'GU', 'Guam', 244),
(21, 'US', 'HI', 'Hawaii', 244),
(22, 'US', 'ID', 'Idaho', 244),
(23, 'US', 'IL', 'Illinois', 244),
(24, 'US', 'IN', 'Indiana', 244),
(25, 'US', 'IA', 'Iowa', 244),
(26, 'US', 'KS', 'Kansas', 244),
(27, 'US', 'KY', 'Kentucky', 244),
(28, 'US', 'LA', 'Louisiana', 244),
(29, 'US', 'ME', 'Maine', 244),
(30, 'US', 'MH', 'Marshall Islands', 244),
(31, 'US', 'MD', 'Maryland', 244),
(32, 'US', 'MA', 'Massachusetts', 244),
(33, 'US', 'MI', 'Michigan', 244),
(34, 'US', 'MN', 'Minnesota', 244),
(35, 'US', 'MS', 'Mississippi', 244),
(36, 'US', 'MO', 'Missouri', 244),
(37, 'US', 'MT', 'Montana', 244),
(38, 'US', 'NE', 'Nebraska', 244),
(39, 'US', 'NV', 'Nevada', 244),
(40, 'US', 'NH', 'New Hampshire', 244),
(41, 'US', 'NJ', 'New Jersey', 244),
(42, 'US', 'NM', 'New Mexico', 244),
(43, 'US', 'NY', 'New York', 244),
(44, 'US', 'NC', 'North Carolina', 244),
(45, 'US', 'ND', 'North Dakota', 244),
(46, 'US', 'MP', 'Northern Mariana Islands', 244),
(47, 'US', 'OH', 'Ohio', 244),
(48, 'US', 'OK', 'Oklahoma', 244),
(49, 'US', 'OR', 'Oregon', 244),
(50, 'US', 'PW', 'Palau', 244),
(51, 'US', 'PA', 'Pennsylvania', 244),
(52, 'US', 'PR', 'Puerto Rico', 244),
(53, 'US', 'RI', 'Rhode Island', 244),
(54, 'US', 'SC', 'South Carolina', 244),
(55, 'US', 'SD', 'South Dakota', 244),
(56, 'US', 'TN', 'Tennessee', 244),
(57, 'US', 'TX', 'Texas', 244),
(58, 'US', 'UT', 'Utah', 244),
(59, 'US', 'VT', 'Vermont', 244),
(60, 'US', 'VI', 'Virgin Islands', 244),
(61, 'US', 'VA', 'Virginia', 244),
(62, 'US', 'WA', 'Washington', 244),
(63, 'US', 'WV', 'West Virginia', 244),
(64, 'US', 'WI', 'Wisconsin', 244),
(65, 'US', 'WY', 'Wyoming', 244),
(66, 'CA', 'AB', 'Alberta', 40),
(67, 'CA', 'BC', 'British Columbia', 40),
(68, 'CA', 'MB', 'Manitoba', 40),
(69, 'CA', 'NL', 'Newfoundland and Labrador', 40),
(70, 'CA', 'NB', 'New Brunswick', 40),
(71, 'CA', 'NS', 'Nova Scotia', 40),
(72, 'CA', 'NT', 'Northwest Territories', 40),
(73, 'CA', 'NU', 'Nunavut', 40),
(74, 'CA', 'ON', 'Ontario', 40),
(75, 'CA', 'PE', 'Prince Edward Island', 40),
(76, 'CA', 'QC', 'Quebec', 40),
(77, 'CA', 'SK', 'Saskatchewan', 40),
(78, 'CA', 'YT', 'Yukon Territory', 40),
(79, 'DE', 'NDS', 'Niedersachsen', 88),
(80, 'DE', 'BAW', 'Baden-Württemberg', 88),
(81, 'DE', 'BAY', 'Bayern', 88),
(82, 'DE', 'BER', 'Berlin', 88),
(83, 'DE', 'BRG', 'Brandenburg', 88),
(84, 'DE', 'BRE', 'Bremen', 88),
(85, 'DE', 'HAM', 'Hamburg', 88),
(86, 'DE', 'HES', 'Hessen', 88),
(87, 'DE', 'MEC', 'Mecklenburg-Vorpommern', 88),
(88, 'DE', 'NRW', 'Nordrhein-Westfalen', 88),
(89, 'DE', 'RHE', 'Rheinland-Pfalz', 88),
(90, 'DE', 'SAR', 'Saarland', 88),
(91, 'DE', 'SAS', 'Sachsen', 88),
(92, 'DE', 'SAC', 'Sachsen-Anhalt', 88),
(93, 'DE', 'SCN', 'Schleswig-Holstein', 88),
(94, 'DE', 'THE', 'Thüringen', 88),
(95, 'AT', 'WI', 'Wien', 16),
(96, 'AT', 'NO', 'Niederösterreich', 16),
(97, 'AT', 'OO', 'Oberösterreich', 16),
(98, 'AT', 'SB', 'Salzburg', 16),
(99, 'AT', 'KN', 'Kärnten', 16),
(100, 'AT', 'ST', 'Steiermark', 16),
(101, 'AT', 'TI', 'Tirol', 16),
(102, 'AT', 'BL', 'Burgenland', 16),
(103, 'AT', 'VB', 'Vorarlberg', 16),
(104, 'CH', 'AG', 'Aargau', 220),
(105, 'CH', 'AI', 'Appenzell Innerrhoden', 220),
(106, 'CH', 'AR', 'Appenzell Ausserrhoden', 220),
(107, 'CH', 'BE', 'Bern', 220),
(108, 'CH', 'BL', 'Basel-Landschaft', 220),
(109, 'CH', 'BS', 'Basel-Stadt', 220),
(110, 'CH', 'FR', 'Freiburg', 220),
(111, 'CH', 'GE', 'Genf', 220),
(112, 'CH', 'GL', 'Glarus', 220),
(113, 'CH', 'GR', 'Graubünden', 220),
(114, 'CH', 'JU', 'Jura', 220),
(115, 'CH', 'LU', 'Luzern', 220),
(116, 'CH', 'NE', 'Neuenburg', 220),
(117, 'CH', 'NW', 'Nidwalden', 220),
(118, 'CH', 'OW', 'Obwalden', 220),
(119, 'CH', 'SG', 'St. Gallen', 220),
(120, 'CH', 'SH', 'Schaffhausen', 220),
(121, 'CH', 'SO', 'Solothurn', 220),
(122, 'CH', 'SZ', 'Schwyz', 220),
(123, 'CH', 'TG', 'Thurgau', 220),
(124, 'CH', 'TI', 'Tessin', 220),
(125, 'CH', 'UR', 'Uri', 220),
(126, 'CH', 'VD', 'Waadt', 220),
(127, 'CH', 'VS', 'Wallis', 220),
(128, 'CH', 'ZG', 'Zug', 220),
(129, 'CH', 'ZH', 'Zürich', 220),
(130, 'ES', 'A Coruсa', 'A Coruña', 206),
(131, 'ES', 'Alava', 'Alava', 206),
(132, 'ES', 'Albacete', 'Albacete', 206),
(133, 'ES', 'Alicante', 'Alicante', 206),
(134, 'ES', 'Almeria', 'Almeria', 206),
(135, 'ES', 'Asturias', 'Asturias', 206),
(136, 'ES', 'Avila', 'Avila', 206),
(137, 'ES', 'Badajoz', 'Badajoz', 206),
(138, 'ES', 'Baleares', 'Baleares', 206),
(139, 'ES', 'Barcelona', 'Barcelona', 206),
(140, 'ES', 'Burgos', 'Burgos', 206),
(141, 'ES', 'Caceres', 'Caceres', 206),
(142, 'ES', 'Cadiz', 'Cadiz', 206),
(143, 'ES', 'Cantabria', 'Cantabria', 206),
(144, 'ES', 'Castellon', 'Castellon', 206),
(145, 'ES', 'Ceuta', 'Ceuta', 206),
(146, 'ES', 'Ciudad Real', 'Ciudad Real', 206),
(147, 'ES', 'Cordoba', 'Cordoba', 206),
(148, 'ES', 'Cuenca', 'Cuenca', 206),
(149, 'ES', 'Girona', 'Girona', 206),
(150, 'ES', 'Granada', 'Granada', 206),
(151, 'ES', 'Guadalajara', 'Guadalajara', 206),
(152, 'ES', 'Guipuzcoa', 'Guipuzcoa', 206),
(153, 'ES', 'Huelva', 'Huelva', 206),
(154, 'ES', 'Huesca', 'Huesca', 206),
(155, 'ES', 'Jaen', 'Jaen', 206),
(156, 'ES', 'La Rioja', 'La Rioja', 206),
(157, 'ES', 'Las Palmas', 'Las Palmas', 206),
(158, 'ES', 'Leon', 'Leon', 206),
(159, 'ES', 'Lleida', 'Lleida', 206),
(160, 'ES', 'Lugo', 'Lugo', 206),
(161, 'ES', 'Madrid', 'Madrid', 206),
(162, 'ES', 'Malaga', 'Malaga', 206),
(163, 'ES', 'Melilla', 'Melilla', 206),
(164, 'ES', 'Murcia', 'Murcia', 206),
(165, 'ES', 'Navarra', 'Navarra', 206),
(166, 'ES', 'Ourense', 'Ourense', 206),
(167, 'ES', 'Palencia', 'Palencia', 206),
(168, 'ES', 'Pontevedra', 'Pontevedra', 206),
(169, 'ES', 'Salamanca', 'Salamanca', 206),
(170, 'ES', 'Santa Cruz de Tenerife', 'Santa Cruz de Tenerife', 206),
(171, 'ES', 'Segovia', 'Segovia', 206),
(172, 'ES', 'Sevilla', 'Sevilla', 206),
(173, 'ES', 'Soria', 'Soria', 206),
(174, 'ES', 'Tarragona', 'Tarragona', 206),
(175, 'ES', 'Teruel', 'Teruel', 206),
(176, 'ES', 'Toledo', 'Toledo', 206),
(177, 'ES', 'Valencia', 'Valencia', 206),
(178, 'ES', 'Valladolid', 'Valladolid', 206),
(179, 'ES', 'Vizcaya', 'Vizcaya', 206),
(180, 'ES', 'Zamora', 'Zamora', 206),
(181, 'ES', 'Zaragoza', 'Zaragoza', 206),
(182, 'FR', '1', 'Ain', 81),
(183, 'FR', '2', 'Aisne', 81),
(184, 'FR', '3', 'Allier', 81),
(185, 'FR', '4', 'Alpes-de-Haute-Provence', 81),
(186, 'FR', '5', 'Hautes-Alpes', 81),
(187, 'FR', '6', 'Alpes-Maritimes', 81),
(188, 'FR', '7', 'Ardèche', 81),
(189, 'FR', '8', 'Ardennes', 81),
(190, 'FR', '9', 'Ariège', 81),
(191, 'FR', '10', 'Aube', 81),
(192, 'FR', '11', 'Aude', 81),
(193, 'FR', '12', 'Aveyron', 81),
(194, 'FR', '13', 'Bouches-du-Rhône', 81),
(195, 'FR', '14', 'Calvados', 81),
(196, 'FR', '15', 'Cantal', 81),
(197, 'FR', '16', 'Charente', 81),
(198, 'FR', '17', 'Charente-Maritime', 81),
(199, 'FR', '18', 'Cher', 81),
(200, 'FR', '19', 'Corrèze', 81),
(201, 'FR', '2A', 'Corse-du-Sud', 81),
(202, 'FR', '2B', 'Haute-Corse', 81),
(203, 'FR', '21', 'Côte-d\'Or', 81),
(204, 'FR', '22', 'Côtes-d\'Armor', 81),
(205, 'FR', '23', 'Creuse', 81),
(206, 'FR', '24', 'Dordogne', 81),
(207, 'FR', '25', 'Doubs', 81),
(208, 'FR', '26', 'Drôme', 81),
(209, 'FR', '27', 'Eure', 81),
(210, 'FR', '28', 'Eure-et-Loir', 81),
(211, 'FR', '29', 'Finistère', 81),
(212, 'FR', '30', 'Gard', 81),
(213, 'FR', '31', 'Haute-Garonne', 81),
(214, 'FR', '32', 'Gers', 81),
(215, 'FR', '33', 'Gironde', 81),
(216, 'FR', '34', 'Hérault', 81),
(217, 'FR', '35', 'Ille-et-Vilaine', 81),
(218, 'FR', '36', 'Indre', 81),
(219, 'FR', '37', 'Indre-et-Loire', 81),
(220, 'FR', '38', 'Isère', 81),
(221, 'FR', '39', 'Jura', 81),
(222, 'FR', '40', 'Landes', 81),
(223, 'FR', '41', 'Loir-et-Cher', 81),
(224, 'FR', '42', 'Loire', 81),
(225, 'FR', '43', 'Haute-Loire', 81),
(226, 'FR', '44', 'Loire-Atlantique', 81),
(227, 'FR', '45', 'Loiret', 81),
(228, 'FR', '46', 'Lot', 81),
(229, 'FR', '47', 'Lot-et-Garonne', 81),
(230, 'FR', '48', 'Lozère', 81),
(231, 'FR', '49', 'Maine-et-Loire', 81),
(232, 'FR', '50', 'Manche', 81),
(233, 'FR', '51', 'Marne', 81),
(234, 'FR', '52', 'Haute-Marne', 81),
(235, 'FR', '53', 'Mayenne', 81),
(236, 'FR', '54', 'Meurthe-et-Moselle', 81),
(237, 'FR', '55', 'Meuse', 81),
(238, 'FR', '56', 'Morbihan', 81),
(239, 'FR', '57', 'Moselle', 81),
(240, 'FR', '58', 'Nièvre', 81),
(241, 'FR', '59', 'Nord', 81),
(242, 'FR', '60', 'Oise', 81),
(243, 'FR', '61', 'Orne', 81),
(244, 'FR', '62', 'Pas-de-Calais', 81),
(245, 'FR', '63', 'Puy-de-Dôme', 81),
(246, 'FR', '64', 'Pyrénées-Atlantiques', 81),
(247, 'FR', '65', 'Hautes-Pyrénées', 81),
(248, 'FR', '66', 'Pyrénées-Orientales', 81),
(249, 'FR', '67', 'Bas-Rhin', 81),
(250, 'FR', '68', 'Haut-Rhin', 81),
(251, 'FR', '69', 'Rhône', 81),
(252, 'FR', '70', 'Haute-Saône', 81),
(253, 'FR', '71', 'Saône-et-Loire', 81),
(254, 'FR', '72', 'Sarthe', 81),
(255, 'FR', '73', 'Savoie', 81),
(256, 'FR', '74', 'Haute-Savoie', 81),
(257, 'FR', '75', 'Paris', 81),
(258, 'FR', '76', 'Seine-Maritime', 81),
(259, 'FR', '77', 'Seine-et-Marne', 81),
(260, 'FR', '78', 'Yvelines', 81),
(261, 'FR', '79', 'Deux-Sèvres', 81),
(262, 'FR', '80', 'Somme', 81),
(263, 'FR', '81', 'Tarn', 81),
(264, 'FR', '82', 'Tarn-et-Garonne', 81),
(265, 'FR', '83', 'Var', 81),
(266, 'FR', '84', 'Vaucluse', 81),
(267, 'FR', '85', 'Vendée', 81),
(268, 'FR', '86', 'Vienne', 81),
(269, 'FR', '87', 'Haute-Vienne', 81),
(270, 'FR', '88', 'Vosges', 81),
(271, 'FR', '89', 'Yonne', 81),
(272, 'FR', '90', 'Territoire-de-Belfort', 81),
(273, 'FR', '91', 'Essonne', 81),
(274, 'FR', '92', 'Hauts-de-Seine', 81),
(275, 'FR', '93', 'Seine-Saint-Denis', 81),
(276, 'FR', '94', 'Val-de-Marne', 81),
(277, 'FR', '95', 'Val-d\'Oise', 81),
(278, 'RO', 'AB', 'Alba', 185),
(279, 'RO', 'AR', 'Arad', 185),
(280, 'RO', 'AG', 'Argeş', 185),
(281, 'RO', 'BC', 'Bacău', 185),
(282, 'RO', 'BH', 'Bihor', 185),
(283, 'RO', 'BN', 'Bistriţa-Năsăud', 185),
(284, 'RO', 'BT', 'Botoşani', 185),
(285, 'RO', 'BV', 'Braşov', 185),
(286, 'RO', 'BR', 'Brăila', 185),
(287, 'RO', 'B', 'Bucureşti', 185),
(288, 'RO', 'BZ', 'Buzău', 185),
(289, 'RO', 'CS', 'Caraş-Severin', 185),
(290, 'RO', 'CL', 'Călăraşi', 185),
(291, 'RO', 'CJ', 'Cluj', 185),
(292, 'RO', 'CT', 'Constanţa', 185),
(293, 'RO', 'CV', 'Covasna', 185),
(294, 'RO', 'DB', 'Dâmboviţa', 185),
(295, 'RO', 'DJ', 'Dolj', 185),
(296, 'RO', 'GL', 'Galaţi', 185),
(297, 'RO', 'GR', 'Giurgiu', 185),
(298, 'RO', 'GJ', 'Gorj', 185),
(299, 'RO', 'HR', 'Harghita', 185),
(300, 'RO', 'HD', 'Hunedoara', 185),
(301, 'RO', 'IL', 'Ialomiţa', 185),
(302, 'RO', 'IS', 'Iaşi', 185),
(303, 'RO', 'IF', 'Ilfov', 185),
(304, 'RO', 'MM', 'Maramureş', 185),
(305, 'RO', 'MH', 'Mehedinţi', 185),
(306, 'RO', 'MS', 'Mureş', 185),
(307, 'RO', 'NT', 'Neamţ', 185),
(308, 'RO', 'OT', 'Olt', 185),
(309, 'RO', 'PH', 'Prahova', 185),
(310, 'RO', 'SM', 'Satu-Mare', 185),
(311, 'RO', 'SJ', 'Sălaj', 185),
(312, 'RO', 'SB', 'Sibiu', 185),
(313, 'RO', 'SV', 'Suceava', 185),
(314, 'RO', 'TR', 'Teleorman', 185),
(315, 'RO', 'TM', 'Timiş', 185),
(316, 'RO', 'TL', 'Tulcea', 185),
(317, 'RO', 'VS', 'Vaslui', 185),
(318, 'RO', 'VL', 'Vâlcea', 185),
(319, 'RO', 'VN', 'Vrancea', 185),
(320, 'FI', 'Lappi', 'Lappi', 80),
(321, 'FI', 'Pohjois-Pohjanmaa', 'Pohjois-Pohjanmaa', 80),
(322, 'FI', 'Kainuu', 'Kainuu', 80),
(323, 'FI', 'Pohjois-Karjala', 'Pohjois-Karjala', 80),
(324, 'FI', 'Pohjois-Savo', 'Pohjois-Savo', 80),
(325, 'FI', 'Etelä-Savo', 'Etelä-Savo', 80),
(326, 'FI', 'Etelä-Pohjanmaa', 'Etelä-Pohjanmaa', 80),
(327, 'FI', 'Pohjanmaa', 'Pohjanmaa', 80),
(328, 'FI', 'Pirkanmaa', 'Pirkanmaa', 80),
(329, 'FI', 'Satakunta', 'Satakunta', 80),
(330, 'FI', 'Keski-Pohjanmaa', 'Keski-Pohjanmaa', 80),
(331, 'FI', 'Keski-Suomi', 'Keski-Suomi', 80),
(332, 'FI', 'Varsinais-Suomi', 'Varsinais-Suomi', 80),
(333, 'FI', 'Etelä-Karjala', 'Etelä-Karjala', 80),
(334, 'FI', 'Päijät-Häme', 'Päijät-Häme', 80),
(335, 'FI', 'Kanta-Häme', 'Kanta-Häme', 80),
(336, 'FI', 'Uusimaa', 'Uusimaa', 80),
(337, 'FI', 'Itä-Uusimaa', 'Itä-Uusimaa', 80),
(338, 'FI', 'Kymenlaakso', 'Kymenlaakso', 80),
(339, 'FI', 'Ahvenanmaa', 'Ahvenanmaa', 80),
(340, 'EE', 'EE-37', 'Harjumaa', 74),
(341, 'EE', 'EE-39', 'Hiiumaa', 74),
(342, 'EE', 'EE-44', 'Ida-Virumaa', 74),
(343, 'EE', 'EE-49', 'Jõgevamaa', 74),
(344, 'EE', 'EE-51', 'Järvamaa', 74),
(345, 'EE', 'EE-57', 'Läänemaa', 74),
(346, 'EE', 'EE-59', 'Lääne-Virumaa', 74),
(347, 'EE', 'EE-65', 'Põlvamaa', 74),
(348, 'EE', 'EE-67', 'Pärnumaa', 74),
(349, 'EE', 'EE-70', 'Raplamaa', 74),
(350, 'EE', 'EE-74', 'Saaremaa', 74),
(351, 'EE', 'EE-78', 'Tartumaa', 74),
(352, 'EE', 'EE-82', 'Valgamaa', 74),
(353, 'EE', 'EE-84', 'Viljandimaa', 74),
(354, 'EE', 'EE-86', 'Võrumaa', 74),
(355, 'LV', 'LV-DGV', 'Daugavpils', 125),
(356, 'LV', 'LV-JEL', 'Jelgava', 125),
(357, 'LV', 'Jēkabpils', 'Jēkabpils', 125),
(358, 'LV', 'LV-JUR', 'Jūrmala', 125),
(359, 'LV', 'LV-LPX', 'Liepāja', 125),
(360, 'LV', 'LV-LE', 'Liepājas novads', 125),
(361, 'LV', 'LV-REZ', 'Rēzekne', 125),
(362, 'LV', 'LV-RIX', 'Rīga', 125),
(363, 'LV', 'LV-RI', 'Rīgas novads', 125),
(364, 'LV', 'Valmiera', 'Valmiera', 125),
(365, 'LV', 'LV-VEN', 'Ventspils', 125),
(366, 'LV', 'Aglonas novads', 'Aglonas novads', 125),
(367, 'LV', 'LV-AI', 'Aizkraukles novads', 125),
(368, 'LV', 'Aizputes novads', 'Aizputes novads', 125),
(369, 'LV', 'Aknīstes novads', 'Aknīstes novads', 125),
(370, 'LV', 'Alojas novads', 'Alojas novads', 125),
(371, 'LV', 'Alsungas novads', 'Alsungas novads', 125),
(372, 'LV', 'LV-AL', 'Alūksnes novads', 125),
(373, 'LV', 'Amatas novads', 'Amatas novads', 125),
(374, 'LV', 'Apes novads', 'Apes novads', 125),
(375, 'LV', 'Auces novads', 'Auces novads', 125),
(376, 'LV', 'Babītes novads', 'Babītes novads', 125),
(377, 'LV', 'Baldones novads', 'Baldones novads', 125),
(378, 'LV', 'Baltinavas novads', 'Baltinavas novads', 125),
(379, 'LV', 'LV-BL', 'Balvu novads', 125),
(380, 'LV', 'LV-BU', 'Bauskas novads', 125),
(381, 'LV', 'Beverīnas novads', 'Beverīnas novads', 125),
(382, 'LV', 'Brocēnu novads', 'Brocēnu novads', 125),
(383, 'LV', 'Burtnieku novads', 'Burtnieku novads', 125),
(384, 'LV', 'Carnikavas novads', 'Carnikavas novads', 125),
(385, 'LV', 'Cesvaines novads', 'Cesvaines novads', 125),
(386, 'LV', 'Ciblas novads', 'Ciblas novads', 125),
(387, 'LV', 'LV-CE', 'Cēsu novads', 125),
(388, 'LV', 'Dagdas novads', 'Dagdas novads', 125),
(389, 'LV', 'LV-DA', 'Daugavpils novads', 125),
(390, 'LV', 'LV-DO', 'Dobeles novads', 125),
(391, 'LV', 'Dundagas novads', 'Dundagas novads', 125),
(392, 'LV', 'Durbes novads', 'Durbes novads', 125),
(393, 'LV', 'Engures novads', 'Engures novads', 125),
(394, 'LV', 'Garkalnes novads', 'Garkalnes novads', 125),
(395, 'LV', 'Grobiņas novads', 'Grobiņas novads', 125),
(396, 'LV', 'LV-GU', 'Gulbenes novads', 125),
(397, 'LV', 'Iecavas novads', 'Iecavas novads', 125),
(398, 'LV', 'Ikšķiles novads', 'Ikšķiles novads', 125),
(399, 'LV', 'Ilūkstes novads', 'Ilūkstes novads', 125),
(400, 'LV', 'Inčukalna novads', 'Inčukalna novads', 125),
(401, 'LV', 'Jaunjelgavas novads', 'Jaunjelgavas novads', 125),
(402, 'LV', 'Jaunpiebalgas novads', 'Jaunpiebalgas novads', 125),
(403, 'LV', 'Jaunpils novads', 'Jaunpils novads', 125),
(404, 'LV', 'LV-JL', 'Jelgavas novads', 125),
(405, 'LV', 'LV-JK', 'Jēkabpils novads', 125),
(406, 'LV', 'Kandavas novads', 'Kandavas novads', 125),
(407, 'LV', 'Kokneses novads', 'Kokneses novads', 125),
(408, 'LV', 'Krimuldas novads', 'Krimuldas novads', 125),
(409, 'LV', 'Krustpils novads', 'Krustpils novads', 125),
(410, 'LV', 'LV-KR', 'Krāslavas novads', 125),
(411, 'LV', 'LV-KU', 'Kuldīgas novads', 125),
(412, 'LV', 'Kārsavas novads', 'Kārsavas novads', 125),
(413, 'LV', 'Lielvārdes novads', 'Lielvārdes novads', 125),
(414, 'LV', 'LV-LM', 'Limbažu novads', 125),
(415, 'LV', 'Lubānas novads', 'Lubānas novads', 125),
(416, 'LV', 'LV-LU', 'Ludzas novads', 125),
(417, 'LV', 'Līgatnes novads', 'Līgatnes novads', 125),
(418, 'LV', 'Līvānu novads', 'Līvānu novads', 125),
(419, 'LV', 'LV-MA', 'Madonas novads', 125),
(420, 'LV', 'Mazsalacas novads', 'Mazsalacas novads', 125),
(421, 'LV', 'Mālpils novads', 'Mālpils novads', 125),
(422, 'LV', 'Mārupes novads', 'Mārupes novads', 125),
(423, 'LV', 'Naukšēnu novads', 'Naukšēnu novads', 125),
(424, 'LV', 'Neretas novads', 'Neretas novads', 125),
(425, 'LV', 'Nīcas novads', 'Nīcas novads', 125),
(426, 'LV', 'LV-OG', 'Ogres novads', 125),
(427, 'LV', 'Olaines novads', 'Olaines novads', 125),
(428, 'LV', 'Ozolnieku novads', 'Ozolnieku novads', 125),
(429, 'LV', 'LV-PR', 'Preiļu novads', 125),
(430, 'LV', 'Priekules novads', 'Priekules novads', 125),
(431, 'LV', 'Priekuļu novads', 'Priekuļu novads', 125),
(432, 'LV', 'Pārgaujas novads', 'Pārgaujas novads', 125),
(433, 'LV', 'Pāvilostas novads', 'Pāvilostas novads', 125),
(434, 'LV', 'Pļaviņu novads', 'Pļaviņu novads', 125),
(435, 'LV', 'Raunas novads', 'Raunas novads', 125),
(436, 'LV', 'Riebiņu novads', 'Riebiņu novads', 125),
(437, 'LV', 'Rojas novads', 'Rojas novads', 125),
(438, 'LV', 'Ropažu novads', 'Ropažu novads', 125),
(439, 'LV', 'Rucavas novads', 'Rucavas novads', 125),
(440, 'LV', 'Rugāju novads', 'Rugāju novads', 125),
(441, 'LV', 'Rundāles novads', 'Rundāles novads', 125),
(442, 'LV', 'LV-RE', 'Rēzeknes novads', 125),
(443, 'LV', 'Rūjienas novads', 'Rūjienas novads', 125),
(444, 'LV', 'Salacgrīvas novads', 'Salacgrīvas novads', 125),
(445, 'LV', 'Salas novads', 'Salas novads', 125),
(446, 'LV', 'Salaspils novads', 'Salaspils novads', 125),
(447, 'LV', 'LV-SA', 'Saldus novads', 125),
(448, 'LV', 'Saulkrastu novads', 'Saulkrastu novads', 125),
(449, 'LV', 'Siguldas novads', 'Siguldas novads', 125),
(450, 'LV', 'Skrundas novads', 'Skrundas novads', 125),
(451, 'LV', 'Skrīveru novads', 'Skrīveru novads', 125),
(452, 'LV', 'Smiltenes novads', 'Smiltenes novads', 125),
(453, 'LV', 'Stopiņu novads', 'Stopiņu novads', 125),
(454, 'LV', 'Strenču novads', 'Strenču novads', 125),
(455, 'LV', 'Sējas novads', 'Sējas novads', 125),
(456, 'LV', 'LV-TA', 'Talsu novads', 125),
(457, 'LV', 'LV-TU', 'Tukuma novads', 125),
(458, 'LV', 'Tērvetes novads', 'Tērvetes novads', 125),
(459, 'LV', 'Vaiņodes novads', 'Vaiņodes novads', 125),
(460, 'LV', 'LV-VK', 'Valkas novads', 125),
(461, 'LV', 'LV-VM', 'Valmieras novads', 125),
(462, 'LV', 'Varakļānu novads', 'Varakļānu novads', 125),
(463, 'LV', 'Vecpiebalgas novads', 'Vecpiebalgas novads', 125),
(464, 'LV', 'Vecumnieku novads', 'Vecumnieku novads', 125),
(465, 'LV', 'LV-VE', 'Ventspils novads', 125),
(466, 'LV', 'Viesītes novads', 'Viesītes novads', 125),
(467, 'LV', 'Viļakas novads', 'Viļakas novads', 125),
(468, 'LV', 'Viļānu novads', 'Viļānu novads', 125),
(469, 'LV', 'Vārkavas novads', 'Vārkavas novads', 125),
(470, 'LV', 'Zilupes novads', 'Zilupes novads', 125),
(471, 'LV', 'Ādažu novads', 'Ādažu novads', 125),
(472, 'LV', 'Ērgļu novads', 'Ērgļu novads', 125),
(473, 'LV', 'Ķeguma novads', 'Ķeguma novads', 125),
(474, 'LV', 'Ķekavas novads', 'Ķekavas novads', 125),
(475, 'LT', 'LT-AL', 'Alytaus Apskritis', 131),
(476, 'LT', 'LT-KU', 'Kauno Apskritis', 131),
(477, 'LT', 'LT-KL', 'Klaipėdos Apskritis', 131),
(478, 'LT', 'LT-MR', 'Marijampolės Apskritis', 131),
(479, 'LT', 'LT-PN', 'Panevėžio Apskritis', 131),
(480, 'LT', 'LT-SA', 'Šiaulių Apskritis', 131),
(481, 'LT', 'LT-TA', 'Tauragės Apskritis', 131),
(482, 'LT', 'LT-TE', 'Telšių Apskritis', 131),
(483, 'LT', 'LT-UT', 'Utenos Apskritis', 131),
(484, 'LT', 'LT-VL', 'Vilniaus Apskritis', 131),
(485, 'BR', 'AC', 'Acre', 31),
(486, 'BR', 'AL', 'Alagoas', 31),
(487, 'BR', 'AP', 'Amapá', 31),
(488, 'BR', 'AM', 'Amazonas', 31),
(489, 'BR', 'BA', 'Bahia', 31),
(490, 'BR', 'CE', 'Ceará', 31),
(491, 'BR', 'ES', 'Espírito Santo', 31),
(492, 'BR', 'GO', 'Goiás', 31),
(493, 'BR', 'MA', 'Maranhão', 31),
(494, 'BR', 'MT', 'Mato Grosso', 31),
(495, 'BR', 'MS', 'Mato Grosso do Sul', 31),
(496, 'BR', 'MG', 'Minas Gerais', 31),
(497, 'BR', 'PA', 'Pará', 31),
(498, 'BR', 'PB', 'Paraíba', 31),
(499, 'BR', 'PR', 'Paraná', 31),
(500, 'BR', 'PE', 'Pernambuco', 31),
(501, 'BR', 'PI', 'Piauí', 31),
(502, 'BR', 'RJ', 'Rio de Janeiro', 31),
(503, 'BR', 'RN', 'Rio Grande do Norte', 31),
(504, 'BR', 'RS', 'Rio Grande do Sul', 31),
(505, 'BR', 'RO', 'Rondônia', 31),
(506, 'BR', 'RR', 'Roraima', 31),
(507, 'BR', 'SC', 'Santa Catarina', 31),
(508, 'BR', 'SP', 'São Paulo', 31),
(509, 'BR', 'SE', 'Sergipe', 31),
(510, 'BR', 'TO', 'Tocantins', 31),
(511, 'BR', 'DF', 'Distrito Federal', 31),
(512, 'HR', 'HR-01', 'Zagrebačka županija', 59),
(513, 'HR', 'HR-02', 'Krapinsko-zagorska županija', 59),
(514, 'HR', 'HR-03', 'Sisačko-moslavačka županija', 59),
(515, 'HR', 'HR-04', 'Karlovačka županija', 59),
(516, 'HR', 'HR-05', 'Varaždinska županija', 59),
(517, 'HR', 'HR-06', 'Koprivničko-križevačka županija', 59),
(518, 'HR', 'HR-07', 'Bjelovarsko-bilogorska županija', 59),
(519, 'HR', 'HR-08', 'Primorsko-goranska županija', 59),
(520, 'HR', 'HR-09', 'Ličko-senjska županija', 59),
(521, 'HR', 'HR-10', 'Virovitičko-podravska županija', 59),
(522, 'HR', 'HR-11', 'Požeško-slavonska županija', 59),
(523, 'HR', 'HR-12', 'Brodsko-posavska županija', 59),
(524, 'HR', 'HR-13', 'Zadarska županija', 59),
(525, 'HR', 'HR-14', 'Osječko-baranjska županija', 59),
(526, 'HR', 'HR-15', 'Šibensko-kninska županija', 59),
(527, 'HR', 'HR-16', 'Vukovarsko-srijemska županija', 59),
(528, 'HR', 'HR-17', 'Splitsko-dalmatinska županija', 59),
(529, 'HR', 'HR-18', 'Istarska županija', 59),
(530, 'HR', 'HR-19', 'Dubrovačko-neretvanska županija', 59),
(531, 'HR', 'HR-20', 'Međimurska županija', 59),
(532, 'HR', 'HR-21', 'Grad Zagreb', 59),
(533, 'IN', 'AN', 'Andaman and Nicobar Islands', 106),
(534, 'IN', 'AP', 'Andhra Pradesh', 106),
(535, 'IN', 'AR', 'Arunachal Pradesh', 106),
(536, 'IN', 'AS', 'Assam', 106),
(537, 'IN', 'BR', 'Bihar', 106),
(538, 'IN', 'CH', 'Chandigarh', 106),
(539, 'IN', 'CT', 'Chhattisgarh', 106),
(540, 'IN', 'DN', 'Dadra and Nagar Haveli', 106),
(541, 'IN', 'DD', 'Daman and Diu', 106),
(542, 'IN', 'DL', 'Delhi', 106),
(543, 'IN', 'GA', 'Goa', 106),
(544, 'IN', 'GJ', 'Gujarat', 106),
(545, 'IN', 'HR', 'Haryana', 106),
(546, 'IN', 'HP', 'Himachal Pradesh', 106),
(547, 'IN', 'JK', 'Jammu and Kashmir', 106),
(548, 'IN', 'JH', 'Jharkhand', 106),
(549, 'IN', 'KA', 'Karnataka', 106),
(550, 'IN', 'KL', 'Kerala', 106),
(551, 'IN', 'LD', 'Lakshadweep', 106),
(552, 'IN', 'MP', 'Madhya Pradesh', 106),
(553, 'IN', 'MH', 'Maharashtra', 106),
(554, 'IN', 'MN', 'Manipur', 106),
(555, 'IN', 'ML', 'Meghalaya', 106),
(556, 'IN', 'MZ', 'Mizoram', 106),
(557, 'IN', 'NL', 'Nagaland', 106),
(558, 'IN', 'OR', 'Odisha', 106),
(559, 'IN', 'PY', 'Puducherry', 106),
(560, 'IN', 'PB', 'Punjab', 106),
(561, 'IN', 'RJ', 'Rajasthan', 106),
(562, 'IN', 'SK', 'Sikkim', 106),
(563, 'IN', 'TN', 'Tamil Nadu', 106),
(564, 'IN', 'TG', 'Telangana', 106),
(565, 'IN', 'TR', 'Tripura', 106),
(566, 'IN', 'UP', 'Uttar Pradesh', 106),
(567, 'IN', 'UT', 'Uttarakhand', 106),
(568, 'IN', 'WB', 'West Bengal', 106);

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

--
-- Table structure for table `crmcustomers`
--

CREATE TABLE `crmcustomers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `organizations` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmcustomers`
--

INSERT INTO `crmcustomers` (`id`, `name`, `email`, `phone`, `address`, `organizations`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'John Doe', 'john.doe@example.com', '081234567890', '123 Main St, Jakarta', 'Company A', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(2, 'Jane Smith', 'jane.smith@example.com', '082345678901', '456 Oak Rd, Surabaya', 'Company B', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(3, 'Michael Brown', 'michael.brown@example.com', '083456789012', '789 Pine Blvd, Bandung', 'Company C', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(4, 'Emily White', 'emily.white@example.com', '084567890123', '101 Maple Ave, Medan', 'Company D', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(5, 'David Johnson', 'david.johnson@example.com', '085678901234', '202 Birch St, Bali', 'Company E', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(6, 'Sarah Lee', 'sarah.lee@example.com', '086789012345', '303 Cedar Dr, Makassar', 'Company F', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(7, 'James Williams', 'james.williams@example.com', '087890123456', '404 Elm St, Yogyakarta', 'Company G', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(8, 'Jessica Taylor', 'jessica.taylor@example.com', '088901234567', '505 Ash St, Malang', 'Company H', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(9, 'Brian Harris', 'brian.harris@example.com', '089012345678', '606 Willow Rd, Semarang', 'Company I', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(10, 'Megan Clark', 'megan.clark@example.com', '090123456789', '707 Pine Blvd, Palembang', 'Company J', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(11, 'Chris Davis', 'chris.davis@example.com', '091234567890', '808 Oak Dr, Batam', 'Company K', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(12, 'Laura Martin', 'laura.martin@example.com', '092345678901', '909 Maple Ave, Surabaya', 'Company L', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(13, 'Kevin Lewis', 'kevin.lewis@example.com', '093456789012', '101 Cedar Dr, Pontianak', 'Company M', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(14, 'Nancy Walker', 'nancy.walker@example.com', '094567890123', '202 Birch Blvd, Samarinda', 'Company N', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(15, 'Thomas Allen', 'thomas.allen@example.com', '095678901234', '303 Elm St, Solo', 'Company O', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(16, 'Rachel Young', 'rachel.young@example.com', '096789012345', '404 Pine Rd, Denpasar', 'Company P', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(17, 'Andrew King', 'andrew.king@example.com', '097890123456', '505 Maple Dr, Balikpapan', 'Company Q', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(18, 'Olivia Scott', 'olivia.scott@example.com', '098901234567', '606 Oak Blvd, Tangerang', 'Company R', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(19, 'Daniel Adams', 'daniel.adams@example.com', '099012345678', '707 Cedar St, Pontianak', 'Company S', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(20, 'Sophia Nelson', 'sophia.nelson@example.com', '100123456789', '808 Elm Rd, Makassar', 'Company T', '2024-11-15 07:57:48', '2024-11-15 07:57:48', NULL),
(21, 'dsfsdf', 'aaa@hh.com', '234234', 'gdgdfg', 'GAruda Indonesia', '2024-11-30 20:17:04', '2024-11-30 20:17:04', NULL),
(22, 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', 'jwwje', 'JEpang coy', '2024-11-30 20:17:38', '2024-11-30 20:17:38', NULL),
(23, 'halil hannah', 'saidisyabab99@gmail.comh', '085156627915', 'jwwje', 'Oxford dosen uyeh', '2024-11-30 20:24:13', '2024-11-30 20:24:13', NULL),
(24, 'halil hannahu', 'litaalmazia@gmail.com', '085156627915h', 'jwwje', 'Temasek', '2024-11-30 20:25:15', '2024-11-30 20:25:15', NULL),
(25, 'dsfsdfasd', 'aaa@hh.comdsa', '234234', 'gdgdfgdsa', 'Bank Central Asia', '2024-11-30 21:22:28', '2024-11-30 21:22:28', NULL),
(26, 'eergergasd', 'regergerg@ff.comds', '234234', 'gdgdfg', 'Vanguard', '2024-11-30 21:26:12', '2024-11-30 21:26:12', NULL),
(27, 'eergerg', 'regergerg@ff.comdassda', '234234', 'gdgdfg', 'Astra International', '2024-11-30 21:32:55', '2024-11-30 21:32:55', NULL),
(28, 'dsfsdf', 'aaa@hh.comasdasd', '234234', 'gdgdfg', 'Bank Central Asia', '2024-11-30 21:33:57', '2024-11-30 21:33:57', NULL),
(29, 'eergerg', 'regergerg@ff.comasd', '234234', 'gdgdfg', 'Temasek', '2024-11-30 21:34:22', '2024-11-30 21:34:22', NULL),
(30, 'sdfsd', 'litaalmazia@gmail.comdfs', '082314525726f', 'jwwje', 'Temasek', '2024-11-30 21:37:05', '2024-11-30 21:37:05', NULL),
(31, 'gfhfe', 'saidisyabab99@gmail.comgfd', '085156627915', 'jwwjegfdgffgd', 'Bank Central Asia', '2024-11-30 21:37:53', '2024-11-30 21:37:53', NULL),
(32, 'yolanda', 'ahliljannah24@gmail.comsdf', '085156627915', 'jwwje', 'Pertamina', '2024-11-30 21:38:43', '2024-11-30 21:38:43', NULL),
(33, 'dsfsdff', 'saidisyabab99@gmail.comf', '085156627915', 'jwwje', 'Blackrock', '2024-11-30 21:39:19', '2024-11-30 21:39:19', NULL),
(34, 'dsfsdf', 'aaa@hh.comgggg', '234234', 'gdgdfg', 'Blackrock', '2024-11-30 21:48:09', '2024-11-30 21:48:09', NULL),
(35, 'dsfsdf', 'aaa@hh.comdfsdfs', '234234', 'gdgdfg', 'Astra International', '2024-11-30 22:03:42', '2024-11-30 22:03:42', NULL),
(36, 'asasd', 'saidisyabab99@gmail.comasda', '085156627915', 'jwwje', 'Temasek', '2024-11-30 22:35:36', '2024-11-30 22:35:36', NULL),
(37, 'dsfsdfsda', 'aaa@hh.comasd', '234234', 'gdgdfg', 'Blackrock', '2024-11-30 22:36:04', '2024-11-30 22:36:04', NULL),
(38, 'dsfsdf', 'aaa@hh.comasddas', '234234sad', 'gdgdfg', 'Bank Central Asia', '2024-11-30 22:36:18', '2024-11-30 22:36:18', NULL),
(39, 'rfdgdf', 'saidisyabab99@gmail.comfdgfdg', '085156627915', 'jwwje', 'Berkshire Hathaway', '2024-12-01 10:55:57', '2024-12-01 10:55:57', NULL),
(40, 'asdasd', 'saidisyabab99@gmail.comasdsad', '085156627915', 'jwwje', 'Bank Central Asia', '2024-12-01 11:11:20', '2024-12-01 11:11:20', NULL),
(41, 'asdasd', 'saidisyabab99@gmail.comasdsadff', '085156627915', 'jwwje', 'Bank Central Asia', '2024-12-01 11:11:27', '2024-12-01 11:11:27', NULL),
(42, 'asdasd', 'saidisyabab99@gmail.comasdsadffasd', '085156627915', 'jwwje', 'Bank Central Asia', '2024-12-01 11:12:14', '2024-12-01 11:12:14', NULL),
(43, 'dsfsdf', 'saidisyabab99@gmail.comasdsadffasddsfgsd', '085156627915', 'jwwje', 'Berkshire Hathaway', '2024-12-01 11:13:13', '2024-12-01 11:13:13', NULL),
(44, 'eergerg', 'regergerg@ff.comfff', '234234', 'gdgdfg', 'Vanguard', '2024-12-01 11:13:45', '2024-12-01 11:13:45', NULL),
(45, 'dsa', 'saidisyabab99@gmail.comfdsfderggregfdf', '085156627915', 'jwwje', 'Vanguard', '2024-12-01 11:36:14', '2024-12-01 11:36:14', NULL),
(46, 'dfs', 'saidisyabffab99@gmail.comfdsfderggregfdfg', '085156627915', 'jwwje', 'Temasek', '2024-12-01 11:38:58', '2024-12-01 11:38:58', NULL),
(47, 'sdf', 'saidisyabffab99@gmail.comfdsfderggregfdfgf', '085156627915', 'jwwje', 'Blackrock', '2024-12-01 11:43:53', '2024-12-01 11:43:53', NULL),
(48, 'sdf', 'saidisyabffab99@gmail.comfdsfderggregfdfgfd', '085156627915', 'jwwje', 'Blackrock', '2024-12-01 11:43:59', '2024-12-01 11:43:59', NULL),
(49, 'sdfsd', 'saidisyabffab99@gmail.comfdsfderggregfdfgfdd', '085156627915', 'jwwje', 'Blackrock', '2024-12-01 11:44:12', '2024-12-01 11:44:12', NULL),
(50, 'sdfsd', 'saidisyabffabg99@gmail.comfdsfderggregfdfgfdd', '085156627915', 'jwwje', 'Blackrock', '2024-12-01 11:45:14', '2024-12-01 11:45:14', NULL),
(51, 'dsf', 'saidisyabffabg99f@gmail.comfdsfderggregfdfgfdd', '085156627915', 'jwwje', 'Temasek', '2024-12-01 11:46:55', '2024-12-01 11:46:55', NULL),
(52, 'dsf', '99f@gmail.comfdsfderggregfdfgfdd', '085156627915', 'jwwje', 'Temasek', '2024-12-01 11:47:09', '2024-12-01 11:47:09', NULL),
(53, 'hjjh', 'y9f@gmail.comfdsfderggregfdfgfdd', '085156627915', 'jwwje', 'Vanguard', '2024-12-01 11:51:54', '2024-12-01 11:51:54', NULL),
(54, 'jh', 'saidisyabab99@gmail.comms', 's', 'jwwje', 'Blackrock', '2024-12-01 11:52:36', '2024-12-01 11:52:36', NULL),
(55, 'ggegegge', 'aaa@hh.comds', '234234', 'gdgdfg', 'Astra International', '2024-12-02 08:18:12', '2024-12-02 08:18:12', NULL),
(56, 'saidi syabab ahlil jannah', 'saidisyabab99@gmail.com3333', '0851566279153', 'jwwje', 'Pertamina', '2024-12-03 16:19:29', '2024-12-03 16:19:29', NULL),
(57, 'sadasd', 'sadsad@hh.com', 'ds', 'dsa', 'Blackrock', '2024-12-03 16:20:19', '2024-12-03 16:20:19', NULL),
(58, 'dsfdsf', 'saidisyabab99@gmail.com3333y', '0851566279153', 'jwwje', 'Blackrock', '2024-12-03 16:22:10', '2024-12-03 16:22:10', NULL),
(59, 'faisal', 'aaa@hh.comdd', '234234', 'gdgdfg', 'Temasek', '2024-12-05 01:34:23', '2024-12-05 01:34:23', NULL),
(60, 'sasa', 'aaa@hh.comsas', '234234', 'gdgdfg', 'Berkshire Hathaway', '2024-12-05 01:39:34', '2024-12-05 01:39:34', NULL),
(61, 'sabar', 'sabar@ff.com', '1212', 'MAMARIKA', 'Berkshire Hathaway', '2024-12-05 04:00:55', '2024-12-05 04:00:55', NULL),
(62, 'fufufafa', 'aaa@hh.comss', '234234', 'gdgdfg', 'Astra International', '2024-12-05 06:49:03', '2024-12-05 06:49:03', NULL),
(63, 'jajan', 'jajan@hh.com', '12121', 'gdgdfg', 'Pertamina', '2024-12-06 01:59:41', '2024-12-06 01:59:41', NULL),
(64, 'hahaha', 'ahsajs@hh.com', '1212', 'sadsd', 'Temasek', '2024-12-06 02:01:57', '2024-12-06 02:01:57', NULL),
(65, 'tesssss', 'aaa@hh.comssssa', '234234', 'gdgdfg', 'Pertamina', '2024-12-06 02:41:43', '2024-12-06 02:41:43', NULL),
(66, 'jbkjjkkjhkh', 'aaa@hh.comsdssdd', '234234', 'gdgdfg', 'Vanguard', '2024-12-06 02:46:27', '2024-12-06 02:46:27', NULL),
(67, 'Sasuke Uchiha', 'admin@exasmpdle.coms', '1212', 'Konoha', 'Vanguard', '2024-12-10 08:18:06', '2024-12-10 08:18:06', NULL),
(68, 'Kuzu', 'admin@exasmpdle.comss', 'wqwq', 'jwwje', 'Berkshire Hathaway', '2024-12-10 08:22:45', '2024-12-10 08:22:45', NULL);

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

--
-- Table structure for table `crmdatagrid_saved_filters`
--

CREATE TABLE `crmdatagrid_saved_filters` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `src` varchar(255) NOT NULL,
  `applied` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`applied`)),
  `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 `crmemails`
--

CREATE TABLE `crmemails` (
  `id` int(10) UNSIGNED NOT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `source` varchar(255) NOT NULL,
  `user_type` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `reply` text DEFAULT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT 0,
  `folders` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`folders`)),
  `from` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`from`)),
  `sender` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`sender`)),
  `reply_to` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`reply_to`)),
  `cc` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`cc`)),
  `bcc` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`bcc`)),
  `unique_id` varchar(255) DEFAULT NULL,
  `message_id` varchar(255) NOT NULL,
  `reference_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`reference_ids`)),
  `person_id` int(10) UNSIGNED DEFAULT NULL,
  `lead_id` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `parent_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmemail_attachments`
--

CREATE TABLE `crmemail_attachments` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `path` varchar(255) NOT NULL,
  `size` int(11) DEFAULT NULL,
  `content_type` varchar(255) DEFAULT NULL,
  `content_id` varchar(255) DEFAULT NULL,
  `email_id` int(10) UNSIGNED 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 `crmemail_tags`
--

CREATE TABLE `crmemail_tags` (
  `tag_id` int(10) UNSIGNED NOT NULL,
  `email_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmemail_templates`
--

CREATE TABLE `crmemail_templates` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `content` text 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 `crmemail_templates`
--

INSERT INTO `crmemail_templates` (`id`, `name`, `subject`, `content`, `created_at`, `updated_at`) VALUES
(1, 'Activity created', 'Activity created: {%activities.title%}', '<p style=\"font-size: 16px; color: #5e5e5e;\">You have a new activity, please find the details bellow:</p>\n                                <p><strong style=\"font-size: 16px;\">Details</strong></p>\n                                <table style=\"height: 97px; width: 952px;\">\n                                    <tbody>\n                                        <tr>\n                                            <td style=\"width: 116.953px; color: #546e7a; font-size: 16px;\">Title</td>\n                                            <td style=\"width: 770.047px; font-size: 16px;\">{%activities.title%}</td>\n                                        </tr>\n                                        <tr>\n                                            <td style=\"width: 116.953px; color: #546e7a; font-size: 16px;\">Type</td>\n                                                <td style=\"width: 770.047px; font-size: 16px;\">{%activities.type%}</td>\n                                        </tr>\n                                        <tr>\n                                            <td style=\"width: 116.953px; color: #546e7a; font-size: 16px;\">Date</td>\n                                            <td style=\"width: 770.047px; font-size: 16px;\">{%activities.schedule_from%} to&nbsp;{%activities.schedule_to%}</td>\n                                        </tr>\n                                        <tr>\n                                            <td style=\"width: 116.953px; color: #546e7a; font-size: 16px; vertical-align: text-top;\">Participants</td>\n                                            <td style=\"width: 770.047px; font-size: 16px;\">{%activities.participants%}</td>\n                                        </tr>\n                                    </tbody>\n                                </table>', '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(2, 'Activity modified', 'Activity modified: {%activities.title%}', '<p style=\"font-size: 16px; color: #5e5e5e;\">You have a new activity modified, please find the details bellow:</p>\n                                <p><strong style=\"font-size: 16px;\">Details</strong></p>\n                                <table style=\"height: 97px; width: 952px;\">\n                                    <tbody>\n                                        <tr>\n                                            <td style=\"width: 116.953px; color: #546e7a; font-size: 16px;\">Title</td>\n                                            <td style=\"width: 770.047px; font-size: 16px;\">{%activities.title%}</td>\n                                        </tr>\n                                        <tr>\n                                            <td style=\"width: 116.953px; color: #546e7a; font-size: 16px;\">Type</td>\n                                            <td style=\"width: 770.047px; font-size: 16px;\">{%activities.type%}</td>\n                                        </tr>\n                                        <tr>\n                                            <td style=\"width: 116.953px; color: #546e7a; font-size: 16px;\">Date</td>\n                                            <td style=\"width: 770.047px; font-size: 16px;\">{%activities.schedule_from%} to&nbsp;{%activities.schedule_to%}</td>\n                                        </tr>\n                                        <tr>\n                                            <td style=\"width: 116.953px; color: #546e7a; font-size: 16px; vertical-align: text-top;\">Participants</td>\n                                            <td style=\"width: 770.047px; font-size: 16px;\">{%activities.participants%}</td>\n                                        </tr>\n                                    </tbody>\n                                </table>', '2024-11-14 16:54:20', '2024-11-14 16:54:20');

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

--
-- Table structure for table `crmfailed_jobs`
--

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

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

--
-- Table structure for table `crmgroups`
--

CREATE TABLE `crmgroups` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) 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 `crmgroups`
--

INSERT INTO `crmgroups` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Pertamina', 'Tes', '2024-11-19 06:35:01', '2024-11-19 06:35:01'),
(2, 'Astra', 'ytes', '2024-11-19 06:35:13', '2024-11-19 06:35:13'),
(3, 'BCA', 'res', '2024-11-19 06:35:23', '2024-11-19 06:35:23');

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

--
-- Table structure for table `crmhelpdesk_teams`
--

CREATE TABLE `crmhelpdesk_teams` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name_teams` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `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 `crmhelpdesk_teams`
--

INSERT INTO `crmhelpdesk_teams` (`id`, `name_teams`, `description`, `status`, `created_at`, `updated_at`) VALUES
(15, 'pesawat', 'tesss', 1, '2024-12-11 06:39:58', '2024-12-11 06:43:24'),
(22, 'mobilt', 'pajero', 1, '2024-12-11 07:06:35', '2024-12-11 14:24:48'),
(23, 'kapal', 'feri', 1, '2024-12-11 07:27:12', '2024-12-11 07:27:12');

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

--
-- Table structure for table `crmhelpdesk_teams_member`
--

CREATE TABLE `crmhelpdesk_teams_member` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `team_id` bigint(20) UNSIGNED NOT NULL,
  `name_member` varchar(255) NOT NULL,
  `email_member` varchar(255) NOT NULL,
  `no_hp_member` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmhelpdesk_teams_member`
--

INSERT INTO `crmhelpdesk_teams_member` (`id`, `team_id`, `name_member`, `email_member`, `no_hp_member`, `created_at`, `updated_at`, `user_id`) VALUES
(49, 15, 'Example Admin', 'admin@example.com', '121212', '2024-12-11 06:43:24', '2024-12-11 06:43:24', 1),
(50, 15, 'tes', 'tes@example.com', '213224', '2024-12-11 06:43:24', '2024-12-11 06:43:24', 2),
(74, 23, 'halil', 'halil@hh.com', '787878', '2024-12-11 07:43:40', '2024-12-11 07:43:40', 9),
(75, 23, 'Timff', 'timff@example.com', '445454', '2024-12-11 07:43:40', '2024-12-11 07:43:40', 8),
(76, 23, 'goku', 'goku@example.com', '454545', '2024-12-11 07:43:40', '2024-12-11 07:43:40', 7),
(77, 23, 'hana', 'hana@example.com', '4545', '2024-12-11 07:43:40', '2024-12-11 07:43:40', 5),
(78, 22, 'yoga', 'yoga@example.com', '', '2024-12-11 14:24:48', '2024-12-11 14:24:48', 3),
(79, 22, 'john', 'john@example.com', '234343', '2024-12-11 14:24:48', '2024-12-11 14:24:48', 4);

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

--
-- Table structure for table `crmleads`
--

CREATE TABLE `crmleads` (
  `id` int(10) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `lead_value` decimal(12,4) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `lost_reason` text DEFAULT NULL,
  `closed_at` datetime DEFAULT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `person_id` int(10) UNSIGNED NOT NULL,
  `lead_source_id` int(10) UNSIGNED NOT NULL,
  `lead_type_id` int(10) UNSIGNED NOT NULL,
  `lead_pipeline_id` int(10) UNSIGNED DEFAULT NULL,
  `lead_pipeline_stage_id` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `expected_close_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmleads`
--

INSERT INTO `crmleads` (`id`, `title`, `description`, `lead_value`, `status`, `lost_reason`, `closed_at`, `user_id`, `person_id`, `lead_source_id`, `lead_type_id`, `lead_pipeline_id`, `lead_pipeline_stage_id`, `created_at`, `updated_at`, `expected_close_date`) VALUES
(1, 'ads', 'sd', 1232.0000, 1, NULL, NULL, 1, 1, 3, 1, 1, 4, '2024-11-20 07:49:46', '2024-12-07 05:35:07', '2024-11-19'),
(2, 'wamen', 'menwa', 233232.0000, 1, NULL, NULL, 1, 3, 3, 1, 1, 2, '2024-11-25 02:22:51', '2024-12-07 05:35:09', '2024-11-12');

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

--
-- Table structure for table `crmlead_activities`
--

CREATE TABLE `crmlead_activities` (
  `activity_id` int(10) UNSIGNED NOT NULL,
  `lead_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmlead_activities`
--

INSERT INTO `crmlead_activities` (`activity_id`, `lead_id`) VALUES
(7, 1),
(8, 1),
(9, 1),
(10, 1),
(11, 1),
(12, 1),
(13, 1),
(14, 1),
(15, 1),
(16, 1),
(17, 1),
(18, 1),
(19, 1),
(20, 1),
(21, 1),
(22, 1),
(28, 1),
(33, 2),
(34, 2),
(35, 2),
(36, 2),
(37, 2),
(38, 2),
(39, 2),
(40, 2),
(41, 2),
(42, 2),
(43, 2),
(44, 2),
(45, 2),
(46, 2),
(47, 2),
(48, 1),
(49, 1),
(50, 2),
(51, 2),
(52, 1),
(53, 2);

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

--
-- Table structure for table `crmlead_pipelines`
--

CREATE TABLE `crmlead_pipelines` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `rotten_days` int(11) NOT NULL DEFAULT 30,
  `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 `crmlead_pipelines`
--

INSERT INTO `crmlead_pipelines` (`id`, `name`, `is_default`, `rotten_days`, `created_at`, `updated_at`) VALUES
(1, 'Default Pipeline', 1, 30, '2024-11-14 16:54:20', '2024-11-14 16:54:20');

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

--
-- Table structure for table `crmlead_pipeline_stages`
--

CREATE TABLE `crmlead_pipeline_stages` (
  `id` int(10) UNSIGNED NOT NULL,
  `code` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `probability` int(11) NOT NULL DEFAULT 0,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `lead_pipeline_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmlead_pipeline_stages`
--

INSERT INTO `crmlead_pipeline_stages` (`id`, `code`, `name`, `probability`, `sort_order`, `lead_pipeline_id`) VALUES
(1, 'new', 'New', 100, 1, 1),
(2, 'follow-up', 'Follow Up', 100, 2, 1),
(3, 'prospect', 'Prospect', 100, 3, 1),
(4, 'negotiation', 'Negotiation', 100, 4, 1),
(5, 'won', 'Won', 100, 5, 1),
(6, 'lost', 'Lost', 0, 6, 1);

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

--
-- Table structure for table `crmlead_products`
--

CREATE TABLE `crmlead_products` (
  `id` int(10) UNSIGNED NOT NULL,
  `quantity` int(11) NOT NULL DEFAULT 0,
  `price` decimal(12,4) DEFAULT NULL,
  `amount` decimal(12,4) DEFAULT NULL,
  `lead_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED 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 `crmlead_quotes`
--

CREATE TABLE `crmlead_quotes` (
  `quote_id` int(10) UNSIGNED NOT NULL,
  `lead_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmlead_sources`
--

CREATE TABLE `crmlead_sources` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) 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 `crmlead_sources`
--

INSERT INTO `crmlead_sources` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Email', '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(2, 'Web', '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(3, 'Web Form', '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(4, 'Phone', '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(5, 'Direct', '2024-11-14 16:54:20', '2024-11-14 16:54:20');

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

--
-- Table structure for table `crmlead_stages`
--

CREATE TABLE `crmlead_stages` (
  `id` int(10) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `is_user_defined` tinyint(1) NOT NULL DEFAULT 1,
  `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 `crmlead_tags`
--

CREATE TABLE `crmlead_tags` (
  `tag_id` int(10) UNSIGNED NOT NULL,
  `lead_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmlead_types`
--

CREATE TABLE `crmlead_types` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) 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 `crmlead_types`
--

INSERT INTO `crmlead_types` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'New Business', '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(2, 'Existing Business', '2024-11-14 16:54:20', '2024-11-14 16:54:20');

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

--
-- Table structure for table `crmmigrations`
--

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

--
-- Dumping data for table `crmmigrations`
--

INSERT INTO `crmmigrations` (`id`, `migration`, `batch`) VALUES
(1, '2019_08_19_000000_create_failed_jobs_table', 1),
(2, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(3, '2021_03_12_060658_create_core_config_table', 1),
(4, '2021_03_12_074578_create_groups_table', 1),
(5, '2021_03_12_074597_create_roles_table', 1),
(6, '2021_03_12_074857_create_users_table', 1),
(7, '2021_03_12_074867_create_user_groups_table', 1),
(8, '2021_03_12_074957_create_user_password_resets_table', 1),
(9, '2021_04_02_080709_create_attributes_table', 1),
(10, '2021_04_02_080837_create_attribute_options_table', 1),
(11, '2021_04_06_122751_create_attribute_values_table', 1),
(12, '2021_04_09_051326_create_organizations_table', 1),
(13, '2021_04_09_065617_create_persons_table', 1),
(14, '2021_04_09_065617_create_products_table', 1),
(15, '2021_04_12_173232_create_countries_table', 1),
(16, '2021_04_12_173344_create_country_states_table', 1),
(17, '2021_04_21_172825_create_lead_sources_table', 1),
(18, '2021_04_21_172847_create_lead_types_table', 1),
(19, '2021_04_22_153258_create_lead_stages_table', 1),
(20, '2021_04_22_155706_create_lead_pipelines_table', 1),
(21, '2021_04_22_155838_create_lead_pipeline_stages_table', 1),
(22, '2021_04_22_164215_create_leads_table', 1),
(23, '2021_04_22_171805_create_lead_products_table', 1),
(24, '2021_05_12_150329_create_activities_table', 1),
(25, '2021_05_12_150329_create_lead_activities_table', 1),
(26, '2021_05_15_151855_create_activity_files_table', 1),
(27, '2021_05_20_141230_create_tags_table', 1),
(28, '2021_05_20_141240_create_lead_tags_table', 1),
(29, '2021_05_24_075618_create_emails_table', 1),
(30, '2021_05_25_072700_create_email_attachments_table', 1),
(31, '2021_06_07_162808_add_lead_view_permission_column_in_users_table', 1),
(32, '2021_07_01_230345_create_quotes_table', 1),
(33, '2021_07_01_231317_create_quote_items_table', 1),
(34, '2021_07_02_201822_create_lead_quotes_table', 1),
(35, '2021_07_28_142453_create_activity_participants_table', 1),
(36, '2021_08_26_133538_create_workflows_table', 1),
(37, '2021_09_03_172713_create_email_templates_table', 1),
(38, '2021_09_22_194103_add_unique_index_to_name_in_organizations_table', 1),
(39, '2021_09_22_194622_add_unique_index_to_name_in_groups_table', 1),
(40, '2021_09_23_221138_add_column_expected_close_date_in_leads_table', 1),
(41, '2021_09_30_135857_add_column_rotten_days_in_lead_pipelines_table', 1),
(42, '2021_09_30_154222_alter_lead_pipeline_stages_table', 1),
(43, '2021_09_30_161722_alter_leads_table', 1),
(44, '2021_09_30_183825_change_user_id_to_nullable_in_leads_table', 1),
(45, '2021_10_02_170105_insert_expected_closed_date_column_in_attributes_table', 1),
(46, '2021_11_11_180804_change_lead_pipeline_stage_id_constraint_in_leads_table', 1),
(47, '2021_11_12_171510_add_image_column_in_users_table', 1),
(48, '2021_11_17_190943_add_location_column_in_activities_table', 1),
(49, '2021_12_14_213049_create_web_forms_table', 1),
(50, '2021_12_14_214923_create_web_form_attributes_table', 1),
(51, '2024_05_10_152848_create_saved_filters_table', 1),
(52, '2024_06_21_160707_create_warehouses_table', 1),
(53, '2024_06_21_160735_create_warehouse_locations_table', 1),
(54, '2024_06_24_174241_insert_warehouse_attributes_in_attributes_table', 1),
(55, '2024_06_28_154009_create_product_inventories_table', 1),
(56, '2024_07_24_150821_create_webhooks_table', 1),
(57, '2024_07_31_092951_add_job_title_in_persons_table', 1),
(58, '2024_07_31_093603_add_organization_sales_owner_attribute_in_attributes_table', 1),
(59, '2024_07_31_093605_add_person_job_title_attribute_in_attributes_table', 1),
(60, '2024_07_31_093605_add_person_sales_owner_attribute_in_attributes_table', 1),
(61, '2024_08_06_145943_create_person_tags_table', 1),
(62, '2024_08_06_161212_create_person_activities_table', 1),
(63, '2024_08_10_100329_create_warehouse_activities_table', 1),
(64, '2024_08_10_100340_create_warehouse_tags_table', 1),
(65, '2024_08_10_150329_create_product_activities_table', 1),
(66, '2024_08_10_150340_create_product_tags_table', 1),
(67, '2024_08_14_102116_add_user_id_column_in_persons_table', 1),
(68, '2024_08_14_102136_add_user_id_column_in_organizations_table', 1),
(69, '2024_08_21_153011_add_leads_stage_and_pipeline_attributes', 1),
(70, '2024_08_27_091619_create_email_tags_table', 1),
(71, '2024_09_06_065808_alter_product_inventories_table', 1),
(72, '2024_10_11_155257_create_helpdesk_teams_table', 2),
(73, '2024_10_11_162339_create_sla_policies_table', 2),
(74, '2024_10_24_083714_create_helpdesk_teams_member_table', 2),
(75, '2024_11_15_075345_create_within_table', 3),
(76, '2024_11_15_075536_create_tags_sla_table', 4),
(79, '2024_11_15_075728_create_customers_table', 5),
(82, '2024_11_15_073757_create_my_tickets_table', 6);

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

--
-- Table structure for table `crmmy_tickets`
--

CREATE TABLE `crmmy_tickets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `priority` varchar(255) NOT NULL,
  `stage` varchar(255) NOT NULL,
  `sla_deadline` varchar(255) NOT NULL,
  `helpdesk_team` varchar(255) NOT NULL,
  `assigned_to` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `customer_id` varchar(255) NOT NULL,
  `customer` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `sla_policy_id` varchar(255) NOT NULL,
  `image_url` text NOT NULL,
  `address` text NOT NULL,
  `organizations` varchar(255) NOT NULL,
  `activities` text NOT NULL,
  `tags` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `sla_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `closed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `ticket_url` text DEFAULT NULL,
  `problem_modal` text DEFAULT NULL,
  `solved_modal` text DEFAULT NULL,
  `ticket_number` varchar(200) DEFAULT NULL,
  `posted_by` varchar(100) DEFAULT NULL,
  `created_by` varchar(100) DEFAULT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `helpdesk_team_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmmy_tickets`
--

INSERT INTO `crmmy_tickets` (`id`, `priority`, `stage`, `sla_deadline`, `helpdesk_team`, `assigned_to`, `name`, `customer_id`, `customer`, `email`, `phone`, `sla_policy_id`, `image_url`, `address`, `organizations`, `activities`, `tags`, `description`, `sla_time`, `closed_at`, `created_at`, `updated_at`, `ticket_url`, `problem_modal`, `solved_modal`, `ticket_number`, `posted_by`, `created_by`, `user_id`, `helpdesk_team_id`) VALUES
(151, 'Medium', 'Closed', '3 days', 'sdf', 'yoga', 'oke', '23', 'halil hannah', 'saidisyabab99@gmail.comh', '085156627915', '', '[{\"id\":\"6756c10b34853\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/6756c10b33f6a_1733738763.png\"},{\"id\":\"6756c10b35ed2\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/6756c10b35a15_1733738763.jpg\"}]', 'jwwje', 'Oxford dosen uyeh', 'sd', 'Laptop', 'ad', '2024-12-10 09:39:58', '2024-12-10 08:09:58', '2024-12-04 03:39:45', '2024-12-10 08:09:58', '', 'p', 'by one dekk', 'TKT2024120001', 'Example Admin', NULL, NULL, NULL),
(152, 'Medium', 'Closed', '10 dd', 'dsa', 'Example Admin', 'gulasdsds', '5', 'David Johnson', 'david.johnson@example.com', '085678901234', '', '[{\"id\":\"6750808598758\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/6750808597d9f_1733329029.jpg\"}]', '202 Birch St, Bali', 'Company E', 'dfsds', 'jhjhj', 'sdsdf', '2024-12-09 09:06:32', '2024-12-09 07:36:32', '2024-12-04 03:40:16', '2024-12-09 07:36:32', '', NULL, NULL, 'TKT2024120002', NULL, NULL, NULL, NULL),
(153, 'Medium', 'Closed', '3 days', 'bosku', 'goku', 'eergergdd', '9', 'Brian Harris', 'brian.harris@example.com', '089012345678', '', '', '606 Willow Rd, Semarang', 'Company I', 'asd', 'Laptop', 'sad', '2024-12-11 04:42:25', '2024-12-11 03:12:25', '2024-12-04 03:45:21', '2024-12-11 03:12:25', '', 'sdasd', 'asdasdasd', 'TKT2024120003', 'goku', NULL, NULL, NULL),
(154, 'Medium', 'Closed', '2 days', 'sdf', 'yoga', 'sdad', '2', 'Jane Smith', 'jane.smith@example.com', '082345678901', '', '', '456 Oak Rd, Surabaya', 'Company B', 'sad', 'Mobil', 'sad', '2024-12-04 09:22:17', '2024-12-04 07:52:17', '2024-12-04 05:02:28', '2024-12-04 07:52:17', '', NULL, NULL, 'TKT2024120004', NULL, NULL, NULL, NULL),
(155, 'Medium', 'Closed', '2 days', 'fdser', 'yoga', 'hhhh', '31', 'gfhfe', 'saidisyabab99@gmail.comgfd', '085156627915', '', '', 'jwwjegfdgffgd', 'Bank Central Asia', 'saddsa', 'Mobil', 'asdsdas', '2024-12-10 09:39:57', '2024-12-10 08:09:57', '2024-12-04 05:03:23', '2024-12-10 08:09:57', '', NULL, NULL, 'TKT2024120005', NULL, NULL, NULL, NULL),
(157, 'Medium', 'Closed', '3 days', 'dsa', 'goku', 'saiyaaaaa', '1', 'John Doe', 'john.doe@example.com', '081234567890', '', '', '123 Main St, Jakarta', 'Company A', 'sadasdg', 'Laptop', 'sdasd', '2024-12-11 04:42:24', '2024-12-11 03:12:24', '2024-12-04 06:53:34', '2024-12-11 03:12:24', '', NULL, NULL, 'TKT2024120006', NULL, NULL, NULL, NULL),
(158, 'Medium', 'Closed', '3 days', 'bosku', 'yoga', 'asdasd', '5', 'David Johnson', 'david.johnson@example.com', '085678901234', '', '', '202 Birch St, Bali', 'Company E', 'sadsad', 'Laptop', 'sadsdasd', '2024-12-04 09:22:21', '2024-12-04 07:52:21', '2024-12-04 07:12:02', '2024-12-04 07:52:21', '', NULL, NULL, 'TKT2024120007', NULL, NULL, NULL, NULL),
(159, 'Medium', 'Closed', '3 days', 'dsa', 'john', 'cokiff', '23', 'halil hannah', 'saidisyabab99@gmail.comh', '085156627915', '', '[{\"id\":\"6751050fc5c7e\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/6751050fc547c_1733362959.jpg\"},{\"id\":\"6751050fc740f\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/6751050fc6f09_1733362959.jpg\"},{\"id\":\"6751050fc7ee7\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/6751050fc79f5_1733362959.jpg\"}]', 'jwwje', '2', 'sdf', 'Laptop', 'dfsdf', '2024-12-04 14:56:00', '2024-12-05 00:12:46', '2024-12-04 07:58:44', '2024-12-06 01:48:00', '', NULL, NULL, 'TKT2024120008', NULL, NULL, NULL, NULL),
(160, 'Medium', 'Closed', '3 days', 'dsa', 'Example Admin', 'sd', '56', 'saidi syabab ahlil jannah', 'saidisyabab99@gmail.com3333', '0851566279153', '', '[{\"id\":\"67506677c565d\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/67506677c4e21_1733322359.png\"},{\"id\":\"67506677c6731\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/67506677c629d_1733322359.jpg\"},{\"id\":\"67506677c7692\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/67506677c6d43_1733322359.jpg\"},{\"id\":\"67506677c846a\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/67506677c7c45_1733322359.jpg\"},{\"id\":\"67506677c8e3b\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/67506677c899b_1733322359.jpg\"}]', 'jwwje', 'Pertamina', 'dsfds', 'Laptop', 'dsfds', '2024-12-09 09:06:29', '2024-12-09 07:36:29', '2024-12-04 12:21:13', '2024-12-09 07:36:29', '', NULL, NULL, 'TKT2024120009', NULL, NULL, NULL, NULL),
(161, 'Medium', 'Closed', '3 days', 'bosku', 'yoga', 'sdfdsf', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '', 'jwwje', '6', 'dsfsd', 'Laptop', 'dsfdsfd', '2024-12-10 09:39:59', '2024-12-10 08:09:59', '2024-12-04 13:30:37', '2024-12-10 08:09:59', 'storage/tickets/2024/12/67506e8c0920b_1733324428.jpg,storage/tickets/2024/12/67506e8c0adc0_1733324428.png,storage/tickets/2024/12/67506e8c0ba2f_1733324428.png,storage/tickets/2024/12/67506e8c0c4dd_1733324428.jpg,storage/tickets/2024/12/67506e8c0ce05_1733324428.jpg', 'coki nob', 'by one dekkk', 'TKT2024120010', 'Example Admin', NULL, NULL, NULL),
(162, 'Low', 'Closed', '3 days', 'dsa', 'Example Admin', 'hhhh', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '[{\"id\":\"675104c67c876\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/675104c678f46_1733362886.jpg\"},{\"id\":\"675104c67e86e\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/675104c67e25f_1733362886.png\"},{\"id\":\"675104c67f827\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/675104c67f1a4_1733362886.jpg\"},{\"id\":\"675104c680743\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/675104c68001b_1733362886.jpg\"},{\"id\":\"675104c681bea\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/675104c680f85_1733362886.jpg\"}]', 'jwwje', '6', 'dsf', 'Laptop', 'dsf', '2024-12-09 09:06:33', '2024-12-09 07:36:33', '2024-12-04 13:31:18', '2024-12-09 07:36:33', 'storage/tickets/2024/12/67506eb54c55d_1733324469.png,storage/tickets/2024/12/67506eb54d5ec_1733324469.jpg,storage/tickets/2024/12/67506eb54dfea_1733324469.jpg,storage/tickets/2024/12/67506eb54ecd2_1733324469.jpg,storage/tickets/2024/12/67506eb54fa2d_1733324469.jpg', NULL, NULL, 'TKT2024120011', NULL, NULL, NULL, NULL),
(163, 'Medium', 'Closed', '3 days', 'dsa', 'yoga', 'eergerg', '23', 'halil hannah', 'saidisyabab99@gmail.comh', '085156627915', '', '', 'jwwje', '2', 'asd', 'Laptop', 'asdas', '2024-12-10 09:40:01', '2024-12-10 08:10:01', '2024-12-05 00:34:06', '2024-12-10 08:10:01', '', NULL, NULL, 'TKT2024120012', NULL, NULL, NULL, NULL),
(164, 'Medium', 'Closed', '2 days', 'bosku', 'Example Admin', 'asdasd', '1', 'John Doe', 'john.doe@example.com', '081234567890', '', '', '123 Main St, Jakarta', 'Company A', 'df', 'Mobil', 'gfd', '2024-12-09 09:06:35', '2024-12-09 07:36:35', '2024-12-05 00:52:01', '2024-12-09 07:36:35', '', NULL, NULL, 'TKT2024120013', NULL, NULL, NULL, NULL),
(165, 'Medium', 'Closed', '3 days', 'dsf', 'Example Admin', 'gaggasdd', '43', 'dsfsdf', 'saidisyabab99@gmail.comasdsadffasddsfgsd', '085156627915', '', '', 'jwwje', 'Berkshire Hathaway', 'sdf', 'Laptop', 'sdf', '2024-12-11 05:00:09', '2024-12-11 03:30:09', '2024-12-05 01:11:36', '2024-12-11 03:30:09', '', NULL, NULL, 'TKT2024120014', NULL, NULL, NULL, NULL),
(166, 'Medium', 'Closed', '10 dd', 'sdf', 'Example Admin', 'heheg', '62', 'fufufafa', 'aaa@hh.comss', '234234', '', '', 'gdgdfg', 'Astra International', 'dfgdfg', 'pesawat', 'fdgf', '2024-12-07 07:04:53', '2024-12-07 05:34:53', '2024-12-05 06:49:44', '2024-12-07 05:34:53', '', NULL, NULL, 'TKT2024120015', NULL, NULL, NULL, NULL),
(167, 'Medium', 'Closed', '3 days', 'sdf', 'Example Admin', 'dess', '3', 'Michael Brown', 'michael.brown@example.com', '083456789012', '', '', '789 Pine Blvd, Bandung', 'Company C', 'sadsad', 'Laptop', 'sdsadas', '2024-12-07 07:04:55', '2024-12-07 05:34:55', '2024-12-05 13:25:52', '2024-12-07 05:34:55', '', NULL, NULL, 'TKT2024120016', NULL, NULL, NULL, NULL),
(168, 'Low', 'Closed', '2 days', 'fdser', 'Example Admin', 'cekkk', '2', 'Jane Smith', 'jane.smith@example.com', '082345678901', '', '', '456 Oak Rd, Surabaya', 'Company B', 'dfs', 'Komputer', 'dfs', '2024-12-11 06:58:21', '2024-12-11 05:28:21', '2024-12-05 15:03:30', '2024-12-11 05:28:21', '', 'ini ada burungnya sehingga proses berjalan lama', 'bbruungnya dibuag agar bersih whwhwh', 'TKT2024120017', 'Example Admin', NULL, NULL, NULL),
(169, 'Medium', 'Closed', '3 days', 'fds', 'Example Admin', 'cewkkkkkd', '6', 'Sarah Lee', 'sarah.lee@example.com', '086789012345', '', '', '303 Cedar Dr, Makassar', 'Company F', 'dasdas', 'Komputer', 'sdasdsa', '2024-12-09 09:06:30', '2024-12-09 07:36:30', '2024-12-05 16:40:21', '2024-12-09 07:36:30', '', NULL, NULL, 'TKT2024120018', NULL, NULL, NULL, NULL),
(170, 'Medium', 'Closed', '3 days', 'bosku', 'tes', 'dfdsf', '64', 'hahaha', 'ahsajs@hh.com', '1212', '', '', 'sadsd', 'Temasek', 'dsf', 'Laptop', 'adf', '2024-12-11 17:32:15', '2024-12-11 16:02:15', '2024-12-06 02:02:20', '2024-12-11 16:02:15', '', NULL, NULL, 'TKT2024120019', NULL, NULL, NULL, NULL),
(171, 'Medium', 'Closed', '3 days', 'bosku', 'Example Admin', 'aresxs', '36', 'asasd', 'saidisyabab99@gmail.comasda', '085156627915', '', '', 'jwwje', 'Temasek', 'sdf', 'Laptop', 'sdf', '2024-12-09 09:06:27', '2024-12-09 07:36:27', '2024-12-06 02:04:17', '2024-12-09 07:36:27', '', NULL, NULL, 'TKT2024120020', NULL, NULL, NULL, NULL),
(172, 'Medium', 'Closed', '3 days', 'dsa', 'yoga', 'dfsfdf', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '', 'jwwje', '6', 'dfs', 'Laptop', 'dsf', '2024-12-10 09:40:03', '2024-12-10 08:10:03', '2024-12-06 02:09:49', '2024-12-10 08:10:03', '', NULL, NULL, 'TKT2024120021', NULL, NULL, NULL, NULL),
(173, 'Low', 'Closed', '2 days', 'dsa', 'goku', 'gagagaa', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '', 'jwwje', '6', 'ads', 'Komputer', 'sad', '2024-12-11 04:42:26', '2024-12-11 03:12:26', '2024-12-06 02:19:45', '2024-12-11 03:12:26', '', NULL, NULL, 'TKT2024120022', NULL, NULL, NULL, NULL),
(174, 'High', 'Closed', '3 days', 'dsa', 'john', 'asasa', '1', 'John Doe', 'john.doe@example.com', '081234567890', '', '', '123 Main St, Jakarta', 'Company A', 'asdsd', 'Application Minuszxc', 'sdsad', '2024-12-11 17:29:54', '2024-12-11 15:59:54', '2024-12-06 02:21:32', '2024-12-11 15:59:54', '', NULL, NULL, 'TKT2024120023', NULL, NULL, NULL, NULL),
(175, 'High', 'Closed', '3 days', 'bosku', 'yoga', 'asdasd', '36', 'asasd', 'saidisyabab99@gmail.comasda', '085156627915', '', '', 'jwwje', 'Temasek', 'sas', 'Application Minuszxc', 'asasa', '2024-12-10 09:40:04', '2024-12-10 08:10:04', '2024-12-06 02:35:20', '2024-12-10 08:10:04', '', NULL, NULL, 'TKT2024120024', NULL, NULL, NULL, NULL),
(176, 'High', 'Closed', '3 days', 'sdf', 'yoga', 'gehus', '60', 'sasa', 'aaa@hh.comsas', '234234', '', '[{\"id\":\"6752783790d5c\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/675278378fbd5_1733457975.png\"},{\"id\":\"6752783792670\",\"url\":\"http:\\/\\/127.0.0.1:8000\\/storage\\/tickets\\/2024\\/12\\/675278379218f_1733457975.jpg\"}]', 'gdgdfg', 'Berkshire Hathaway', 'asas', 'Application Minuszxc', 'asas', '2024-12-10 09:40:00', '2024-12-10 08:10:00', '2024-12-06 02:35:48', '2024-12-10 08:10:00', '', NULL, NULL, 'TKT2024120025', NULL, NULL, NULL, NULL),
(177, 'High', 'Closed', '3 days', 'bosku', 'yoga', 'gambar', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '', 'jwwje', '6', 'sad', 'Application Minuszxc', 'sad', '2024-12-10 09:40:06', '2024-12-10 08:10:06', '2024-12-06 02:37:03', '2024-12-10 08:10:06', 'storage/tickets/2024/12/67527858e8de1_1733458008.jpg,storage/tickets/2024/12/67527858e9e45_1733458008.png,storage/tickets/2024/12/67527858ea8b9_1733458008.jpg,storage/tickets/2024/12/67527858eb293_1733458008.jpg', NULL, NULL, 'TKT2024120026', NULL, NULL, NULL, NULL),
(178, 'Medium', 'Closed', '10 dd', 'dsa', 'hana', 'faaaassssss', '66', 'jbkjjkkjhkh', 'aaa@hh.comsdssdd', '234234', '', '', 'gdgdfg', 'Vanguard', 'asas', 'jhjhj', 'asasa', '2024-12-11 17:26:40', '2024-12-11 15:56:40', '2024-12-06 02:46:52', '2024-12-11 15:56:40', '', NULL, NULL, 'TKT2024120027', NULL, NULL, NULL, NULL),
(179, 'Medium', 'Closed', '3 days', 'dsa', 'tes', 'asdd', '35', 'dsfsdf', 'aaa@hh.comdfsdfs', '234234', '', '', 'gdgdfg', 'Astra International', 'sdf', 'Laptop', 'fdsa', '2024-12-11 17:32:18', '2024-12-11 16:02:18', '2024-12-09 07:14:26', '2024-12-11 16:02:18', '', NULL, NULL, 'TKT2024120028', NULL, NULL, NULL, NULL),
(180, 'Medium', 'Closed', '1 days', 'bosku', 'Example Admin', 'fsdsde', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '', 'jwwje', 'JEpang coy', 'zx', 'ass', 'xcz', '2024-12-11 05:00:07', '2024-12-11 03:30:07', '2024-12-09 07:15:05', '2024-12-11 03:30:07', '', NULL, NULL, 'TKT2024120029', NULL, NULL, NULL, NULL),
(181, 'Medium', 'Closed', '3 days', 'bosku', 'coki', 'asdasd', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '', 'jwwje', 'JEpang coy', 'sda', 'Laptop', 'SDADSD', '2024-12-09 15:29:07', '2024-12-09 13:59:07', '2024-12-09 07:16:23', '2024-12-09 13:59:07', '', NULL, NULL, 'TKT2024120030', NULL, NULL, NULL, NULL),
(182, 'High', 'Closed', '3 days', 'bosku', 'hana', 'asdsd', '28', 'dsfsdf', 'aaa@hh.comasdasd', '234234', '', '', 'gdgdfg', 'Bank Central Asia', 'sad', 'Application Minuszxc', 'sad', '2024-12-11 17:26:41', '2024-12-11 15:56:41', '2024-12-09 07:27:34', '2024-12-11 15:56:41', '', NULL, NULL, 'TKT2024120031', NULL, NULL, NULL, NULL),
(183, 'High', 'Closed', '3 days', 'bosku', 'coki', 'asdsd', '28', 'dsfsdf', 'aaa@hh.comasdasd', '234234', '', '', 'gdgdfg', 'Bank Central Asia', 'sad', 'Application Minuszxc', 'sad', '2024-12-09 15:29:10', '2024-12-09 13:59:10', '2024-12-09 07:27:34', '2024-12-09 13:59:10', '', NULL, NULL, 'TKT2024120032', NULL, NULL, NULL, NULL),
(184, 'High', 'Closed', '3 days', 'dsfiuiui', 'coki', 'zxczxcxdddddd', '28', 'dsfsdf', 'aaa@hh.comasdasd', '234234', '', '', 'gdgdfg', 'Bank Central Asia', 'asdd', 'Application Minuszxc', 'sad', '2024-12-09 15:29:08', '2024-12-09 13:59:08', '2024-12-09 07:31:57', '2024-12-09 13:59:08', '', NULL, NULL, 'TKT2024120033', NULL, NULL, NULL, NULL),
(185, 'Medium', 'Closed', '3 days', 'bosku', 'coki', 'hkghg', '53', 'hjjh', 'y9f@gmail.comfdsfderggregfdfgfdd', '085156627915', '', '', 'jwwje', 'Vanguard', 'jkhkjh', 'Laptop', 'jkhkjhjk', '2024-12-10 01:34:45', '2024-12-10 00:04:45', '2024-12-09 14:02:22', '2024-12-10 00:04:45', '', NULL, NULL, 'TKT2024120034', NULL, NULL, NULL, NULL),
(186, 'Medium', 'Closed', '1 days', 'saad', 'coki', 'tesqss', '53', 'hjjh', 'y9f@gmail.comfdsfderggregfdfgfdd', '085156627915', '', '', 'jwwje', 'Vanguard', 'asa', 'ass', 'asas', '2024-12-10 01:34:17', '2024-12-10 00:04:17', '2024-12-10 00:03:12', '2024-12-10 00:04:17', 'storage/tickets/2024/12/67579a5437d39_1733794388.jpg', 'aman boskuu', 'okee aman', 'TKT2024120035', 'coki', NULL, NULL, NULL),
(187, 'High', 'Closed', '20000 days', 'aimer sosialita', 'halil', '2000 ni boss', '3', 'Michael Brown', 'michael.brown@example.com', '083456789012', '', '', '789 Pine Blvd, Bandung', 'Company C', 'sdfsd', 'jet tempur', 'sdfsd', '2024-12-10 09:55:22', '2024-12-10 08:25:22', '2024-12-10 07:38:48', '2024-12-10 08:25:22', 'storage/tickets/2024/12/67580519c78b2_1733821721.jpg', NULL, NULL, 'TKT2024120036', NULL, NULL, NULL, NULL),
(188, 'Medium', 'Closed', '10 dd', 'dsa', 'coki', 'addasd', '21', 'dsfsdf', 'aaa@hh.com', '234234', '', '', 'gdgdfg', 'GAruda Indonesia', 'asd', 'jhjhj', 'sad', '2024-12-10 09:11:31', '2024-12-10 07:41:31', '2024-12-10 07:40:20', '2024-12-10 07:41:31', '', NULL, NULL, 'TKT2024120037', NULL, NULL, NULL, NULL),
(189, 'Low', 'Closed', '11 days', 'aimer sosialita', 'coki', 'sadasd', '19', 'Daniel Adams', 'daniel.adams@example.com', '099012345678', '', '', '707 Cedar St, Pontianak', 'Company S', 'sd', 'dj geming', 'sda', '2024-12-10 09:39:06', '2024-12-10 08:09:06', '2024-12-10 07:41:08', '2024-12-10 08:09:06', '', NULL, NULL, 'TKT2024120038', NULL, NULL, NULL, NULL),
(190, 'Low', 'Closed', '0 days', 'bosku', 'halil', 'sasuke', '67', 'Sasuke Uchiha', 'admin@exasmpdle.coms', '1212', '', '', 'Konoha', 'Vanguard', 'dsfs', 'hehe.com', 'sdff', '2024-12-11 17:32:20', '2024-12-11 16:02:20', '2024-12-10 08:19:41', '2024-12-11 16:02:20', 'storage/tickets/2024/12/67580e6fcd919_1733824111.jpg', NULL, NULL, 'TKT2024120039', NULL, NULL, NULL, NULL),
(191, 'Medium', 'Closed', '10 dd', 'aimer sosialita', 'Example Admin', 'Biirue', '67', 'Sasuke Uchiha', 'admin@exasmpdle.coms', '1212', '', '', 'Konoha', 'Vanguard', 'kklk;', 'jhjhj', 'asd', '2024-12-10 09:55:24', '2024-12-10 08:25:24', '2024-12-10 08:21:36', '2024-12-10 08:25:24', 'storage/tickets/2024/12/67580f15813b0_1733824277.png,storage/tickets/2024/12/67580f1582380_1733824277.jpg,storage/tickets/2024/12/67580f1582d4f_1733824277.jpg,storage/tickets/2024/12/67580f158369e_1733824277.jpg,storage/tickets/2024/12/67580f1583fb3_1733824277.jpg', NULL, NULL, 'TKT2024120040', NULL, NULL, NULL, NULL),
(192, 'Medium', 'Closed', '3 days', 'dsfiuiui', 'coki', 'rwerew', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '', 'jwwje', 'JEpang coy', 'sdf', 'Laptop', 'sdf', '2024-12-11 07:15:30', '2024-12-11 05:45:30', '2024-12-11 05:41:59', '2024-12-11 05:45:30', '', NULL, NULL, 'TKT2024120041', NULL, NULL, NULL, NULL),
(193, 'High', 'Closed', '3 days', '', 'goku', 'ggokk', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '', 'jwwje', 'JEpang coy', 'asdas', 'Application Minuszxc', 'asdsad', '2024-12-11 17:32:21', '2024-12-11 16:02:21', '2024-12-11 09:05:11', '2024-12-11 16:02:21', '', NULL, NULL, 'TKT2024120042', NULL, NULL, 7, 23),
(194, 'Medium', 'Closed', '3 days', '', 'goku', 'heyhey', '31', 'gfhfe', 'saidisyabab99@gmail.comgfd', '085156627915', '', '', 'jwwjegfdgffgd', 'Bank Central Asia', 'sdfds', 'Laptop', 'dsfsdf', '2024-12-11 17:32:23', '2024-12-11 16:02:23', '2024-12-11 09:11:15', '2024-12-11 16:02:23', '', NULL, NULL, 'TKT2024120043', NULL, NULL, 7, 23),
(195, 'High', 'Closed', '3 days', 'kapal', 'goku', 'saidi', '22', 'halil hannah', 'saidisyabab99@gmail.com', '085156627915', '', '', 'jwwje', 'JEpang coy', 'asasa', 'Application Minuszxc', 'asasas', '2024-12-11 17:20:26', '2024-12-11 15:50:26', '2024-12-11 13:20:32', '2024-12-11 15:50:26', 'storage/tickets/2024/12/6759a6b50e8aa_1733928629.jpg', 'oke', 'okee', 'TKT2024120044', 'goku', NULL, NULL, NULL),
(196, 'Medium', 'Closed', '3 days', 'kapal', 'goku', 'cekkkkff', '23', 'halil hannah', 'saidisyabab99@gmail.comh', '085156627915', '', '', 'jwwje', 'Oxford dosen uyeh', 'sdfds', 'Laptop', 'sdfsdf', '2024-12-11 17:20:24', '2024-12-11 15:50:24', '2024-12-11 13:37:07', '2024-12-11 15:50:24', 'storage/tickets/2024/12/6759aa990a504_1733929625.jpg', NULL, NULL, 'TKT2024120045', NULL, NULL, 7, 23),
(197, 'Medium', 'Closed', '10 dd', 'kapal', 'Timff', 'cekkkks', '5', 'David Johnson', 'david.johnson@example.com', '085678901234', '', '', '202 Birch St, Bali', 'Company E', 'sdfsd', 'jhjhj', 'sadfsdf', '2024-12-11 17:20:23', '2024-12-11 15:50:23', '2024-12-11 13:41:23', '2024-12-11 15:50:23', 'storage/tickets/2024/12/6759ab99141ed_1733929881.jpg', NULL, NULL, 'TKT2024120046', NULL, NULL, 8, 23),
(198, 'Medium', 'Closed', '3 days', 'mobil', 'yoga', 'cekk tiok', '21', 'dsfsdf', 'aaa@hh.com', '234234', '', '', 'gdgdfg', 'GAruda Indonesia', 'sdf', 'Laptop', 'dsaf', '2024-12-11 17:29:22', '2024-12-11 15:59:22', '2024-12-11 13:42:22', '2024-12-11 15:59:22', '', NULL, NULL, 'TKT2024120047', NULL, NULL, 3, 22),
(199, 'Medium', 'Closed', '3 days', 'pesawat', 'Example Admin', 'dsfdsfds', '25', 'dsfsdfasd', 'aaa@hh.comdsa', '234234', '', '', 'gdgdfgdsa', 'Bank Central Asia', 'sad', 'Laptop', 'sad', '2024-12-11 17:23:19', '2024-12-11 15:53:19', '2024-12-11 14:33:24', '2024-12-11 15:53:19', 'storage/tickets/2024/12/6759b7c76a11d_1733932999.png,storage/tickets/2024/12/6759b7c76b615_1733932999.jpg,storage/tickets/2024/12/6759b7c76c0c1_1733932999.jpg,storage/tickets/2024/12/6759b7c76cae9_1733932999.jpg,storage/tickets/2024/12/6759b7c76d66e_1733932999.jpg', NULL, NULL, 'TKT2024120048', NULL, NULL, 1, 15),
(200, 'High', 'Closed', '3 days', 'kapal', 'goku', 'pokasokasopkaspdo', '21', 'dsfsdf', 'aaa@hh.com', '234234', '', '', 'gdgdfg', 'GAruda Indonesia', 'dsfs', 'Application Minuszxc', 'dsfsd', '2024-12-11 16:58:03', '2024-12-11 15:28:03', '2024-12-11 15:27:44', '2024-12-11 15:28:03', '', NULL, NULL, 'TKT2024120049', NULL, NULL, 7, 23);

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

--
-- Table structure for table `crmmy_ticket_images`
--

CREATE TABLE `crmmy_ticket_images` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `filename` varchar(255) NOT NULL,
  `path` varchar(255) NOT NULL,
  `status` varchar(50) NOT NULL,
  `ticket_id` bigint(20) UNSIGNED DEFAULT NULL,
  `uploaded_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `crmorganizations`
--

CREATE TABLE `crmorganizations` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `address` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`address`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmorganizations`
--

INSERT INTO `crmorganizations` (`id`, `name`, `address`, `created_at`, `updated_at`, `user_id`) VALUES
(1, 'Blackrock', '{\"address\":\"\",\"country\":\"AL\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', '2024-11-20 00:06:43', '2024-11-20 00:06:43', NULL),
(2, 'Temasek', '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', '2024-11-20 00:06:52', '2024-11-20 00:06:52', NULL),
(3, 'Vanguard', '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', '2024-11-20 00:07:02', '2024-11-20 00:07:02', NULL),
(4, 'Berkshire Hathaway', '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', '2024-11-20 00:07:39', '2024-11-20 00:07:39', NULL),
(5, 'Pertamina', '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', '2024-11-20 00:07:52', '2024-11-20 00:07:52', NULL),
(6, 'Bank Central Asia', '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', '2024-11-20 00:08:10', '2024-11-20 00:08:10', NULL),
(7, 'Astra International', '{\"address\":\"\",\"country\":\"\",\"state\":\"\",\"city\":\"\",\"postcode\":\"\"}', '2024-11-20 00:08:33', '2024-11-20 00:08:33', NULL);

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

--
-- Table structure for table `crmpersons`
--

CREATE TABLE `crmpersons` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `emails` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`emails`)),
  `contact_numbers` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`contact_numbers`)),
  `organization_id` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `job_title` varchar(255) DEFAULT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmpersons`
--

INSERT INTO `crmpersons` (`id`, `name`, `emails`, `contact_numbers`, `organization_id`, `created_at`, `updated_at`, `job_title`, `user_id`) VALUES
(1, 'sadasd', '[{\"value\":\"aaa@hh.com\",\"label\":\"work\"}]', '[{\"value\":\"234234\",\"label\":\"work\"}]', 5, '2024-11-20 07:48:07', '2024-11-20 07:49:45', 'das', NULL),
(2, 'saidi', '[{\"value\":\"aaa@hh.comj\",\"label\":\"work\"}]', '[{\"value\":\"2342349\",\"label\":\"work\"}]', NULL, '2024-11-21 01:25:44', '2024-11-21 01:25:44', 'qqq', NULL),
(3, 'syabab', '[{\"value\":\"regergerg@ff.com\",\"label\":\"work\"}]', '[{\"value\":\"12122\",\"label\":\"work\"}]', NULL, '2024-11-25 02:22:51', '2024-11-25 02:22:51', NULL, NULL);

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

--
-- Table structure for table `crmperson_activities`
--

CREATE TABLE `crmperson_activities` (
  `activity_id` int(10) UNSIGNED NOT NULL,
  `person_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmperson_activities`
--

INSERT INTO `crmperson_activities` (`activity_id`, `person_id`) VALUES
(1, 1),
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(23, 2),
(24, 2),
(25, 2),
(26, 2),
(27, 2),
(29, 3),
(30, 3),
(31, 3),
(32, 3);

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

--
-- Table structure for table `crmperson_tags`
--

CREATE TABLE `crmperson_tags` (
  `tag_id` int(10) UNSIGNED NOT NULL,
  `person_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmproducts`
--

CREATE TABLE `crmproducts` (
  `id` int(10) UNSIGNED NOT NULL,
  `sku` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `quantity` int(11) NOT NULL DEFAULT 0,
  `price` decimal(12,4) DEFAULT 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 `crmproduct_activities`
--

CREATE TABLE `crmproduct_activities` (
  `activity_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmproduct_inventories`
--

CREATE TABLE `crmproduct_inventories` (
  `id` int(10) UNSIGNED NOT NULL,
  `in_stock` int(11) NOT NULL DEFAULT 0,
  `allocated` int(11) NOT NULL DEFAULT 0,
  `product_id` int(10) UNSIGNED NOT NULL,
  `warehouse_id` int(10) UNSIGNED DEFAULT NULL,
  `warehouse_location_id` int(10) UNSIGNED DEFAULT 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 `crmproduct_tags`
--

CREATE TABLE `crmproduct_tags` (
  `tag_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmquotes`
--

CREATE TABLE `crmquotes` (
  `id` int(10) UNSIGNED NOT NULL,
  `subject` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `billing_address` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`billing_address`)),
  `shipping_address` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`shipping_address`)),
  `discount_percent` decimal(12,4) DEFAULT 0.0000,
  `discount_amount` decimal(12,4) DEFAULT NULL,
  `tax_amount` decimal(12,4) DEFAULT NULL,
  `adjustment_amount` decimal(12,4) DEFAULT NULL,
  `sub_total` decimal(12,4) DEFAULT NULL,
  `grand_total` decimal(12,4) DEFAULT NULL,
  `expired_at` datetime DEFAULT NULL,
  `person_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED 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 `crmquote_items`
--

CREATE TABLE `crmquote_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `sku` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `quantity` int(11) DEFAULT 0,
  `price` decimal(12,4) NOT NULL DEFAULT 0.0000,
  `coupon_code` varchar(255) DEFAULT NULL,
  `discount_percent` decimal(12,4) DEFAULT 0.0000,
  `discount_amount` decimal(12,4) DEFAULT 0.0000,
  `tax_percent` decimal(12,4) DEFAULT 0.0000,
  `tax_amount` decimal(12,4) DEFAULT 0.0000,
  `total` decimal(12,4) NOT NULL DEFAULT 0.0000,
  `product_id` int(10) UNSIGNED NOT NULL,
  `quote_id` int(10) UNSIGNED 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 `crmroles`
--

CREATE TABLE `crmroles` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `permission_type` varchar(255) NOT NULL,
  `permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`permissions`)),
  `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 `crmroles`
--

INSERT INTO `crmroles` (`id`, `name`, `description`, `permission_type`, `permissions`, `created_at`, `updated_at`) VALUES
(1, 'Administrator', 'Administrator Role', 'all', NULL, NULL, NULL),
(2, 'Tes', 'Tes', 'custom', '[\"dashboard\",\"leads\",\"leads.create\",\"leads.view\",\"leads.edit\",\"leads.delete\",\"helpdeskside\",\"helpdeskside.helpdeskside\",\"helpdeskside.ticketanalysis\",\"helpdeskside.slastatus\",\"helpdeskside.myticket\",\"helpdeskside.myticket.create\",\"helpdeskside.myticket.view\",\"helpdeskside.myticket.edit\",\"helpdeskside.myticket.delete\",\"helpdeskside.allticket\",\"helpdeskside.allticket.create\",\"helpdeskside.allticket.view\",\"helpdeskside.allticket.edit\",\"helpdeskside.allticket.delete\",\"quotes\",\"quotes.create\",\"quotes.edit\",\"quotes.print\",\"quotes.delete\",\"mail\",\"mail.inbox\",\"mail.draft\",\"mail.outbox\",\"mail.sent\",\"mail.trash\",\"mail.compose\",\"mail.view\",\"mail.edit\",\"mail.delete\",\"activities\",\"activities.create\",\"activities.edit\",\"activities.delete\",\"contacts\",\"contacts.persons\",\"contacts.persons.create\",\"contacts.persons.edit\",\"contacts.persons.delete\",\"contacts.persons.export\",\"contacts.persons.view\",\"contacts.organizations\",\"contacts.organizations.create\",\"contacts.organizations.edit\",\"contacts.organizations.delete\",\"products\",\"products.create\",\"products.edit\",\"products.delete\",\"products.view\",\"settings\",\"settings.user\",\"settings.user.groups\",\"settings.user.groups.create\",\"settings.user.groups.edit\",\"settings.user.groups.delete\",\"settings.user.roles\",\"settings.user.roles.create\",\"settings.user.roles.edit\",\"settings.user.roles.delete\",\"settings.user.users\",\"settings.user.users.create\",\"settings.user.users.edit\",\"settings.user.users.delete\",\"settings.lead\",\"settings.lead.pipelines\",\"settings.lead.pipelines.create\",\"settings.lead.pipelines.edit\",\"settings.lead.pipelines.delete\",\"settings.lead.sources\",\"settings.lead.sources.create\",\"settings.lead.sources.edit\",\"settings.lead.sources.delete\",\"settings.lead.types\",\"settings.lead.types.create\",\"settings.lead.types.edit\",\"settings.lead.types.delete\",\"settings.helpdesk\",\"settings.helpdesk.helpdeskteams\",\"settings.helpdesk.helpdeskteams.create\",\"settings.helpdesk.helpdeskteams.view\",\"settings.helpdesk.helpdeskteams.edit\",\"settings.helpdesk.helpdeskteams.delete\",\"settings.helpdesk.slapolicies\",\"settings.helpdesk.slapolicies.create\",\"settings.helpdesk.slapolicies.edit\",\"settings.helpdesk.slapolicies.delete\",\"settings.automation\",\"settings.automation.attributes\",\"settings.automation.attributes.create\",\"settings.automation.attributes.edit\",\"settings.automation.attributes.delete\",\"settings.automation.webhooks\",\"settings.automation.webhooks.create\",\"settings.automation.webhooks.edit\",\"settings.automation.webhooks.delete\",\"settings.automation.workflows\",\"settings.automation.workflows.create\",\"settings.automation.workflows.edit\",\"settings.automation.workflows.delete\",\"settings.automation.email_templates\",\"settings.automation.email_templates.create\",\"settings.automation.email_templates.edit\",\"settings.automation.email_templates.delete\",\"settings.other_settings\",\"settings.other_settings.web_forms\",\"settings.other_settings.web_forms.view\",\"settings.other_settings.web_forms.create\",\"settings.other_settings.web_forms.edit\",\"settings.other_settings.web_forms.delete\",\"settings.other_settings.tags\",\"settings.other_settings.tags.create\",\"settings.other_settings.tags.edit\",\"settings.other_settings.tags.delete\",\"configuration\"]', '2024-11-22 09:23:39', '2024-12-11 16:00:56'),
(3, 'tes2', 'tes2', 'custom', '[\"dashboard\",\"leads\",\"leads.create\",\"leads.view\",\"leads.edit\",\"leads.delete\",\"helpdeskside\",\"helpdeskside.helpdeskside\",\"helpdeskside.ticketanalysis\",\"helpdeskside.slastatus\",\"helpdeskside.myticket\",\"helpdeskside.myticket.create\",\"helpdeskside.myticket.view\",\"helpdeskside.myticket.edit\",\"helpdeskside.myticket.delete\",\"helpdeskside.allticket\",\"helpdeskside.allticket.create\",\"helpdeskside.allticket.view\",\"helpdeskside.allticket.edit\",\"helpdeskside.allticket.delete\",\"quotes\",\"quotes.create\",\"quotes.edit\",\"quotes.print\",\"quotes.delete\",\"mail\",\"mail.inbox\",\"mail.draft\",\"mail.outbox\",\"mail.sent\",\"mail.trash\",\"mail.compose\",\"mail.view\",\"mail.edit\",\"mail.delete\",\"activities\",\"activities.create\",\"activities.edit\",\"activities.delete\",\"contacts\",\"contacts.persons\",\"contacts.persons.create\",\"contacts.persons.edit\",\"contacts.persons.delete\",\"contacts.persons.export\",\"contacts.persons.view\",\"contacts.organizations\",\"contacts.organizations.create\",\"contacts.organizations.edit\",\"contacts.organizations.delete\",\"products\",\"products.create\",\"products.edit\",\"products.delete\",\"products.view\",\"settings\",\"settings.user\",\"settings.user.groups\",\"settings.user.groups.create\",\"settings.user.groups.edit\",\"settings.user.groups.delete\",\"settings.user.roles\",\"settings.user.roles.create\",\"settings.user.roles.edit\",\"settings.user.roles.delete\",\"settings.user.users\",\"settings.user.users.create\",\"settings.user.users.edit\",\"settings.user.users.delete\",\"settings.lead\",\"settings.lead.pipelines\",\"settings.lead.pipelines.create\",\"settings.lead.pipelines.edit\",\"settings.lead.pipelines.delete\",\"settings.lead.sources\",\"settings.lead.sources.create\",\"settings.lead.sources.edit\",\"settings.lead.sources.delete\",\"settings.lead.types\",\"settings.lead.types.create\",\"settings.lead.types.edit\",\"settings.lead.types.delete\",\"settings.helpdesk\",\"settings.helpdesk.helpdeskteams\",\"settings.helpdesk.helpdeskteams.create\",\"settings.helpdesk.helpdeskteams.view\",\"settings.helpdesk.helpdeskteams.edit\",\"settings.helpdesk.helpdeskteams.delete\",\"settings.helpdesk.slapolicies\",\"settings.helpdesk.slapolicies.create\",\"settings.helpdesk.slapolicies.view\",\"settings.helpdesk.slapolicies.edit\",\"settings.helpdesk.slapolicies.delete\",\"settings.automation\",\"settings.automation.attributes\",\"settings.automation.attributes.create\",\"settings.automation.attributes.edit\",\"settings.automation.attributes.delete\",\"settings.automation.webhooks\",\"settings.automation.webhooks.create\",\"settings.automation.webhooks.edit\",\"settings.automation.webhooks.delete\",\"settings.automation.workflows\",\"settings.automation.workflows.create\",\"settings.automation.workflows.edit\",\"settings.automation.workflows.delete\",\"settings.automation.email_templates\",\"settings.automation.email_templates.create\",\"settings.automation.email_templates.edit\",\"settings.automation.email_templates.delete\",\"settings.other_settings\",\"settings.other_settings.web_forms\",\"settings.other_settings.web_forms.view\",\"settings.other_settings.web_forms.create\",\"settings.other_settings.web_forms.edit\",\"settings.other_settings.web_forms.delete\",\"settings.other_settings.tags\",\"settings.other_settings.tags.create\",\"settings.other_settings.tags.edit\",\"settings.other_settings.tags.delete\",\"configuration\"]', '2024-11-25 01:46:47', '2024-11-28 05:25:47');

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

--
-- Table structure for table `crmsla_policies`
--

CREATE TABLE `crmsla_policies` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `policy_name` varchar(255) NOT NULL,
  `priority` varchar(200) NOT NULL,
  `within` varchar(200) NOT NULL,
  `description` text NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `tags` varchar(200) DEFAULT NULL,
  `tag_id` int(100) UNSIGNED DEFAULT NULL,
  `within_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmsla_policies`
--

INSERT INTO `crmsla_policies` (`id`, `policy_name`, `priority`, `within`, `description`, `created_at`, `updated_at`, `tags`, `tag_id`, `within_id`) VALUES
(21, 'xcvcvxvc', 'Medium', '1 days', 'xcvcvx', '2024-12-04 02:56:42', '2024-12-04 02:56:42', 'ass', 7, 13),
(22, 'oke', 'Medium', '3 days', 'dsff', '2024-12-04 03:01:42', '2024-12-04 03:02:03', 'Laptop', 3, 15),
(23, 'haha', 'High', '3 days', 'sdfdfsd', '2024-12-04 05:01:19', '2024-12-05 15:57:03', 'Application Minuszxc', 9, 15),
(24, 'heheht', 'Medium', '10 dd', 'heheeh', '2024-12-05 03:17:28', '2024-12-05 16:39:25', 'jhjhj', 12, 33),
(25, 'haha', 'Low', '2 days', 'asdsad', '2024-12-05 14:15:35', '2024-12-05 14:15:35', 'Komputer', 2, 14),
(26, 'pesdsf', 'High', '1 days', 'asdasd', '2024-12-05 15:47:24', '2024-12-05 15:56:00', 'Komputer', 2, 13),
(27, 'sdf', 'Medium', '3 days', 'dfs', '2024-12-05 16:12:29', '2024-12-05 16:12:29', 'Mobil', 4, 15),
(28, 'dsfsdf', 'Medium', '3 days', 'dsfd', '2024-12-05 16:26:12', '2024-12-05 16:26:12', 'Komputer', NULL, 15),
(30, 'cvvvvw', 'Low', '11 days', 'asdad', '2024-12-09 07:38:30', '2024-12-10 06:41:00', 'dj geming', 15, 25),
(31, 'jet gess', 'High', '20000 days', 'hati2 meledak uyeh', '2024-12-10 06:32:16', '2024-12-10 06:41:16', 'jet tempur', 23, 39),
(32, 'sdf', 'High', '3 days', 'sdfsf', '2024-12-10 07:09:22', '2024-12-10 07:18:10', 'sepak bola1', 22, 15),
(33, 'asds', 'Low', '2 days', 'asdasd', '2024-12-10 07:12:01', '2024-12-10 07:17:54', 'volly', 24, 14),
(34, 'dfsd', 'Low', '2 days', 'dsfd', '2024-12-10 07:15:52', '2024-12-10 07:15:52', 'sepak bola', 21, 14),
(35, 'sdfdsf', 'Low', '30 days', 'dfsfds', '2024-12-10 07:16:56', '2024-12-10 07:17:41', 'Komputer', 2, 40),
(36, 'dsfd', 'Medium', '3 days', 'dfds', '2024-12-10 07:17:18', '2024-12-10 07:36:28', 'hehe.com', 25, 15),
(37, 'hehe oke', 'Low', '2 days', 'saddsd', '2024-12-10 07:20:44', '2024-12-11 14:25:47', 'hehe.com', 25, 14),
(38, 'hahahaasdasdu', 'High', '5 tes', 'sdfds', '2024-12-10 07:37:05', '2024-12-10 07:55:09', 'Laptop', 3, 32),
(39, 'tess', 'High', '1000 days', 'tes', '2024-12-11 14:10:23', '2024-12-11 14:11:46', 'Laptop', 3, 42);

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

--
-- Table structure for table `crmtags`
--

CREATE TABLE `crmtags` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `color` varchar(255) DEFAULT NULL,
  `user_id` int(10) UNSIGNED 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 `crmtags`
--

INSERT INTO `crmtags` (`id`, `name`, `color`, `user_id`, `created_at`, `updated_at`) VALUES
(1, 'ds', NULL, 6, '2024-11-26 02:48:40', '2024-11-26 02:48:40'),
(2, 'Komputer', '#ECFCCB', 6, '2024-11-26 06:03:20', '2024-11-26 06:03:20'),
(3, 'Laptop', NULL, 6, '2024-11-26 06:03:30', '2024-11-26 06:03:30'),
(4, 'Mobil', '#ECFCCB', 6, '2024-11-26 06:03:42', '2024-11-26 06:03:42'),
(5, 'Smartphone', '#DCFCE7', 6, '2024-11-26 06:04:02', '2024-11-26 06:04:02'),
(6, 'Application Minus', NULL, 1, '2024-11-30 21:15:03', '2024-11-30 21:15:03'),
(7, 'ass', NULL, 1, '2024-11-30 21:16:25', '2024-11-30 21:16:25'),
(8, 'sdsad', NULL, 1, '2024-11-30 21:17:27', '2024-11-30 21:17:27'),
(9, 'Application Minuszxc', NULL, 1, '2024-11-30 21:19:05', '2024-11-30 21:19:05'),
(10, 'asass', NULL, 1, '2024-11-30 21:20:32', '2024-11-30 21:20:32'),
(11, 'dsfsd', NULL, 1, '2024-12-01 12:22:16', '2024-12-01 12:22:16'),
(12, 'jhjhj', NULL, 3, '2024-12-04 01:37:24', '2024-12-04 01:37:24'),
(13, 'hhh', NULL, 1, '2024-12-05 01:57:11', '2024-12-05 01:57:11'),
(14, 'pesawat', NULL, 1, '2024-12-05 01:59:20', '2024-12-05 01:59:20'),
(15, 'dj geming', NULL, 1, '2024-12-05 02:57:06', '2024-12-05 02:57:06'),
(16, 'hahaha', NULL, 1, '2024-12-05 06:39:09', '2024-12-05 06:39:09'),
(17, 'elffff', NULL, 1, '2024-12-06 04:42:15', '2024-12-06 04:42:15'),
(18, 'tess aja', NULL, 1, '2024-12-06 04:43:47', '2024-12-06 04:43:47'),
(19, 'tesddd', NULL, 1, '2024-12-06 07:18:59', '2024-12-06 07:18:59'),
(20, 'cobaaaaaaa', NULL, 1, '2024-12-09 07:19:58', '2024-12-09 07:19:58'),
(21, 'sepak bola', NULL, 6, '2024-12-10 06:20:10', '2024-12-10 06:20:10'),
(22, 'sepak bola1', NULL, 6, '2024-12-10 06:25:19', '2024-12-10 06:25:19'),
(23, 'jet tempur', NULL, 6, '2024-12-10 06:31:26', '2024-12-10 06:31:26'),
(24, 'volly', NULL, 6, '2024-12-10 07:16:51', '2024-12-10 07:16:51'),
(25, 'hehe.com', NULL, 6, '2024-12-10 07:20:39', '2024-12-10 07:20:39'),
(26, 'halilwww', NULL, 1, '2024-12-10 08:22:52', '2024-12-10 08:22:52');

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

--
-- Table structure for table `crmtags_sla`
--

CREATE TABLE `crmtags_sla` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) 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 `crmtags_sla`
--

INSERT INTO `crmtags_sla` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Artificial Intelligence', '2024-11-15 02:59:43', '2024-11-15 02:59:43'),
(2, 'Blockchain Technology', '2024-11-15 02:59:43', '2024-11-15 02:59:43'),
(3, 'Cloud Computing', '2024-11-15 02:59:43', '2024-11-15 02:59:43'),
(4, 'Cybersecurity', '2024-11-15 02:59:43', '2024-11-15 02:59:43'),
(5, 'Data Science', '2024-11-15 02:59:43', '2024-11-15 02:59:43');

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

--
-- Table structure for table `crmticket_images`
--

CREATE TABLE `crmticket_images` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ticket_id` bigint(20) UNSIGNED DEFAULT NULL,
  `image_url` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `crmticket_logs`
--

CREATE TABLE `crmticket_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ticket_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(255) NOT NULL DEFAULT 'status_change',
  `description` varchar(255) NOT NULL,
  `old_value` varchar(255) DEFAULT NULL,
  `new_value` varchar(255) DEFAULT NULL,
  `changed_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `changed_by_name` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmticket_logs`
--

INSERT INTO `crmticket_logs` (`id`, `ticket_id`, `type`, `description`, `old_value`, `new_value`, `changed_by`, `created_at`, `updated_at`, `changed_by_name`) VALUES
(256, 153, 'status_change', 'Stage changed from \"Pending\" to \"New\" by goku', NULL, NULL, 7, '2024-12-04 03:51:47', '2024-12-04 03:51:47', 'goku'),
(257, 153, 'status_change', 'Stage changed from \"New\" to \"Pending\" by goku', NULL, NULL, 7, '2024-12-04 03:51:53', '2024-12-04 03:51:53', 'goku'),
(258, 153, 'status_change', 'Stage changed from \"Pending\" to \"In Progress\" by goku', NULL, NULL, 7, '2024-12-04 03:52:01', '2024-12-04 03:52:01', 'goku'),
(259, 153, 'ticket_updated', 'Ticket Name changed from \"eergergd\" to \"eergergdd\"', NULL, NULL, 7, '2024-12-04 03:52:17', '2024-12-04 03:52:17', 'goku'),
(260, 153, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Pending\" ', NULL, NULL, 7, '2024-12-04 03:54:14', '2024-12-04 03:54:14', 'goku'),
(261, 153, 'status_change', 'Ticket stage changed from \"Pending\" to \"Pending\"', 'Pending', 'Pending', 7, '2024-12-04 03:57:18', '2024-12-04 03:57:18', 'goku'),
(262, 153, 'status_change', 'Ticket stage changed from \"Pending\" to \"In Progress\"', 'Pending', 'In Progress', 7, '2024-12-04 03:57:38', '2024-12-04 03:57:38', 'goku'),
(263, 153, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Solved\"', 'In Progress', 'Solved', 7, '2024-12-04 03:57:57', '2024-12-04 03:57:57', 'goku'),
(264, 155, 'ticket_updated', 'Ticket Name changed from \"asdsd\" to \"hhhh\"', NULL, NULL, 1, '2024-12-04 05:03:45', '2024-12-04 05:03:45', 'Example Admin'),
(265, 155, 'ticket_updated', 'Assigned To changed from \"Example Admin\" to \"yoga\"', NULL, NULL, 1, '2024-12-04 05:03:55', '2024-12-04 05:03:55', 'Example Admin'),
(266, 152, 'status_change', 'Ticket stage changed from \"Pending\" to \"In Progress\"', 'Pending', 'In Progress', 1, '2024-12-04 05:05:12', '2024-12-04 05:05:12', 'Example Admin'),
(267, 152, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Pending\"', 'In Progress', 'Pending', 1, '2024-12-04 05:07:45', '2024-12-04 05:07:45', 'Example Admin'),
(268, 151, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 3, '2024-12-04 07:13:19', '2024-12-04 07:13:19', 'yoga'),
(269, 154, 'status_change', 'Ticket stage changed from \"New\" to \"In Progress\"', 'New', 'In Progress', 3, '2024-12-04 07:13:21', '2024-12-04 07:13:21', 'yoga'),
(270, 155, 'status_change', 'Ticket stage changed from \"New\" to \"In Progress\"', 'New', 'In Progress', 3, '2024-12-04 07:13:22', '2024-12-04 07:13:22', 'yoga'),
(271, 158, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 3, '2024-12-04 07:13:23', '2024-12-04 07:13:23', 'yoga'),
(272, 154, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Closed\"', 'In Progress', 'Closed', 3, '2024-12-04 07:52:17', '2024-12-04 07:52:17', 'yoga'),
(273, 155, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Closed\"', 'In Progress', 'Closed', 3, '2024-12-04 07:52:18', '2024-12-04 07:52:18', 'yoga'),
(274, 151, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 3, '2024-12-04 07:52:20', '2024-12-04 07:52:20', 'yoga'),
(275, 158, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 3, '2024-12-04 07:52:21', '2024-12-04 07:52:21', 'yoga'),
(276, 159, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 1, '2024-12-04 07:59:08', '2024-12-04 07:59:08', 'Example Admin'),
(277, 162, 'ticket_updated', 'Ticket Name changed from \"sdfdssfds\" to \"sdd\"', NULL, NULL, 6, '2024-12-04 14:11:03', '2024-12-04 14:11:03', 'coki'),
(278, 162, 'ticket_updated', 'Ticket Name changed from \"sdd\" to \"sddf\"', NULL, NULL, 6, '2024-12-04 14:12:27', '2024-12-04 14:12:27', 'coki'),
(279, 152, 'status_change', 'Ticket stage changed from \"Pending\" to \"In Progress\"', 'Pending', 'In Progress', 1, '2024-12-04 14:44:27', '2024-12-04 14:44:27', 'Example Admin'),
(280, 157, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 1, '2024-12-04 14:44:43', '2024-12-04 14:44:43', 'Example Admin'),
(281, 159, 'ticket_updated', 'Ticket Name changed from \"sdfdsfds\" to \"coki\"', NULL, NULL, 1, '2024-12-04 14:45:27', '2024-12-04 14:45:27', 'Example Admin'),
(282, 152, 'ticket_updated', 'Ticket Name changed from \"addsd\" to \"gula\"', NULL, NULL, 1, '2024-12-04 14:47:14', '2024-12-04 14:47:14', 'Example Admin'),
(283, 160, 'ticket_updated', 'Ticket Name changed from \"tgdsfsd\" to \"sd\"', NULL, NULL, 1, '2024-12-04 14:53:30', '2024-12-04 14:53:30', 'Example Admin'),
(284, 162, 'ticket_updated', 'Ticket Name changed from \"sddf\" to \"sddfk\"', NULL, NULL, 1, '2024-12-04 14:54:51', '2024-12-04 14:54:51', 'Example Admin'),
(285, 152, 'ticket_updated', 'Customer changed from \"dsfsdff\" to \"James Williams\"', NULL, NULL, 1, '2024-12-05 01:10:14', '2024-12-05 01:10:14', 'Example Admin'),
(286, 164, 'ticket_updated', 'Customer changed from \"Daniel Adams\" to \"John Doe\"', NULL, NULL, 1, '2024-12-05 05:00:05', '2024-12-05 05:00:05', 'Example Admin'),
(287, 160, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 1, '2024-12-05 06:06:00', '2024-12-05 06:06:00', 'Example Admin'),
(288, 155, 'status_change', 'Ticket stage changed from \"Closed\" to \"In Progress\"', 'Closed', 'In Progress', 1, '2024-12-05 06:06:17', '2024-12-05 06:06:17', 'Example Admin'),
(289, 155, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Pending\"', 'In Progress', 'Pending', 1, '2024-12-05 06:06:18', '2024-12-05 06:06:18', 'Example Admin'),
(290, 166, 'ticket_updated', 'Ticket Name changed from \"hehe\" to \"heheg\"', NULL, NULL, 1, '2024-12-05 06:49:56', '2024-12-05 06:49:56', 'Example Admin'),
(291, 171, 'status_change', 'Ticket stage changed from \"New\" to \"In Progress\"', 'New', 'In Progress', 1, '2024-12-06 02:04:29', '2024-12-06 02:04:29', 'Example Admin'),
(292, 171, 'ticket_updated', 'Ticket Name changed from \"aresx\" to \"aresxs\"', NULL, NULL, 1, '2024-12-06 02:07:37', '2024-12-06 02:07:37', 'Example Admin'),
(293, 157, 'ticket_updated', 'Ticket Name changed from \"asdsad\" to \"saiyaaaaa\"', NULL, NULL, 1, '2024-12-06 02:08:08', '2024-12-06 02:08:08', 'Example Admin'),
(294, 176, 'ticket_updated', 'Ticket Name changed from \"gehu\" to \"gehus\"', NULL, NULL, 1, '2024-12-06 02:36:20', '2024-12-06 02:36:20', 'Example Admin'),
(295, 157, 'status_change', 'Ticket stage changed from \"Pending\" to \"In Progress\"', 'Pending', 'In Progress', 1, '2024-12-06 02:37:29', '2024-12-06 02:37:29', 'Example Admin'),
(296, 171, 'ticket_updated', 'Tags changed from \"Laptop\" to \"14\"', NULL, NULL, 1, '2024-12-06 05:09:59', '2024-12-06 05:09:59', 'Example Admin'),
(297, 152, 'ticket_updated', 'Customer changed from \"James Williams\" to \"David Johnson\"\nTags changed from \"ass\" to \"2\"', NULL, NULL, 1, '2024-12-06 05:13:34', '2024-12-06 05:13:34', 'Example Admin'),
(298, 171, 'ticket_updated', 'Tags changed from \"14\" to \"3\"', NULL, NULL, 1, '2024-12-06 05:15:33', '2024-12-06 05:15:33', 'Example Admin'),
(299, 171, 'ticket_updated', 'Tags changed from \"3\" to \"Laptop\"', NULL, NULL, 1, '2024-12-06 05:17:49', '2024-12-06 05:17:49', 'Example Admin'),
(300, 152, 'ticket_updated', 'Tags changed from \"2\" to \"elffff\"', NULL, NULL, 1, '2024-12-06 05:18:33', '2024-12-06 05:18:33', 'Example Admin'),
(301, 152, 'ticket_updated', 'Stage changed from \"In Progress\" to \"New\"\nSLA Deadline changed from \"1 days\" to \"10 dd\"\nTags changed from \"elffff\" to \"jhjhj\"', NULL, NULL, 1, '2024-12-06 05:26:57', '2024-12-06 05:26:57', 'Example Admin'),
(302, 166, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 1, '2024-12-07 05:32:57', '2024-12-07 05:32:57', 'Example Admin'),
(303, 167, 'status_change', 'Ticket stage changed from \"New\" to \"In Progress\"', 'New', 'In Progress', 1, '2024-12-07 05:32:59', '2024-12-07 05:32:59', 'Example Admin'),
(304, 176, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 1, '2024-12-07 05:33:01', '2024-12-07 05:33:01', 'Example Admin'),
(305, 166, 'status_change', 'Ticket stage changed from \"Pending\" to \"In Progress\"', 'Pending', 'In Progress', 1, '2024-12-07 05:33:06', '2024-12-07 05:33:06', 'Example Admin'),
(306, 166, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Closed\"', 'In Progress', 'Closed', 1, '2024-12-07 05:34:53', '2024-12-07 05:34:53', 'Example Admin'),
(307, 167, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Closed\"', 'In Progress', 'Closed', 1, '2024-12-07 05:34:55', '2024-12-07 05:34:55', 'Example Admin'),
(308, 184, 'ticket_updated', 'Ticket Name changed from \"zxczxcx\" to \"zxczxcxdddddd\"\nPriority changed from \"Medium\" to \"High\"\nSLA Deadline changed from \"10 dd\" to \"3 days\"\nTags changed from \"jhjhj\" to \"Application Minuszxc\"', NULL, NULL, 1, '2024-12-09 07:32:14', '2024-12-09 07:32:14', 'Example Admin'),
(309, 184, 'status_change', 'Ticket stage changed from \"New\" to \"In Progress\"', 'New', 'In Progress', 1, '2024-12-09 07:34:07', '2024-12-09 07:34:07', 'Example Admin'),
(310, 171, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Closed\"', 'In Progress', 'Closed', 1, '2024-12-09 07:36:27', '2024-12-09 07:36:27', 'Example Admin'),
(311, 160, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 1, '2024-12-09 07:36:29', '2024-12-09 07:36:29', 'Example Admin'),
(312, 169, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 1, '2024-12-09 07:36:30', '2024-12-09 07:36:30', 'Example Admin'),
(313, 152, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 1, '2024-12-09 07:36:32', '2024-12-09 07:36:32', 'Example Admin'),
(314, 162, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 1, '2024-12-09 07:36:33', '2024-12-09 07:36:33', 'Example Admin'),
(315, 164, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 1, '2024-12-09 07:36:35', '2024-12-09 07:36:35', 'Example Admin'),
(316, 165, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 1, '2024-12-09 07:36:39', '2024-12-09 07:36:39', 'Example Admin'),
(317, 168, 'status_change', 'Ticket stage changed from \"New\" to \"In Progress\"', 'New', 'In Progress', 1, '2024-12-09 07:36:40', '2024-12-09 07:36:40', 'Example Admin'),
(318, 180, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 1, '2024-12-09 07:36:41', '2024-12-09 07:36:41', 'Example Admin'),
(319, 181, 'status_change', 'Ticket stage changed from \"New\" to \"In Progress\"', 'New', 'In Progress', 1, '2024-12-09 07:36:43', '2024-12-09 07:36:43', 'Example Admin'),
(320, 165, 'status_change', 'Ticket stage changed from \"Pending\" to \"New\"', 'Pending', 'New', 1, '2024-12-09 08:29:28', '2024-12-09 08:29:28', 'Example Admin'),
(321, 168, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Solved\"', 'In Progress', 'Solved', 1, '2024-12-09 08:34:21', '2024-12-09 08:34:21', 'Example Admin'),
(322, 161, 'status_change', 'Ticket stage changed from \"New\" to \"Solved\"', 'New', 'Solved', 1, '2024-12-09 08:35:04', '2024-12-09 08:35:04', 'Example Admin'),
(323, 151, 'status_change', 'Ticket stage changed from \"Closed\" to \"Solved\"', 'Closed', 'Solved', 1, '2024-12-09 08:37:00', '2024-12-09 08:37:00', 'Example Admin'),
(324, 183, 'ticket_updated', 'Assigned To changed from \"hana\" to \"coki\"', NULL, NULL, 6, '2024-12-09 13:57:47', '2024-12-09 13:57:47', 'coki'),
(325, 181, 'ticket_updated', 'Assigned To changed from \"Example Admin\" to \"coki\"', NULL, NULL, 6, '2024-12-09 13:58:00', '2024-12-09 13:58:00', 'coki'),
(326, 184, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Pending\"', 'In Progress', 'Pending', 6, '2024-12-09 13:58:52', '2024-12-09 13:58:52', 'coki'),
(327, 183, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 6, '2024-12-09 13:58:54', '2024-12-09 13:58:54', 'coki'),
(328, 181, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Pending\"', 'In Progress', 'Pending', 6, '2024-12-09 13:58:55', '2024-12-09 13:58:55', 'coki'),
(329, 181, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 6, '2024-12-09 13:59:07', '2024-12-09 13:59:07', 'coki'),
(330, 184, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 6, '2024-12-09 13:59:08', '2024-12-09 13:59:08', 'coki'),
(331, 183, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 6, '2024-12-09 13:59:10', '2024-12-09 13:59:10', 'coki'),
(332, 186, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 6, '2024-12-10 00:03:59', '2024-12-10 00:03:59', 'coki'),
(333, 186, 'status_change', 'Ticket stage changed from \"Pending\" to \"In Progress\"', 'Pending', 'In Progress', 6, '2024-12-10 00:04:03', '2024-12-10 00:04:03', 'coki'),
(334, 186, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Solved\"', 'In Progress', 'Solved', 6, '2024-12-10 00:04:15', '2024-12-10 00:04:15', 'coki'),
(335, 186, 'status_change', 'Ticket stage changed from \"Solved\" to \"Closed\"', 'Solved', 'Closed', 6, '2024-12-10 00:04:17', '2024-12-10 00:04:17', 'coki'),
(336, 185, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 6, '2024-12-10 00:04:45', '2024-12-10 00:04:45', 'coki'),
(337, 188, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 6, '2024-12-10 07:41:31', '2024-12-10 07:41:31', 'coki'),
(338, 189, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 6, '2024-12-10 08:09:06', '2024-12-10 08:09:06', 'coki'),
(339, 155, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 3, '2024-12-10 08:09:57', '2024-12-10 08:09:57', 'yoga'),
(340, 151, 'status_change', 'Ticket stage changed from \"Solved\" to \"Closed\"', 'Solved', 'Closed', 3, '2024-12-10 08:09:58', '2024-12-10 08:09:58', 'yoga'),
(341, 161, 'status_change', 'Ticket stage changed from \"Solved\" to \"Closed\"', 'Solved', 'Closed', 3, '2024-12-10 08:09:59', '2024-12-10 08:09:59', 'yoga'),
(342, 176, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 3, '2024-12-10 08:10:00', '2024-12-10 08:10:00', 'yoga'),
(343, 163, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 3, '2024-12-10 08:10:01', '2024-12-10 08:10:01', 'yoga'),
(344, 172, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 3, '2024-12-10 08:10:03', '2024-12-10 08:10:03', 'yoga'),
(345, 175, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 3, '2024-12-10 08:10:04', '2024-12-10 08:10:04', 'yoga'),
(346, 177, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 3, '2024-12-10 08:10:06', '2024-12-10 08:10:06', 'yoga'),
(347, 191, 'ticket_updated', 'Ticket Name changed from \"Biiru\" to \"Biirue\"', NULL, NULL, 1, '2024-12-10 08:21:54', '2024-12-10 08:21:54', 'Example Admin'),
(348, 180, 'ticket_updated', 'Ticket Name changed from \"fsdsd\" to \"fsdsde\"', NULL, NULL, 1, '2024-12-10 08:22:14', '2024-12-10 08:22:14', 'Example Admin'),
(349, 187, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 3, '2024-12-10 08:25:22', '2024-12-10 08:25:22', 'yoga'),
(350, 191, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 3, '2024-12-10 08:25:24', '2024-12-10 08:25:24', 'yoga'),
(351, 157, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Closed\"', 'In Progress', 'Closed', 7, '2024-12-11 03:12:24', '2024-12-11 03:12:24', 'goku'),
(352, 153, 'status_change', 'Ticket stage changed from \"Solved\" to \"Closed\"', 'Solved', 'Closed', 7, '2024-12-11 03:12:25', '2024-12-11 03:12:25', 'goku'),
(353, 173, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 7, '2024-12-11 03:12:26', '2024-12-11 03:12:26', 'goku'),
(354, 180, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 1, '2024-12-11 03:30:07', '2024-12-11 03:30:07', 'Example Admin'),
(355, 165, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 1, '2024-12-11 03:30:09', '2024-12-11 03:30:09', 'Example Admin'),
(356, 168, 'status_change', 'Ticket stage changed from \"Solved\" to \"Closed\"', 'Solved', 'Closed', 6, '2024-12-11 05:28:21', '2024-12-11 05:28:21', 'coki'),
(357, 192, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 6, '2024-12-11 05:45:26', '2024-12-11 05:45:26', 'coki'),
(358, 192, 'status_change', 'Ticket stage changed from \"Pending\" to \"In Progress\"', 'Pending', 'In Progress', 6, '2024-12-11 05:45:28', '2024-12-11 05:45:28', 'coki'),
(359, 192, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Closed\"', 'In Progress', 'Closed', 6, '2024-12-11 05:45:30', '2024-12-11 05:45:30', 'coki'),
(360, 196, 'ticket_updated', 'Ticket Name changed from \"cekkk\" to \"cekkkkff\"', NULL, NULL, 7, '2024-12-11 13:55:41', '2024-12-11 13:55:41', 'goku'),
(361, 198, 'ticket_updated', 'Ticket Name changed from \"sdfsdf\" to \"cekk tiok\"', NULL, NULL, 7, '2024-12-11 14:00:54', '2024-12-11 14:00:54', 'goku'),
(362, 193, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 7, '2024-12-11 14:33:54', '2024-12-11 14:33:54', 'goku'),
(363, 194, 'status_change', 'Ticket stage changed from \"New\" to \"In Progress\"', 'New', 'In Progress', 7, '2024-12-11 14:33:56', '2024-12-11 14:33:56', 'goku'),
(364, 195, 'status_change', 'Ticket stage changed from \"New\" to \"Solved\"', 'New', 'Solved', 7, '2024-12-11 14:34:01', '2024-12-11 14:34:01', 'goku'),
(365, 197, 'status_change', 'Ticket stage changed from \"New\" to \"Pending\"', 'New', 'Pending', 7, '2024-12-11 15:11:53', '2024-12-11 15:11:53', 'goku'),
(366, 196, 'status_change', 'Ticket stage changed from \"New\" to \"In Progress\"', 'New', 'In Progress', 7, '2024-12-11 15:11:54', '2024-12-11 15:11:54', 'goku'),
(367, 200, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 7, '2024-12-11 15:28:03', '2024-12-11 15:28:03', 'goku'),
(368, 197, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 7, '2024-12-11 15:50:23', '2024-12-11 15:50:23', 'goku'),
(369, 196, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Closed\"', 'In Progress', 'Closed', 7, '2024-12-11 15:50:24', '2024-12-11 15:50:24', 'goku'),
(370, 195, 'status_change', 'Ticket stage changed from \"Solved\" to \"Closed\"', 'Solved', 'Closed', 7, '2024-12-11 15:50:26', '2024-12-11 15:50:26', 'goku'),
(371, 199, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 7, '2024-12-11 15:53:19', '2024-12-11 15:53:19', 'goku'),
(372, 178, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 5, '2024-12-11 15:56:40', '2024-12-11 15:56:40', 'hana'),
(373, 182, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 5, '2024-12-11 15:56:41', '2024-12-11 15:56:41', 'hana'),
(374, 198, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 3, '2024-12-11 15:59:22', '2024-12-11 15:59:22', 'yoga'),
(375, 174, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 4, '2024-12-11 15:59:54', '2024-12-11 15:59:54', 'john'),
(376, 170, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 4, '2024-12-11 16:02:15', '2024-12-11 16:02:15', 'john'),
(377, 179, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 4, '2024-12-11 16:02:18', '2024-12-11 16:02:18', 'john'),
(378, 190, 'status_change', 'Ticket stage changed from \"New\" to \"Closed\"', 'New', 'Closed', 4, '2024-12-11 16:02:20', '2024-12-11 16:02:20', 'john'),
(379, 193, 'status_change', 'Ticket stage changed from \"Pending\" to \"Closed\"', 'Pending', 'Closed', 4, '2024-12-11 16:02:21', '2024-12-11 16:02:21', 'john'),
(380, 194, 'status_change', 'Ticket stage changed from \"In Progress\" to \"Closed\"', 'In Progress', 'Closed', 4, '2024-12-11 16:02:23', '2024-12-11 16:02:23', 'john');

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

--
-- Table structure for table `crmticket_notifications`
--

CREATE TABLE `crmticket_notifications` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ticket_id` bigint(20) UNSIGNED NOT NULL,
  `ticket_number` varchar(255) NOT NULL,
  `customer_name` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT 0,
  `user_id` bigint(100) UNSIGNED 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 `crmticket_notifications`
--

INSERT INTO `crmticket_notifications` (`id`, `ticket_id`, `ticket_number`, `customer_name`, `subject`, `is_read`, `user_id`, `created_at`, `updated_at`) VALUES
(149, 157, 'TKT2024120006', 'John Doe', 'asdsad', 0, 7, '2024-12-04 06:53:34', '2024-12-04 06:53:34'),
(150, 158, 'TKT2024120007', 'David Johnson', 'asdasd', 1, 3, '2024-12-04 07:12:02', '2024-12-04 07:12:02'),
(151, 159, 'TKT2024120008', 'halil hannah', 'sdfdsfds', 1, 1, '2024-12-04 07:58:44', '2024-12-04 07:58:44'),
(152, 160, 'TKT2024120009', 'saidi syabab ahlil jannah', 'tgdsfsd', 1, 1, '2024-12-04 12:21:13', '2024-12-04 12:21:13'),
(153, 161, 'TKT2024120010', 'halil hannah', 'sdfdsf', 1, 3, '2024-12-04 13:30:37', '2024-12-04 13:30:37'),
(154, 162, 'TKT2024120011', 'halil hannah', 'sdfdssfds', 1, 6, '2024-12-04 13:31:18', '2024-12-04 13:31:18'),
(155, 163, 'TKT2024120012', 'halil hannah', 'eergerg', 1, 1, '2024-12-05 00:34:07', '2024-12-05 00:34:07'),
(156, 164, 'TKT2024120013', 'Daniel Adams', 'asdasd', 1, 1, '2024-12-05 00:52:01', '2024-12-05 00:52:01'),
(157, 165, 'TKT2024120014', 'dsfsdf', 'gagga', 1, 1, '2024-12-05 01:11:36', '2024-12-05 01:11:36'),
(158, 166, 'TKT2024120015', 'fufufafa', 'hehe', 1, 1, '2024-12-05 06:49:44', '2024-12-05 06:49:44'),
(159, 167, 'TKT2024120016', 'Jane Smith', 'asdsad', 1, 1, '2024-12-05 13:25:52', '2024-12-05 13:25:52'),
(160, 168, 'TKT2024120017', 'Jane Smith', 'cekkk', 1, 1, '2024-12-05 15:03:30', '2024-12-05 15:03:30'),
(161, 169, 'TKT2024120018', 'gfhfe', 'cewkkkkk', 1, 1, '2024-12-05 16:40:21', '2024-12-05 16:40:21'),
(162, 170, 'TKT2024120019', 'hahaha', 'dfdsf', 0, 2, '2024-12-06 02:02:20', '2024-12-06 02:02:20'),
(163, 171, 'TKT2024120020', 'asasd', 'ares', 1, 1, '2024-12-06 02:04:17', '2024-12-06 02:04:17'),
(164, 172, 'TKT2024120021', 'halil hannah', 'dfsfdf', 1, 3, '2024-12-06 02:09:49', '2024-12-06 02:09:49'),
(165, 173, 'TKT2024120022', 'halil hannah', 'gagagaa', 1, 7, '2024-12-06 02:19:45', '2024-12-06 02:19:45'),
(166, 174, 'TKT2024120023', 'John Doe', 'asasa', 0, 4, '2024-12-06 02:21:32', '2024-12-06 02:21:32'),
(167, 175, 'TKT2024120024', 'asasd', 'asdasd', 1, 3, '2024-12-06 02:35:20', '2024-12-06 02:35:20'),
(168, 176, 'TKT2024120025', 'sasa', 'gehu', 1, 3, '2024-12-06 02:35:48', '2024-12-06 02:35:48'),
(169, 177, 'TKT2024120026', 'halil hannah', 'gambar', 1, 3, '2024-12-06 02:37:03', '2024-12-06 02:37:03'),
(170, 178, 'TKT2024120027', 'jbkjjkkjhkh', 'faaaassssss', 0, 5, '2024-12-06 02:46:52', '2024-12-06 02:46:52'),
(171, 179, 'TKT2024120028', 'dsfsdf', 'asdd', 0, 2, '2024-12-09 07:14:26', '2024-12-09 07:14:26'),
(172, 180, 'TKT2024120029', 'halil hannah', 'fsdsd', 1, 1, '2024-12-09 07:15:05', '2024-12-09 07:15:05'),
(173, 181, 'TKT2024120030', 'halil hannah', 'asdasd', 1, 1, '2024-12-09 07:16:23', '2024-12-09 07:16:23'),
(174, 182, 'TKT2024120031', 'dsfsdf', 'asdsd', 0, 5, '2024-12-09 07:27:34', '2024-12-09 07:27:34'),
(175, 183, 'TKT2024120032', 'dsfsdf', 'asdsd', 0, 5, '2024-12-09 07:27:34', '2024-12-09 07:27:34'),
(176, 184, 'TKT2024120033', 'dsfsdf', 'zxczxcx', 1, 6, '2024-12-09 07:31:57', '2024-12-09 07:31:57'),
(177, 185, 'TKT2024120034', 'hjjh', 'hkghg', 1, 6, '2024-12-09 14:02:22', '2024-12-09 14:02:22'),
(178, 186, 'TKT2024120035', 'hjjh', 'tesqss', 1, 6, '2024-12-10 00:03:12', '2024-12-10 00:03:12'),
(179, 187, 'TKT2024120036', 'Michael Brown', '2000 ni boss', 0, 9, '2024-12-10 07:38:48', '2024-12-10 07:38:48'),
(180, 188, 'TKT2024120037', 'dsfsdf', 'addasd', 1, 6, '2024-12-10 07:40:20', '2024-12-10 07:40:20'),
(181, 189, 'TKT2024120038', 'Daniel Adams', 'sadasd', 1, 6, '2024-12-10 07:41:08', '2024-12-10 07:41:08'),
(182, 190, 'TKT2024120039', 'Sasuke Uchiha', 'sasuke', 0, 9, '2024-12-10 08:19:41', '2024-12-10 08:19:41'),
(183, 191, 'TKT2024120040', 'Sasuke Uchiha', 'Biiru', 1, 1, '2024-12-10 08:21:37', '2024-12-10 08:21:37'),
(184, 192, 'TKT2024120041', 'halil hannah', 'rwerew', 1, 6, '2024-12-11 05:41:59', '2024-12-11 05:41:59'),
(185, 193, 'TKT2024120042', 'halil hannah', 'ggokk', 1, 7, '2024-12-11 09:05:11', '2024-12-11 09:05:11'),
(186, 194, 'TKT2024120043', 'gfhfe', 'heyhey', 0, 7, '2024-12-11 09:11:15', '2024-12-11 09:11:15'),
(187, 195, 'TKT2024120044', 'halil hannah', 'saidi', 1, 7, '2024-12-11 13:20:32', '2024-12-11 13:20:32'),
(188, 196, 'TKT2024120045', 'halil hannah', 'cekkk', 1, 7, '2024-12-11 13:37:07', '2024-12-11 13:37:07'),
(189, 197, 'TKT2024120046', 'David Johnson', 'cekkkks', 0, 8, '2024-12-11 13:41:23', '2024-12-11 13:41:23'),
(190, 198, 'TKT2024120047', 'dsfsdf', 'sdfsdf', 0, 3, '2024-12-11 13:42:22', '2024-12-11 13:42:22'),
(191, 199, 'TKT2024120048', 'dsfsdfasd', 'dsfdsfds', 0, 1, '2024-12-11 14:33:24', '2024-12-11 14:33:24'),
(192, 200, 'TKT2024120049', 'dsfsdf', 'pokasokasopkaspdo', 0, 7, '2024-12-11 15:27:44', '2024-12-11 15:27:44');

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

--
-- Table structure for table `crmuser_groups`
--

CREATE TABLE `crmuser_groups` (
  `group_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `crmuser_groups`
--

INSERT INTO `crmuser_groups` (`group_id`, `user_id`) VALUES
(3, 2),
(1, 3),
(2, 4),
(3, 5),
(2, 6),
(3, 7),
(3, 8),
(2, 9),
(3, 10);

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

--
-- Table structure for table `crmwarehouses`
--

CREATE TABLE `crmwarehouses` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `contact_name` varchar(255) NOT NULL,
  `contact_emails` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`contact_emails`)),
  `contact_numbers` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`contact_numbers`)),
  `contact_address` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`contact_address`)),
  `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 `crmwarehouse_activities`
--

CREATE TABLE `crmwarehouse_activities` (
  `activity_id` int(10) UNSIGNED NOT NULL,
  `warehouse_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmwarehouse_locations`
--

CREATE TABLE `crmwarehouse_locations` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `warehouse_id` int(10) UNSIGNED 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 `crmwarehouse_tags`
--

CREATE TABLE `crmwarehouse_tags` (
  `tag_id` int(10) UNSIGNED NOT NULL,
  `warehouse_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmwebhooks`
--

CREATE TABLE `crmwebhooks` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `entity_type` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `method` varchar(255) NOT NULL,
  `end_point` varchar(255) NOT NULL,
  `query_params` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`query_params`)),
  `headers` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`headers`)),
  `payload_type` varchar(255) NOT NULL,
  `raw_payload_type` varchar(255) NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload`)),
  `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 `crmweb_forms`
--

CREATE TABLE `crmweb_forms` (
  `id` int(10) UNSIGNED NOT NULL,
  `form_id` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `submit_button_label` text NOT NULL,
  `submit_success_action` varchar(255) NOT NULL,
  `submit_success_content` varchar(255) NOT NULL,
  `create_lead` tinyint(1) NOT NULL DEFAULT 0,
  `background_color` varchar(255) DEFAULT NULL,
  `form_background_color` varchar(255) DEFAULT NULL,
  `form_title_color` varchar(255) DEFAULT NULL,
  `form_submit_button_color` varchar(255) DEFAULT NULL,
  `attribute_label_color` varchar(255) DEFAULT 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 `crmweb_form_attributes`
--

CREATE TABLE `crmweb_form_attributes` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `placeholder` varchar(255) DEFAULT NULL,
  `is_required` tinyint(1) NOT NULL DEFAULT 0,
  `is_hidden` tinyint(1) NOT NULL DEFAULT 0,
  `sort_order` int(11) DEFAULT NULL,
  `attribute_id` int(10) UNSIGNED NOT NULL,
  `web_form_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `crmwithin`
--

CREATE TABLE `crmwithin` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name_within` varchar(255) 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 `crmwithin`
--

INSERT INTO `crmwithin` (`id`, `name_within`, `created_at`, `updated_at`) VALUES
(13, '1 days', '2024-12-02 07:00:45', '2024-12-02 07:00:45'),
(14, '2 days', '2024-12-02 07:00:51', '2024-12-02 07:00:51'),
(15, '3 days', '2024-12-02 07:00:58', '2024-12-02 07:00:58'),
(16, '4 days', '2024-12-02 07:01:05', '2024-12-02 07:01:05'),
(17, '10 days', '2024-12-02 07:01:13', '2024-12-02 07:01:13'),
(18, '20 days', '2024-12-05 01:53:46', '2024-12-05 01:53:46'),
(19, '7 days', '2024-12-05 01:59:33', '2024-12-05 01:59:33'),
(20, '16 days', '2024-12-05 02:01:22', '2024-12-05 02:01:22'),
(21, '14 days', '2024-12-05 02:05:41', '2024-12-05 02:05:41'),
(22, '13 days', '2024-12-05 02:09:43', '2024-12-05 02:09:43'),
(23, '15 days', '2024-12-05 02:12:17', '2024-12-05 02:12:17'),
(24, '8 days', '2024-12-05 02:13:01', '2024-12-05 02:13:01'),
(25, '11 days', '2024-12-05 02:18:36', '2024-12-05 02:18:36'),
(26, '2000 days', '2024-12-05 02:30:27', '2024-12-05 02:30:27'),
(27, '100 days', '2024-12-05 02:35:01', '2024-12-05 02:35:01'),
(28, '5 days', '2024-12-05 02:37:12', '2024-12-05 02:37:12'),
(29, '6 days', '2024-12-05 02:41:37', '2024-12-05 02:41:37'),
(30, '9 days', '2024-12-05 02:47:05', '2024-12-05 02:47:05'),
(31, '90 days', '2024-12-05 02:56:30', '2024-12-05 02:56:30'),
(32, '5 tes', '2024-12-05 03:04:03', '2024-12-05 03:04:03'),
(33, '10 dd', '2024-12-05 03:17:14', '2024-12-05 03:17:14'),
(34, 'gege', '2024-12-05 06:38:56', '2024-12-05 06:38:56'),
(35, 'ssdsd', '2024-12-06 07:18:37', '2024-12-06 07:18:37'),
(36, 'ssdsdddd', '2024-12-06 07:18:48', '2024-12-06 07:18:48'),
(37, '200 days', '2024-12-10 06:25:41', '2024-12-10 06:25:41'),
(38, '300days', '2024-12-10 06:29:10', '2024-12-10 06:29:10'),
(39, '20000 days', '2024-12-10 06:31:56', '2024-12-10 06:31:56'),
(40, '30 days', '2024-12-10 07:16:43', '2024-12-10 07:16:43'),
(41, '0 days', '2024-12-10 07:20:25', '2024-12-10 07:20:25'),
(42, '1000 days', '2024-12-11 14:10:07', '2024-12-11 14:10:07');

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

--
-- Table structure for table `crmworkflows`
--

CREATE TABLE `crmworkflows` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `entity_type` varchar(255) NOT NULL,
  `event` varchar(255) NOT NULL,
  `condition_type` varchar(255) NOT NULL DEFAULT 'and',
  `conditions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`conditions`)),
  `actions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`actions`)),
  `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 `crmworkflows`
--

INSERT INTO `crmworkflows` (`id`, `name`, `description`, `entity_type`, `event`, `condition_type`, `conditions`, `actions`, `created_at`, `updated_at`) VALUES
(1, 'Emails to participants after activity creation', 'Emails to participants after activity creation', 'activities', 'activity.create.after', 'and', '[{\"value\": [\"call\", \"meeting\", \"lunch\"], \"operator\": \"{}\", \"attribute\": \"type\", \"attribute_type\": \"multiselect\"}]', '[{\"id\": \"send_email_to_participants\", \"value\": \"1\"}]', '2024-11-14 16:54:20', '2024-11-14 16:54:20'),
(2, 'Emails to participants after activity updation', 'Emails to participants after activity updation', 'activities', 'activity.update.after', 'and', '[{\"value\": [\"call\", \"meeting\", \"lunch\"], \"operator\": \"{}\", \"attribute\": \"type\", \"attribute_type\": \"multiselect\"}]', '[{\"id\": \"send_email_to_participants\", \"value\": \"2\"}]', '2024-11-14 16:54:20', '2024-11-14 16:54:20');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `crmactivity_files`
--
ALTER TABLE `crmactivity_files`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmactivity_files_activity_id_foreign` (`activity_id`);

--
-- Indexes for table `crmactivity_participants`
--
ALTER TABLE `crmactivity_participants`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmactivity_participants_activity_id_foreign` (`activity_id`),
  ADD KEY `crmactivity_participants_user_id_foreign` (`user_id`),
  ADD KEY `crmactivity_participants_person_id_foreign` (`person_id`);

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

--
-- Indexes for table `crmattributes`
--
ALTER TABLE `crmattributes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `crmattributes_code_entity_type_unique` (`code`,`entity_type`);

--
-- Indexes for table `crmattribute_options`
--
ALTER TABLE `crmattribute_options`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmattribute_options_attribute_id_foreign` (`attribute_id`);

--
-- Indexes for table `crmattribute_values`
--
ALTER TABLE `crmattribute_values`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `entity_type_attribute_value_index_unique` (`entity_type`,`entity_id`,`attribute_id`),
  ADD KEY `crmattribute_values_attribute_id_foreign` (`attribute_id`);

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

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

--
-- Indexes for table `crmcountry_states`
--
ALTER TABLE `crmcountry_states`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmcountry_states_country_id_foreign` (`country_id`);

--
-- Indexes for table `crmcustomers`
--
ALTER TABLE `crmcustomers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `crmcustomers_email_unique` (`email`);

--
-- Indexes for table `crmdatagrid_saved_filters`
--
ALTER TABLE `crmdatagrid_saved_filters`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `crmdatagrid_saved_filters_user_id_name_src_unique` (`user_id`,`name`,`src`);

--
-- Indexes for table `crmemails`
--
ALTER TABLE `crmemails`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `crmemails_message_id_unique` (`message_id`),
  ADD UNIQUE KEY `crmemails_unique_id_unique` (`unique_id`),
  ADD KEY `crmemails_person_id_foreign` (`person_id`),
  ADD KEY `crmemails_lead_id_foreign` (`lead_id`),
  ADD KEY `crmemails_parent_id_foreign` (`parent_id`);

--
-- Indexes for table `crmemail_attachments`
--
ALTER TABLE `crmemail_attachments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmemail_attachments_email_id_foreign` (`email_id`);

--
-- Indexes for table `crmemail_tags`
--
ALTER TABLE `crmemail_tags`
  ADD KEY `crmemail_tags_tag_id_foreign` (`tag_id`),
  ADD KEY `crmemail_tags_email_id_foreign` (`email_id`);

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

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

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

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

--
-- Indexes for table `crmhelpdesk_teams_member`
--
ALTER TABLE `crmhelpdesk_teams_member`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `crmhelpdesk_teams_member_email_member_unique` (`email_member`),
  ADD KEY `crmhelpdesk_teams_member_team_id_foreign` (`team_id`),
  ADD KEY `fk_user_id` (`user_id`);

--
-- Indexes for table `crmleads`
--
ALTER TABLE `crmleads`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmleads_user_id_foreign` (`user_id`),
  ADD KEY `crmleads_person_id_foreign` (`person_id`),
  ADD KEY `crmleads_lead_source_id_foreign` (`lead_source_id`),
  ADD KEY `crmleads_lead_type_id_foreign` (`lead_type_id`),
  ADD KEY `crmleads_lead_pipeline_id_foreign` (`lead_pipeline_id`),
  ADD KEY `crmleads_lead_pipeline_stage_id_foreign` (`lead_pipeline_stage_id`);

--
-- Indexes for table `crmlead_activities`
--
ALTER TABLE `crmlead_activities`
  ADD KEY `crmlead_activities_activity_id_foreign` (`activity_id`),
  ADD KEY `crmlead_activities_lead_id_foreign` (`lead_id`);

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

--
-- Indexes for table `crmlead_pipeline_stages`
--
ALTER TABLE `crmlead_pipeline_stages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `crmlead_pipeline_stages_code_lead_pipeline_id_unique` (`code`,`lead_pipeline_id`),
  ADD UNIQUE KEY `crmlead_pipeline_stages_name_lead_pipeline_id_unique` (`name`,`lead_pipeline_id`),
  ADD KEY `crmlead_pipeline_stages_lead_pipeline_id_foreign` (`lead_pipeline_id`);

--
-- Indexes for table `crmlead_products`
--
ALTER TABLE `crmlead_products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmlead_products_lead_id_foreign` (`lead_id`),
  ADD KEY `crmlead_products_product_id_foreign` (`product_id`);

--
-- Indexes for table `crmlead_quotes`
--
ALTER TABLE `crmlead_quotes`
  ADD KEY `crmlead_quotes_quote_id_foreign` (`quote_id`),
  ADD KEY `crmlead_quotes_lead_id_foreign` (`lead_id`);

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

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

--
-- Indexes for table `crmlead_tags`
--
ALTER TABLE `crmlead_tags`
  ADD KEY `crmlead_tags_tag_id_foreign` (`tag_id`),
  ADD KEY `crmlead_tags_lead_id_foreign` (`lead_id`);

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

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

--
-- Indexes for table `crmmy_tickets`
--
ALTER TABLE `crmmy_tickets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_user_id` (`user_id`) USING BTREE;

--
-- Indexes for table `crmmy_ticket_images`
--
ALTER TABLE `crmmy_ticket_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ticket_id` (`ticket_id`);

--
-- Indexes for table `crmorganizations`
--
ALTER TABLE `crmorganizations`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `crmorganizations_name_unique` (`name`),
  ADD KEY `crmorganizations_user_id_foreign` (`user_id`);

--
-- Indexes for table `crmpersons`
--
ALTER TABLE `crmpersons`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmpersons_organization_id_foreign` (`organization_id`),
  ADD KEY `crmpersons_user_id_foreign` (`user_id`);

--
-- Indexes for table `crmperson_activities`
--
ALTER TABLE `crmperson_activities`
  ADD KEY `crmperson_activities_activity_id_foreign` (`activity_id`),
  ADD KEY `crmperson_activities_person_id_foreign` (`person_id`);

--
-- Indexes for table `crmperson_tags`
--
ALTER TABLE `crmperson_tags`
  ADD KEY `crmperson_tags_tag_id_foreign` (`tag_id`),
  ADD KEY `crmperson_tags_person_id_foreign` (`person_id`);

--
-- Indexes for table `crmproducts`
--
ALTER TABLE `crmproducts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `crmproducts_sku_unique` (`sku`);

--
-- Indexes for table `crmproduct_activities`
--
ALTER TABLE `crmproduct_activities`
  ADD KEY `crmproduct_activities_activity_id_foreign` (`activity_id`),
  ADD KEY `crmproduct_activities_product_id_foreign` (`product_id`);

--
-- Indexes for table `crmproduct_inventories`
--
ALTER TABLE `crmproduct_inventories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmproduct_inventories_product_id_foreign` (`product_id`),
  ADD KEY `crmproduct_inventories_warehouse_id_foreign` (`warehouse_id`),
  ADD KEY `crmproduct_inventories_warehouse_location_id_foreign` (`warehouse_location_id`);

--
-- Indexes for table `crmproduct_tags`
--
ALTER TABLE `crmproduct_tags`
  ADD KEY `crmproduct_tags_tag_id_foreign` (`tag_id`),
  ADD KEY `crmproduct_tags_product_id_foreign` (`product_id`);

--
-- Indexes for table `crmquotes`
--
ALTER TABLE `crmquotes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmquotes_person_id_foreign` (`person_id`),
  ADD KEY `crmquotes_user_id_foreign` (`user_id`);

--
-- Indexes for table `crmquote_items`
--
ALTER TABLE `crmquote_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmquote_items_quote_id_foreign` (`quote_id`);

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

--
-- Indexes for table `crmsla_policies`
--
ALTER TABLE `crmsla_policies`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_crmsla_policies_tag` (`tag_id`),
  ADD KEY `fk_crmsla_policies_within` (`within_id`);

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

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

--
-- Indexes for table `crmticket_images`
--
ALTER TABLE `crmticket_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ticket_id` (`ticket_id`);

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

--
-- Indexes for table `crmticket_notifications`
--
ALTER TABLE `crmticket_notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmticket_notifications_my_tickets_foreign` (`ticket_id`);

--
-- Indexes for table `crmuser_groups`
--
ALTER TABLE `crmuser_groups`
  ADD KEY `crmuser_groups_group_id_foreign` (`group_id`),
  ADD KEY `crmuser_groups_user_id_foreign` (`user_id`);

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

--
-- Indexes for table `crmwarehouse_activities`
--
ALTER TABLE `crmwarehouse_activities`
  ADD KEY `crmwarehouse_activities_activity_id_foreign` (`activity_id`),
  ADD KEY `crmwarehouse_activities_warehouse_id_foreign` (`warehouse_id`);

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

--
-- Indexes for table `crmwarehouse_tags`
--
ALTER TABLE `crmwarehouse_tags`
  ADD KEY `crmwarehouse_tags_tag_id_foreign` (`tag_id`),
  ADD KEY `crmwarehouse_tags_warehouse_id_foreign` (`warehouse_id`);

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

--
-- Indexes for table `crmweb_forms`
--
ALTER TABLE `crmweb_forms`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `crmweb_forms_form_id_unique` (`form_id`);

--
-- Indexes for table `crmweb_form_attributes`
--
ALTER TABLE `crmweb_form_attributes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crmweb_form_attributes_attribute_id_foreign` (`attribute_id`),
  ADD KEY `crmweb_form_attributes_web_form_id_foreign` (`web_form_id`);

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `crmactivities`
--
ALTER TABLE `crmactivities`
  ADD CONSTRAINT `crmactivities_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmactivity_files`
--
ALTER TABLE `crmactivity_files`
  ADD CONSTRAINT `crmactivity_files_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `crmactivities` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmactivity_participants`
--
ALTER TABLE `crmactivity_participants`
  ADD CONSTRAINT `crmactivity_participants_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `crmactivities` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmactivity_participants_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `crmpersons` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmactivity_participants_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmattribute_options`
--
ALTER TABLE `crmattribute_options`
  ADD CONSTRAINT `crmattribute_options_attribute_id_foreign` FOREIGN KEY (`attribute_id`) REFERENCES `crmattributes` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmattribute_values`
--
ALTER TABLE `crmattribute_values`
  ADD CONSTRAINT `crmattribute_values_attribute_id_foreign` FOREIGN KEY (`attribute_id`) REFERENCES `crmattributes` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmcountry_states`
--
ALTER TABLE `crmcountry_states`
  ADD CONSTRAINT `crmcountry_states_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `crmcountries` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmemails`
--
ALTER TABLE `crmemails`
  ADD CONSTRAINT `crmemails_lead_id_foreign` FOREIGN KEY (`lead_id`) REFERENCES `crmleads` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `crmemails_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `crmemails` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmemails_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `crmpersons` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `crmemail_attachments`
--
ALTER TABLE `crmemail_attachments`
  ADD CONSTRAINT `crmemail_attachments_email_id_foreign` FOREIGN KEY (`email_id`) REFERENCES `crmemails` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmemail_tags`
--
ALTER TABLE `crmemail_tags`
  ADD CONSTRAINT `crmemail_tags_email_id_foreign` FOREIGN KEY (`email_id`) REFERENCES `crmemails` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmemail_tags_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `crmtags` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmhelpdesk_teams_member`
--
ALTER TABLE `crmhelpdesk_teams_member`
  ADD CONSTRAINT `crmhelpdesk_teams_member_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `crmhelpdesk_teams` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `crmleads`
--
ALTER TABLE `crmleads`
  ADD CONSTRAINT `crmleads_lead_pipeline_id_foreign` FOREIGN KEY (`lead_pipeline_id`) REFERENCES `crmlead_pipelines` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmleads_lead_pipeline_stage_id_foreign` FOREIGN KEY (`lead_pipeline_stage_id`) REFERENCES `crmlead_pipeline_stages` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `crmleads_lead_source_id_foreign` FOREIGN KEY (`lead_source_id`) REFERENCES `crmlead_sources` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmleads_lead_type_id_foreign` FOREIGN KEY (`lead_type_id`) REFERENCES `crmlead_types` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmleads_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `crmpersons` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmleads_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmlead_activities`
--
ALTER TABLE `crmlead_activities`
  ADD CONSTRAINT `crmlead_activities_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `crmactivities` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmlead_activities_lead_id_foreign` FOREIGN KEY (`lead_id`) REFERENCES `crmleads` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmlead_pipeline_stages`
--
ALTER TABLE `crmlead_pipeline_stages`
  ADD CONSTRAINT `crmlead_pipeline_stages_lead_pipeline_id_foreign` FOREIGN KEY (`lead_pipeline_id`) REFERENCES `crmlead_pipelines` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmlead_products`
--
ALTER TABLE `crmlead_products`
  ADD CONSTRAINT `crmlead_products_lead_id_foreign` FOREIGN KEY (`lead_id`) REFERENCES `crmleads` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmlead_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `crmproducts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmlead_quotes`
--
ALTER TABLE `crmlead_quotes`
  ADD CONSTRAINT `crmlead_quotes_lead_id_foreign` FOREIGN KEY (`lead_id`) REFERENCES `crmleads` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmlead_quotes_quote_id_foreign` FOREIGN KEY (`quote_id`) REFERENCES `crmquotes` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmlead_tags`
--
ALTER TABLE `crmlead_tags`
  ADD CONSTRAINT `crmlead_tags_lead_id_foreign` FOREIGN KEY (`lead_id`) REFERENCES `crmleads` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmlead_tags_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `crmtags` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmmy_tickets`
--
ALTER TABLE `crmmy_tickets`
  ADD CONSTRAINT `fk_assigned_to` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON UPDATE CASCADE;

--
-- Constraints for table `crmmy_ticket_images`
--
ALTER TABLE `crmmy_ticket_images`
  ADD CONSTRAINT `crmmy_ticket_images_ibfk_1` FOREIGN KEY (`ticket_id`) REFERENCES `crmmy_tickets` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmorganizations`
--
ALTER TABLE `crmorganizations`
  ADD CONSTRAINT `crmorganizations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `crmpersons`
--
ALTER TABLE `crmpersons`
  ADD CONSTRAINT `crmpersons_organization_id_foreign` FOREIGN KEY (`organization_id`) REFERENCES `crmorganizations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmpersons_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `crmperson_activities`
--
ALTER TABLE `crmperson_activities`
  ADD CONSTRAINT `crmperson_activities_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `crmactivities` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmperson_activities_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `crmpersons` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmperson_tags`
--
ALTER TABLE `crmperson_tags`
  ADD CONSTRAINT `crmperson_tags_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `crmpersons` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmperson_tags_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `crmtags` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmproduct_activities`
--
ALTER TABLE `crmproduct_activities`
  ADD CONSTRAINT `crmproduct_activities_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `crmactivities` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmproduct_activities_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `crmproducts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmproduct_inventories`
--
ALTER TABLE `crmproduct_inventories`
  ADD CONSTRAINT `crmproduct_inventories_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `crmproducts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmproduct_inventories_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `crmwarehouses` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmproduct_inventories_warehouse_location_id_foreign` FOREIGN KEY (`warehouse_location_id`) REFERENCES `crmwarehouse_locations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmproduct_tags`
--
ALTER TABLE `crmproduct_tags`
  ADD CONSTRAINT `crmproduct_tags_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `crmproducts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmproduct_tags_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `crmtags` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmquotes`
--
ALTER TABLE `crmquotes`
  ADD CONSTRAINT `crmquotes_person_id_foreign` FOREIGN KEY (`person_id`) REFERENCES `crmpersons` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmquotes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmquote_items`
--
ALTER TABLE `crmquote_items`
  ADD CONSTRAINT `crmquote_items_quote_id_foreign` FOREIGN KEY (`quote_id`) REFERENCES `crmquotes` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmsla_policies`
--
ALTER TABLE `crmsla_policies`
  ADD CONSTRAINT `fk_crmsla_policies_tag` FOREIGN KEY (`tag_id`) REFERENCES `crmtags` (`id`),
  ADD CONSTRAINT `fk_crmsla_policies_within` FOREIGN KEY (`within_id`) REFERENCES `crmwithin` (`id`);

--
-- Constraints for table `crmtags`
--
ALTER TABLE `crmtags`
  ADD CONSTRAINT `crmtags_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmticket_images`
--
ALTER TABLE `crmticket_images`
  ADD CONSTRAINT `crmticket_images_ibfk_1` FOREIGN KEY (`ticket_id`) REFERENCES `crmmy_tickets` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmticket_notifications`
--
ALTER TABLE `crmticket_notifications`
  ADD CONSTRAINT `crmticket_notifications_my_tickets_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `crmmy_tickets` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmuser_groups`
--
ALTER TABLE `crmuser_groups`
  ADD CONSTRAINT `crmuser_groups_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `crmgroups` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmuser_groups_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `crmusers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmwarehouse_activities`
--
ALTER TABLE `crmwarehouse_activities`
  ADD CONSTRAINT `crmwarehouse_activities_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `crmactivities` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmwarehouse_activities_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `crmwarehouses` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmwarehouse_locations`
--
ALTER TABLE `crmwarehouse_locations`
  ADD CONSTRAINT `crmwarehouse_locations_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `crmwarehouses` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmwarehouse_tags`
--
ALTER TABLE `crmwarehouse_tags`
  ADD CONSTRAINT `crmwarehouse_tags_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `crmtags` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmwarehouse_tags_warehouse_id_foreign` FOREIGN KEY (`warehouse_id`) REFERENCES `crmwarehouses` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crmweb_form_attributes`
--
ALTER TABLE `crmweb_form_attributes`
  ADD CONSTRAINT `crmweb_form_attributes_attribute_id_foreign` FOREIGN KEY (`attribute_id`) REFERENCES `crmattributes` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `crmweb_form_attributes_web_form_id_foreign` FOREIGN KEY (`web_form_id`) REFERENCES `crmweb_forms` (`id`) ON DELETE CASCADE;
COMMIT;

