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

START TRANSACTION;



--
-- Database: `wddeventcom_db`
--

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

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

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED 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=utf8;

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

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

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(191) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `languages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `local` char(2) NOT NULL,
  `name` varchar(50) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'whether the language is active in the website or not, 1-> is active',
  `admin_status` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'whether the language is active in the dashboard or not, 1-> is active',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

INSERT INTO `languages` (`id`, `local`, `name`, `status`, `admin_status`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 'ar', 'Arabic', 1, 1, '2021-11-02 09:28:39', NULL, NULL),
(2, 'en', 'English', 1, 1, NULL, NULL, NULL);

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

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

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(191) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2020_03_23_152956_create_modules_table', 1),
(4, '2020_03_24_152330_create_user_modules_table', 1),
(5, '2020_03_26_123015_create_notifications_table', 1),
(6, '2020_03_28_090214_create_languages_table', 1),
(7, '2020_04_11_162749_create_pages_table', 1),
(8, '2020_04_15_174353_create_page_description_table', 1),
(9, '2020_05_18_084100_create_jobs_table', 1),
(10, '2020_05_18_103912_create_failed_jobs_table', 1),
(11, '2020_06_01_181915_create_setting_table', 1),
(12, '2020_06_06_155249_create_website_visitor_table', 1),
(13, '2021_11_02_101643_forms', 1);

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

--
-- Table structure for table `modules`
--

CREATE TABLE `modules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `path` varchar(50) NOT NULL,
  `meta` text,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `modules`
--

INSERT INTO `modules` (`id`, `name`, `path`, `meta`, `created_at`, `updated_at`) VALUES
(19, 'Users', 'users', '{\"module_name\":{\"en\":\"Users\"},\"fields\":{\"en\":{\"add_new\":\"Add New User\",\"edit\":\"Edit User\",\"name\":\"The name\",\"email\":\"The email\",\"phone\":\"The Phone\",\"photo\":\"The Photo\",\"password\":\"Password\",\"password_confirmation\":\"Password Confirmation\",\"modules\":\"Modules\"}}}', NULL, NULL),
(20, 'Forms', 'forms', '{\"module_name\":{\"en\":\"forms\"},\"fields\":{\"en\":{\"name\":\"Name\",\"email\":\"E-Mail\",\"phone\":\"Phone\",\"subject\":\"Subject\",\"message\":\"Message\"}}}', NULL, NULL),
(21, 'Pages', 'pages', '{\"module_name\":{\"ar\":\"\\u0627\\u0644\\u0635\\u0641\\u062d\\u0627\\u062a\",\"en\":\"Pages\"},\"fields\":{\"ar\":{\"add_new\":\"\\u0627\\u0636\\u0627\\u0641\\u0629 \\u0635\\u0641\\u062d\\u0629 \\u062c\\u062f\\u064a\\u062f\",\"edit\":\"\\u062a\\u0639\\u062f\\u064a\\u0644 \\u0635\\u0641\\u062d\\u0629\"},\"en\":{\"add_new\":\"Add New Page\",\"edit\":\"Edit Page\"}}}', NULL, NULL),
(22, 'Settings', 'settings', '{\"module_name\":{\"ar\":\"\\u0627\\u0644\\u0625\\u0639\\u062f\\u0627\\u062f\\u062a\",\"en\":\"Settings\"},\"fields\":{\"ar\":{\"add_new\":\"\\u0625\\u0636\\u0627\\u0641\\u0629 \\u0623\\u0639\\u062f\\u0627\\u062f\\u062a\",\"edit\":\"\\u062a\\u0639\\u062f\\u064a\\u0644 \\u0627\\u0644\\u0625\\u0639\\u062f\\u0627\\u062f\\u062a\",\"website_disable\":\"\\u062a\\u0639\\u0637\\u064a\\u0644 \\u0627\\u0644\\u0645\\u0648\\u0642\\u0639\",\"dashboard_disable\":\"\\u062a\\u0639\\u0637\\u064a\\u0644 \\u0644\\u0648\\u062d\\u0629 \\u0627\\u0644\\u062a\\u062d\\u0643\\u0645\",\"website_name\":\"\\u0627\\u0633\\u0645 \\u0627\\u0644\\u0645\\u0648\\u0642\\u0639\",\"Keywords\":\"\\u0627\\u0644\\u0643\\u0644\\u0645\\u0627\\u062a \\u0627\\u0644\\u062f\\u0644\\u064a\\u0644\\u064a\\u0629\",\"meta_description\":\"\\u0627\\u0644\\u0643\\u0644\\u0645\\u0627\\u062a \\u0627\\u0644\\u0648\\u0635\\u0641\\u064a\\u0629\",\"site_email\":\"\\u0628\\u0631\\u064a\\u062f \\u0627\\u0644\\u0645\\u0648\\u0642\\u0639\",\"site_address\":\"\\u0639\\u0646\\u0648\\u0627\\u0646 \\u0627\\u0644\\u0645\\u0648\\u0642\\u0639\",\"site_phone\":\"\\u062c\\u0648\\u0627\\u0644 \\u0627\\u0644\\u0645\\u0648\\u0642\\u0639\",\"mail_driver\":\"Mail Driver(SMTP)\",\"mail_host\":\"Mail Host (smtp.example.com)\",\"mail_port\":\"Mail Port (2525)\",\"mail_username\":\"Mail Username(username@example.cm)\",\"mail_password\":\"Mail password\",\"mail_encryption\":\"Mail Encryption(tls)\",\"mail_from_address\":\"Mail From address(info@example.com)\",\"mail_from_name\":\"Mail From Name(Example)\",\"website_logo\":\"\\u0644\\u0648\\u062c\\u0648 \\u0627\\u0644\\u0645\\u0648\\u0642\\u0639\"},\"en\":{\"add_new\":\"Add Settings\",\"edit\":\"Edit Settings\",\"website_disable\":\"Website Disabled\",\"dashboard_disable\":\"Dashboard Disabled\",\"website_name\":\"Website Name\",\"Keywords\":\"Keywords\",\"meta_description\":\"Meta Description\",\"site_email\":\"Website Email\",\"site_address\":\"Website Address\",\"site_phone\":\"Website Phone\",\"mail_driver\":\"Mail Driver(SMTP)\",\"mail_host\":\"Mail Host (smtp.example.com)\",\"mail_port\":\"Mail Port (2525)\",\"mail_username\":\"Mail Username(username@example.cm)\",\"mail_password\":\"Mail password\",\"mail_encryption\":\"Mail Encryption(tls)\",\"mail_from_address\":\"Mail From address(info@example.com)\",\"mail_from_name\":\"Mail From Name(Example)\",\"website_logo\":\"Website Logo\"}}}', NULL, NULL);

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

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

CREATE TABLE `notifications` (
  `id` char(36) NOT NULL,
  `type` varchar(191) NOT NULL,
  `notifiable_type` varchar(191) NOT NULL,
  `notifiable_id` bigint(20) UNSIGNED NOT NULL,
  `data` text NOT NULL,
  `read_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `pages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `image` varchar(200) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `pages`
--

INSERT INTO `pages` (`id`, `image`, `status`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, NULL, 1, '2021-11-04 01:15:49', NULL, '2021-11-04 01:15:49'),
(2, NULL, 1, NULL, NULL, NULL),
(3, NULL, 1, NULL, NULL, NULL);

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

--
-- Table structure for table `page_descriptions`
--

CREATE TABLE `page_descriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(50) DEFAULT NULL,
  `slug` varchar(100) DEFAULT NULL,
  `meta_description` text,
  `keywords` varchar(250) DEFAULT NULL,
  `description` text,
  `page_id` bigint(20) UNSIGNED DEFAULT NULL,
  `language_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `page_descriptions`
--

INSERT INTO `page_descriptions` (`id`, `title`, `slug`, `meta_description`, `keywords`, `description`, `page_id`, `language_id`) VALUES
(2, NULL, NULL, NULL, NULL, '<p>dasdsadsadasdsadasdasd</p>', 1, 2),
(8, NULL, NULL, NULL, NULL, '<div class=\"form_info mt-4\">\r\n<div class=\"custom-control custom-checkbox mt-2\"><label class=\"custom-control-label\" for=\"customCheck2\">Information about novo nordisk products by email and teleconference call with novo nordisk.</label></div>\r\n</div>', 3, 2),
(10, NULL, NULL, NULL, NULL, '<p>Medical education from novo nordisk by email, webinars and teleconference call with novo nordisk</p>', 2, 2);

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

--
-- Table structure for table `user_modules`
--

CREATE TABLE `user_modules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `module_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `website_visitors`
--

CREATE TABLE `website_visitors` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

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

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

--
-- Indexes for table `languages`
--
ALTER TABLE `languages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `languages_local_unique` (`local`),
  ADD KEY `languages_status_index` (`status`),
  ADD KEY `languages_admin_status_index` (`admin_status`);

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

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

--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`);

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

--
-- Indexes for table `page_descriptions`
--
ALTER TABLE `page_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `page_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `page_descriptions_page_id_language_id_index` (`page_id`,`language_id`);

--
-- Indexes for table `user_modules`
--
ALTER TABLE `user_modules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_modules_module_id_foreign` (`module_id`),
  ADD KEY `user_modules_user_id_module_id_index` (`user_id`,`module_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `page_descriptions`
--
ALTER TABLE `page_descriptions`
  ADD CONSTRAINT `page_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `page_descriptions_page_id_foreign` FOREIGN KEY (`page_id`) REFERENCES `pages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `user_modules`
--
ALTER TABLE `user_modules`
  ADD CONSTRAINT `user_modules_module_id_foreign` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `user_modules_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

