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

START TRANSACTION;



--
-- Database: `dispatch_db`
--

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

--
-- Table structure for table `activity_logging`
--

CREATE TABLE `activity_logging` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int DEFAULT '0',
  `ip_address` varchar(255) NOT NULL,
  `user_agent` varchar(255) NOT NULL,
  `http_method` varchar(255) NOT NULL,
  `route_name` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  `request_payload` text,
  `request_header` text,
  `http_status_code` varchar(255) DEFAULT NULL,
  `response` text,
  `content_type` 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;

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

--
-- Table structure for table `adonis_schema`
--

CREATE TABLE `adonis_schema` (
  `id` int UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `batch` int NOT NULL,
  `migration_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `adonis_schema`
--

INSERT INTO `adonis_schema` (`id`, `name`, `batch`, `migration_time`) VALUES
(1, 'database/migrations/1659977462697_user_groups', 1, '2024-06-28 06:03:53'),
(2, 'database/migrations/1659978202509_users', 1, '2024-06-28 06:03:54'),
(3, 'database/migrations/1659978306687_user_appi_tokens', 1, '2024-06-28 06:03:54'),
(4, 'database/migrations/1659978405290_cms_modules', 1, '2024-06-28 06:03:54'),
(5, 'database/migrations/1659978551137_cms_module_permissions', 1, '2024-06-28 06:03:54'),
(6, 'database/migrations/1659978621069_reset_passwords', 1, '2024-06-28 06:03:54'),
(7, 'database/migrations/1659978720280_application_settings', 1, '2024-06-28 06:03:54'),
(8, 'database/migrations/1659978827283_content_managements', 1, '2024-06-28 06:03:54'),
(9, 'database/migrations/1659978889021_faqs', 1, '2024-06-28 06:03:55'),
(10, 'database/migrations/1659978950214_media', 1, '2024-06-28 06:03:55'),
(11, 'database/migrations/1659979151122_notifications', 1, '2024-06-28 06:03:55'),
(12, 'database/migrations/1659979265046_notification_settings', 1, '2024-06-28 06:03:55'),
(13, 'database/migrations/1693890424336_activity_loggings', 1, '2024-06-28 06:03:55'),
(14, 'database/migrations/1698295790549_categories', 1, '2024-06-28 06:03:55'),
(15, 'database/migrations/1698300832025_user_details', 1, '2024-06-28 06:03:55'),
(16, 'database/migrations/1699253691891_user_time_managements', 1, '2024-06-28 06:03:56'),
(17, 'database/migrations/1704697999736_packages', 1, '2024-06-28 06:03:56'),
(18, 'database/migrations/1704702372833_transactions', 1, '2024-06-28 06:03:56'),
(19, 'database/migrations/1705904377174_subscriptions', 1, '2024-06-28 06:03:56'),
(20, 'database/migrations/1708590979088_teams', 1, '2024-06-28 06:03:56'),
(21, 'database/migrations/1708591482631_team_members', 1, '2024-06-28 06:03:56'),
(22, 'database/migrations/1708932928460_task_status', 1, '2024-06-28 06:03:57'),
(23, 'database/migrations/1708933557270_tasks', 1, '2024-06-28 06:03:57'),
(24, 'database/migrations/1708934679963_task_categories', 1, '2024-06-28 06:03:57'),
(25, 'database/migrations/1708947848152_checkpoints', 1, '2024-06-28 06:03:57'),
(26, 'database/migrations/1712058894017_incident_categories', 1, '2024-06-28 06:03:57'),
(27, 'database/migrations/1712058896668_incident_reports', 1, '2024-06-28 06:03:58'),
(28, 'database/migrations/1712059435983_incident_report_images', 1, '2024-06-28 06:03:58'),
(29, 'database/migrations/1712059753831_panic_alerts', 1, '2024-06-28 06:03:58');

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

--
-- Table structure for table `adonis_schema_versions`
--

CREATE TABLE `adonis_schema_versions` (
  `version` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `adonis_schema_versions`
--

INSERT INTO `adonis_schema_versions` (`version`) VALUES
(2);

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

--
-- Table structure for table `application_settings`
--

CREATE TABLE `application_settings` (
  `id` int UNSIGNED NOT NULL,
  `identifier` varchar(200) DEFAULT NULL,
  `meta_key` varchar(200) DEFAULT NULL,
  `value` text,
  `is_file` enum('1','0') NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `application_settings`
--

INSERT INTO `application_settings` (`id`, `identifier`, `meta_key`, `value`, `is_file`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'application_setting', 'favicon', '/images/favicon.png', '1', '2024-06-28 06:04:19', NULL, NULL),
(2, 'application_setting', 'logo', '/images/logo.jpg', '1', '2024-06-28 06:04:19', NULL, NULL),
(3, 'application_setting', 'application_name', 'RetroCube', '0', '2024-06-28 06:04:19', NULL, NULL);

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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `title` varchar(250) NOT NULL,
  `image_url` varchar(250) DEFAULT NULL,
  `description` text,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `slug`, `title`, `image_url`, `description`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'security-company', 'Security Company', NULL, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL);

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

--
-- Table structure for table `chat_messages`
--

CREATE TABLE `chat_messages` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `chat_room_id` int NOT NULL,
  `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `file_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `message_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'text',
  `ip_address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_anonymous` tinyint DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `chat_message_delete`
--

CREATE TABLE `chat_message_delete` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `chat_room_id` int DEFAULT '0',
  `chat_message_id` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `chat_message_status`
--

CREATE TABLE `chat_message_status` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `chat_room_id` int DEFAULT '0',
  `chat_message_id` int NOT NULL,
  `is_read` int NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `chat_rooms`
--

CREATE TABLE `chat_rooms` (
  `id` int NOT NULL,
  `identifier` varchar(200) NOT NULL,
  `created_by` int NOT NULL,
  `title` varchar(200) DEFAULT NULL,
  `slug` varchar(200) DEFAULT NULL,
  `image_url` text,
  `description` text,
  `status` int NOT NULL DEFAULT '1',
  `type` enum('single','group') NOT NULL,
  `member_limit` int NOT NULL DEFAULT '0',
  `is_anonymous` tinyint DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `chat_rooms`
--

INSERT INTO `chat_rooms` (`id`, `identifier`, `created_by`, `title`, `slug`, `image_url`, `description`, `status`, `type`, `member_limit`, `is_anonymous`, `created_at`, `updated_at`, `deleted_at`) VALUES
(4, 'test-1718269963', 1, 'test', 'test', 'https://static.turbosquid.com/Preview/001292/481/WV/_D.jpg', NULL, 1, 'group', 0, 0, '2024-06-13 09:12:43', NULL, NULL),
(5, 'test-1718270041', 1, 'test', 'test', 'https://static.turbosquid.com/Preview/001292/481/WV/_D.jpg', NULL, 1, 'group', 0, 0, '2024-06-13 09:14:01', NULL, NULL);

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

--
-- Table structure for table `checkpoints`
--

CREATE TABLE `checkpoints` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `task_id` int UNSIGNED DEFAULT NULL,
  `creator_id` int UNSIGNED DEFAULT NULL,
  `slug` varchar(150) NOT NULL,
  `checkpoint_no` int NOT NULL,
  `checkpoint_status` enum('1','0') NOT NULL DEFAULT '0',
  `image_url` text,
  `status` enum('1','0') NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `cms_modules`
--

CREATE TABLE `cms_modules` (
  `id` int UNSIGNED NOT NULL,
  `parent_id` int DEFAULT '0',
  `name` varchar(100) DEFAULT NULL,
  `route_name` varchar(100) DEFAULT NULL,
  `icon` varchar(100) DEFAULT NULL,
  `is_parent` varchar(100) DEFAULT NULL,
  `status` enum('1','0') DEFAULT '1',
  `sort_order` decimal(8,2) 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;



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

--
-- Table structure for table `cms_module_permissions`
--

CREATE TABLE `cms_module_permissions` (
  `id` int UNSIGNED NOT NULL,
  `user_group_id` int UNSIGNED DEFAULT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `cms_module_id` int UNSIGNED DEFAULT NULL,
  `is_add` enum('1','0') DEFAULT '0',
  `is_view` enum('1','0') DEFAULT '0',
  `is_update` enum('1','0') DEFAULT '0',
  `is_delete` enum('1','0') DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `cms_module_permissions`
--

INSERT INTO `cms_module_permissions` (`id`, `user_group_id`, `user_id`, `cms_module_id`, `is_add`, `is_view`, `is_update`, `is_delete`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, 1, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(2, 1, 1, 2, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(11, 2, 1, 10, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(12, 2, 1, 11, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(13, 2, 1, 12, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(14, 2, 1, 13, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(15, 2, 1, 14, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(16, 2, 1, 15, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(17, 2, 1, 16, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(18, 2, 1, 17, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(19, 2, 1, 1, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(20, 1, 1, 19, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(21, 2, 1, 18, '1', '1', '1', '1', '2024-06-28 06:04:19', NULL, NULL);

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

--
-- Table structure for table `content_managements`
--

CREATE TABLE `content_managements` (
  `id` int UNSIGNED NOT NULL,
  `title` varchar(150) NOT NULL,
  `slug` varchar(150) NOT NULL,
  `content` text,
  `status` enum('1','0') DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `content_managements`
--

INSERT INTO `content_managements` (`id`, `title`, `slug`, `content`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'About US', 'about-us', 'Lorem Ipsum is simply dummy text of the  like Aldus PageMaker including versions of Lorem Ipsum.', '1', '2024-06-28 06:04:19', NULL, NULL),
(2, 'Privacy Policy', 'privacy-policy', 'Lorem Ipsum is simply dummy text of the  like Aldus PageMaker including versions of Lorem Ipsum.', '1', '2024-06-28 06:04:19', NULL, NULL),
(3, 'Terms & Conditions', 'terms-conditions', 'Lorem Ipsum is simply dummy text of the  like Aldus PageMaker including versions of Lorem Ipsum.', '1', '2024-06-28 06:04:19', NULL, NULL);

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

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

CREATE TABLE `faqs` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(100) NOT NULL,
  `question` text NOT NULL,
  `answer` text NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `incident_categories`
--

CREATE TABLE `incident_categories` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `title` varchar(250) NOT NULL,
  `image_url` varchar(250) DEFAULT NULL,
  `description` text,
  `status` enum('1','0') NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `incident_categories`
--

INSERT INTO `incident_categories` (`id`, `slug`, `title`, `image_url`, `description`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'car-accident ', 'Car accident ', NULL, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', '1', '2024-06-28 06:04:19', NULL, NULL),
(2, 'thief-caught', 'Thief caught', NULL, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', '1', '2024-06-28 06:04:19', NULL, NULL),
(3, 'other', 'Other', NULL, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', '1', '2024-06-28 06:04:19', NULL, NULL);

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

--
-- Table structure for table `incident_reports`
--

CREATE TABLE `incident_reports` (
  `id` int UNSIGNED NOT NULL,
  `task_id` int UNSIGNED DEFAULT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `incident_category_id` int UNSIGNED DEFAULT NULL,
  `slug` varchar(150) NOT NULL,
  `callback_number` varchar(250) NOT NULL,
  `date` varchar(50) DEFAULT NULL,
  `time` varchar(50) DEFAULT NULL,
  `who_involved` varchar(250) NOT NULL,
  `who_incident_occur` varchar(250) NOT NULL,
  `location` varchar(250) DEFAULT NULL,
  `resolved` text,
  `description` text,
  `status` enum('1','0') NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `incident_report_images`
--

CREATE TABLE `incident_report_images` (
  `id` int UNSIGNED NOT NULL,
  `incident_report_id` int UNSIGNED DEFAULT NULL,
  `image` varchar(250) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `media`
--

CREATE TABLE `media` (
  `id` int UNSIGNED NOT NULL,
  `module` varchar(100) NOT NULL,
  `module_id` int NOT NULL,
  `filename` varchar(200) NOT NULL,
  `original_name` varchar(200) NOT NULL,
  `file_url` text NOT NULL,
  `file_url_blur` varchar(200) NOT NULL,
  `thumbnail_url` text,
  `mime_type` varchar(255) DEFAULT NULL,
  `file_type` varchar(255) DEFAULT NULL,
  `driver` varchar(50) NOT NULL DEFAULT 'local',
  `media_type` enum('public','private') NOT NULL DEFAULT 'public',
  `meta` text,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `notifications`
--

CREATE TABLE `notifications` (
  `id` int UNSIGNED NOT NULL,
  `unique_id` varchar(100) NOT NULL,
  `identifier` varchar(200) NOT NULL,
  `actor_id` int UNSIGNED DEFAULT NULL,
  `target_id` int UNSIGNED DEFAULT NULL,
  `module` varchar(100) NOT NULL,
  `module_id` int NOT NULL,
  `module_slug` varchar(100) NOT NULL,
  `reference_module` varchar(255) DEFAULT NULL,
  `reference_id` int DEFAULT NULL,
  `reference_slug` varchar(100) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `description` text,
  `web_redirect_link` text,
  `is_read` enum('1','0') NOT NULL DEFAULT '0',
  `is_view` enum('1','0') NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `notification_settings`
--

CREATE TABLE `notification_settings` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `meta_key` varchar(100) NOT NULL,
  `meta_value` text NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `packages`
--

CREATE TABLE `packages` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `price` int NOT NULL,
  `description` text,
  `no_of_months` int NOT NULL,
  `no_of_employees` int NOT NULL,
  `status` enum('0','1') NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `packages`
--

INSERT INTO `packages` (`id`, `slug`, `user_id`, `title`, `price`, `description`, `no_of_months`, `no_of_employees`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'basic', NULL, 'Basic', 78, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', 1, 1, '0', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL),
(2, 'standard', NULL, 'Standard', 125, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', 1, 1, '0', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL),
(3, 'premium', NULL, 'Premium', 150, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', 1, 1, '0', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL);

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

--
-- Table structure for table `panic_alerts`
--

CREATE TABLE `panic_alerts` (
  `id` int UNSIGNED NOT NULL,
  `task_id` int UNSIGNED DEFAULT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `status` enum('1','0') NOT NULL DEFAULT '0',
  `slug` varchar(150) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `reset_passwords`
--

CREATE TABLE `reset_passwords` (
  `id` int UNSIGNED NOT NULL,
  `email` varchar(150) DEFAULT NULL,
  `token` 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;

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

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

CREATE TABLE `subscriptions` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `package_id` int UNSIGNED DEFAULT NULL,
  `start_at` varchar(255) NOT NULL,
  `expire_at` varchar(255) NOT NULL,
  `payment_platform` varchar(255) NOT NULL,
  `charge_id` varchar(255) NOT NULL,
  `status` enum('0','1') NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `slug` varchar(150) NOT NULL,
  `date` varchar(250) NOT NULL,
  `start_time` varchar(250) DEFAULT NULL,
  `end_time` varchar(250) DEFAULT NULL,
  `task_start_time` varchar(250) NOT NULL DEFAULT '00:00',
  `task_end_time` varchar(250) NOT NULL DEFAULT '23:59',
  `total_time` varchar(250) NOT NULL DEFAULT '23:59',
  `task_status_id` int NOT NULL DEFAULT '1',
  `title` varchar(250) NOT NULL,
  `is_task` enum('1','0') NOT NULL DEFAULT '1',
  `latitude` varchar(100) DEFAULT NULL,
  `longitude` varchar(100) DEFAULT NULL,
  `task_category_id` int NOT NULL,
  `creator_id` int UNSIGNED NOT NULL,
  `team_id` int UNSIGNED NOT NULL,
  `checkpoints` int NOT NULL DEFAULT '0',
  `location` varchar(250) NOT NULL,
  `note` varchar(250) NOT NULL,
  `status` enum('1','0') NOT NULL DEFAULT '1',
  `is_task_complete` enum('1','0') NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `task_categories`
--

CREATE TABLE `task_categories` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `name` varchar(250) NOT NULL,
  `color` varchar(250) NOT NULL,
  `background_color` varchar(250) NOT NULL,
  `checkpoint` enum('1','0') NOT NULL,
  `status` enum('1','0') NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `task_categories`
--

INSERT INTO `task_categories` (`id`, `slug`, `name`, `color`, `background_color`, `checkpoint`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'armed-outside', 'Armed Outside', 'white', 'red', '0', '1', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL),
(2, 'armed-inside', 'Armed Inside', 'white', 'purple', '0', '1', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL),
(3, 'un-armed-inside', 'Un-armed Inside', 'white', 'blue', '0', '1', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL),
(4, 'un-armed-outside', 'Un-armed Outside', 'white', 'orange', '0', '1', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL),
(5, 'rover', 'Rover', 'white', 'brown', '1', '1', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL);

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

--
-- Table structure for table `task_status`
--

CREATE TABLE `task_status` (
  `id` int UNSIGNED NOT NULL,
  `name` varchar(250) NOT NULL,
  `slug` varchar(150) NOT NULL,
  `status` enum('1','0') NOT NULL DEFAULT '1',
  `color` varchar(250) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `task_status`
--

INSERT INTO `task_status` (`id`, `name`, `slug`, `status`, `color`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Schedule', 'schedule', '1', '#4ea832', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL),
(2, 'Inprocess', 'inprocess', '1', '#324aa8', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL),
(3, 'Complete', 'complete', '1', '#32a838', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL),
(4, 'Cancel', 'cancel', '1', '#a83232', '2024-06-28 06:04:18', '2024-06-28 06:04:18', NULL);

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

--
-- Table structure for table `teams`
--

CREATE TABLE `teams` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `name` varchar(250) NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `status` enum('1','0') NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `team_members`
--

CREATE TABLE `team_members` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `team_id` int UNSIGNED DEFAULT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `status` enum('1','0') NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

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

CREATE TABLE `transactions` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `module` varchar(255) NOT NULL,
  `module_id` int DEFAULT NULL,
  `charge_id` varchar(255) NOT NULL,
  `payment_platform` varchar(255) NOT NULL,
  `price` int NOT NULL,
  `status` enum('0','1') NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `user_api_tokens`
--

CREATE TABLE `user_api_tokens` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `api_token` text NOT NULL,
  `device_type` varchar(100) DEFAULT NULL,
  `device_token` varchar(100) DEFAULT NULL,
  `platform_type` varchar(100) DEFAULT NULL,
  `platform_id` varchar(255) DEFAULT NULL,
  `ip_address` varchar(100) DEFAULT NULL,
  `user_agent` text,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `user_details`
--

CREATE TABLE `user_details` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `category_id` int UNSIGNED DEFAULT NULL,
  `business_name` varchar(255) DEFAULT NULL,
  `ssn_number` int DEFAULT NULL,
  `ssn_front_image` varchar(255) DEFAULT NULL,
  `ssn_back_image` varchar(255) DEFAULT NULL,
  `driving_license_number` int DEFAULT NULL,
  `driving_license_front_image` varchar(255) DEFAULT NULL,
  `driving_license_back_image` varchar(255) DEFAULT NULL,
  `security_certification_expiry_date` varchar(255) DEFAULT NULL,
  `security_certification_front_image` varchar(255) DEFAULT NULL,
  `security_certification_back_image` varchar(255) DEFAULT NULL,
  `identification_expiry_date` varchar(255) DEFAULT NULL,
  `identification_front_image` varchar(255) DEFAULT NULL,
  `identification_back_image` varchar(255) DEFAULT NULL,
  `other_certification_expiry_date` varchar(255) DEFAULT NULL,
  `other_certification_front_image` varchar(255) DEFAULT NULL,
  `other_certification_back_image` varchar(255) DEFAULT NULL,
  `discloser_title` varchar(255) DEFAULT NULL,
  `discloser_file` varchar(255) DEFAULT NULL,
  `discloser_is_accept` varchar(255) DEFAULT NULL,
  `status` enum('1','0') NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `user_groups`
--

CREATE TABLE `user_groups` (
  `id` int UNSIGNED NOT NULL,
  `title` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `type` enum('admin','user') NOT NULL DEFAULT 'user',
  `is_super_admin` enum('1','0') NOT NULL DEFAULT '0',
  `status` enum('1','0') NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `user_groups`
--

INSERT INTO `user_groups` (`id`, `title`, `slug`, `description`, `type`, `is_super_admin`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Super Admin', 'super-admin', NULL, 'admin', '1', '1', '2024-06-28 06:04:19', NULL, NULL),
(2, 'Admin', 'admin', NULL, 'admin', '0', '1', '2024-06-28 06:04:19', NULL, NULL),
(3, 'App User', 'app-user', NULL, 'user', '0', '1', '2024-06-28 06:04:19', NULL, NULL);

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

--
-- Table structure for table `user_time_managements`
--

CREATE TABLE `user_time_managements` (
  `id` int UNSIGNED NOT NULL,
  `slug` varchar(150) NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `check_in_date` varchar(255) DEFAULT NULL,
  `check_in_time` varchar(255) DEFAULT NULL,
  `check_out_time` varchar(255) DEFAULT NULL,
  `total_houre` 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;

--
-- Indexes for dumped tables
--

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

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

--
-- Indexes for table `application_settings`
--
ALTER TABLE `application_settings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `application_settings_identifier_index` (`identifier`),
  ADD KEY `application_settings_meta_key_index` (`meta_key`);

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

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

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

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

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

--
-- Indexes for table `checkpoints`
--
ALTER TABLE `checkpoints`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `checkpoints_slug_unique` (`slug`),
  ADD KEY `checkpoints_user_id_foreign` (`user_id`),
  ADD KEY `checkpoints_task_id_foreign` (`task_id`),
  ADD KEY `checkpoints_creator_id_foreign` (`creator_id`);

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

--
-- Indexes for table `cms_module_permissions`
--
ALTER TABLE `cms_module_permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cms_module_permissions_user_group_id_foreign` (`user_group_id`),
  ADD KEY `cms_module_permissions_user_id_foreign` (`user_id`),
  ADD KEY `cms_module_permissions_cms_module_id_foreign` (`cms_module_id`);

--
-- Indexes for table `content_managements`
--
ALTER TABLE `content_managements`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `content_managements_slug_unique` (`slug`),
  ADD KEY `content_managements_slug_index` (`slug`);

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

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

--
-- Indexes for table `incident_reports`
--
ALTER TABLE `incident_reports`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `incident_reports_slug_unique` (`slug`),
  ADD KEY `incident_reports_task_id_foreign` (`task_id`),
  ADD KEY `incident_reports_user_id_foreign` (`user_id`),
  ADD KEY `incident_reports_incident_category_id_foreign` (`incident_category_id`);

--
-- Indexes for table `incident_report_images`
--
ALTER TABLE `incident_report_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `incident_report_images_incident_report_id_foreign` (`incident_report_id`);

--
-- Indexes for table `media`
--
ALTER TABLE `media`
  ADD PRIMARY KEY (`id`),
  ADD KEY `media_module_index` (`module`),
  ADD KEY `media_module_id_index` (`module_id`);

--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `notifications_unique_id_unique` (`unique_id`),
  ADD KEY `notifications_actor_id_foreign` (`actor_id`),
  ADD KEY `notifications_target_id_index` (`target_id`);

--
-- Indexes for table `notification_settings`
--
ALTER TABLE `notification_settings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notification_settings_user_id_foreign` (`user_id`),
  ADD KEY `notification_settings_meta_key_index` (`meta_key`);

--
-- Indexes for table `packages`
--
ALTER TABLE `packages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `packages_slug_unique` (`slug`),
  ADD KEY `packages_user_id_foreign` (`user_id`);

--
-- Indexes for table `panic_alerts`
--
ALTER TABLE `panic_alerts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `panic_alerts_slug_unique` (`slug`),
  ADD KEY `panic_alerts_task_id_foreign` (`task_id`),
  ADD KEY `panic_alerts_user_id_foreign` (`user_id`);

--
-- Indexes for table `reset_passwords`
--
ALTER TABLE `reset_passwords`
  ADD PRIMARY KEY (`id`),
  ADD KEY `reset_passwords_email_index` (`email`);

--
-- Indexes for table `subscriptions`
--
ALTER TABLE `subscriptions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `subscriptions_slug_unique` (`slug`),
  ADD KEY `subscriptions_user_id_foreign` (`user_id`),
  ADD KEY `subscriptions_package_id_foreign` (`package_id`);

--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tasks_slug_unique` (`slug`),
  ADD KEY `tasks_user_id_foreign` (`user_id`),
  ADD KEY `tasks_creator_id_foreign` (`creator_id`),
  ADD KEY `tasks_team_id_foreign` (`team_id`);

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

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

--
-- Indexes for table `teams`
--
ALTER TABLE `teams`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `teams_slug_unique` (`slug`),
  ADD KEY `teams_user_id_foreign` (`user_id`);

--
-- Indexes for table `team_members`
--
ALTER TABLE `team_members`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `team_members_slug_unique` (`slug`),
  ADD KEY `team_members_team_id_foreign` (`team_id`),
  ADD KEY `team_members_user_id_foreign` (`user_id`);

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `transactions_slug_unique` (`slug`),
  ADD KEY `transactions_user_id_foreign` (`user_id`);

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

--
-- Indexes for table `user_details`
--
ALTER TABLE `user_details`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_details_slug_unique` (`slug`),
  ADD KEY `user_details_user_id_foreign` (`user_id`),
  ADD KEY `user_details_category_id_foreign` (`category_id`);

--
-- Indexes for table `user_groups`
--
ALTER TABLE `user_groups`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_groups_title_unique` (`title`),
  ADD UNIQUE KEY `user_groups_slug_unique` (`slug`);

--
-- Indexes for table `user_time_managements`
--
ALTER TABLE `user_time_managements`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_time_managements_slug_unique` (`slug`),
  ADD KEY `user_time_managements_user_id_foreign` (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `activity_logging`
--
ALTER TABLE `activity_logging`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

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

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

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

--
-- AUTO_INCREMENT for table `chat_messages`
--
ALTER TABLE `chat_messages`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `chat_message_delete`
--
ALTER TABLE `chat_message_delete`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `chat_message_status`
--
ALTER TABLE `chat_message_status`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `chat_rooms`
--
ALTER TABLE `chat_rooms`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `checkpoints`
--
ALTER TABLE `checkpoints`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

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

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

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

--
-- AUTO_INCREMENT for table `faqs`
--
ALTER TABLE `faqs`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `incident_reports`
--
ALTER TABLE `incident_reports`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `incident_report_images`
--
ALTER TABLE `incident_report_images`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `media`
--
ALTER TABLE `media`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `notifications`
--
ALTER TABLE `notifications`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `notification_settings`
--
ALTER TABLE `notification_settings`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `panic_alerts`
--
ALTER TABLE `panic_alerts`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `reset_passwords`
--
ALTER TABLE `reset_passwords`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `subscriptions`
--
ALTER TABLE `subscriptions`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tasks`
--
ALTER TABLE `tasks`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

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

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

--
-- AUTO_INCREMENT for table `teams`
--
ALTER TABLE `teams`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `team_members`
--
ALTER TABLE `team_members`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `user_api_tokens`
--
ALTER TABLE `user_api_tokens`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `user_details`
--
ALTER TABLE `user_details`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `user_time_managements`
--
ALTER TABLE `user_time_managements`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `checkpoints`
--
ALTER TABLE `checkpoints`
  ADD CONSTRAINT `checkpoints_creator_id_foreign` FOREIGN KEY (`creator_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `checkpoints_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `checkpoints_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `cms_module_permissions`
--
ALTER TABLE `cms_module_permissions`
  ADD CONSTRAINT `cms_module_permissions_cms_module_id_foreign` FOREIGN KEY (`cms_module_id`) REFERENCES `cms_modules` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cms_module_permissions_user_group_id_foreign` FOREIGN KEY (`user_group_id`) REFERENCES `user_groups` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cms_module_permissions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `incident_reports`
--
ALTER TABLE `incident_reports`
  ADD CONSTRAINT `incident_reports_incident_category_id_foreign` FOREIGN KEY (`incident_category_id`) REFERENCES `incident_categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `incident_reports_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `incident_reports_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `incident_report_images`
--
ALTER TABLE `incident_report_images`
  ADD CONSTRAINT `incident_report_images_incident_report_id_foreign` FOREIGN KEY (`incident_report_id`) REFERENCES `incident_reports` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `notifications`
--
ALTER TABLE `notifications`
  ADD CONSTRAINT `notifications_actor_id_foreign` FOREIGN KEY (`actor_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `notifications_target_id_foreign` FOREIGN KEY (`target_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `notification_settings`
--
ALTER TABLE `notification_settings`
  ADD CONSTRAINT `notification_settings_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `packages`
--
ALTER TABLE `packages`
  ADD CONSTRAINT `packages_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `panic_alerts`
--
ALTER TABLE `panic_alerts`
  ADD CONSTRAINT `panic_alerts_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `panic_alerts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `subscriptions`
--
ALTER TABLE `subscriptions`
  ADD CONSTRAINT `subscriptions_package_id_foreign` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `subscriptions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tasks`
--
ALTER TABLE `tasks`
  ADD CONSTRAINT `tasks_creator_id_foreign` FOREIGN KEY (`creator_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tasks_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tasks_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `teams`
--
ALTER TABLE `teams`
  ADD CONSTRAINT `teams_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `team_members`
--
ALTER TABLE `team_members`
  ADD CONSTRAINT `team_members_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `team_members_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `user_api_tokens`
--
ALTER TABLE `user_api_tokens`
  ADD CONSTRAINT `user_api_tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `user_details`
--
ALTER TABLE `user_details`
  ADD CONSTRAINT `user_details_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `user_details_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `user_time_managements`
--
ALTER TABLE `user_time_managements`
  ADD CONSTRAINT `user_time_managements_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

