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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Branches', 'branches', '{\"fields\": {\"ar\": {\"new\": \"إضافة فرع جديد\", \"edit\": \"تعديل فرع\", \"email\": \"البريد الإلكتروني\", \"phone\": \"الجوال\", \"title\": \"الإسم\", \"address\": \"العنوان\", \"latitude\": \"خط الطول\", \"longitude\": \"خط العرض\"}, \"en\": {\"new\": \"Add New branch\", \"edit\": \"Edit Branch\", \"email\": \"Email\", \"phone\": \"Phone\", \"title\": \"Name\", \"address\": \"Address\", \"latitude\": \"Latitude\", \"longitude\": \"Longitude\"}}, \"module_name\": {\"ar\": \"الفروع\", \"en\": \"Branches\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



--
-- Database: `cmsamma_cargo`
--

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

--
-- Table structure for table `branches`
--

CREATE TABLE `branches` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `meta` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `branch_descriptions`
--

CREATE TABLE `branch_descriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(250) NOT NULL,
  `address` varchar(250) DEFAULT NULL,
  `meta` json DEFAULT NULL,
  `branch_id` bigint(20) UNSIGNED DEFAULT NULL,
  `language_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `branch_descriptions`
--
ALTER TABLE `branch_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `branch_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `branch_descriptions_branch_id_language_id_index` (`branch_id`,`language_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `branch_descriptions`
--
ALTER TABLE `branch_descriptions`
  ADD CONSTRAINT `branch_descriptions_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `branch_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;


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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Careers', 'careers', '{\"fields\": {\"ar\": {\"edit\": \"تعديل وظيفة\", \"file\": \"السيرة الذاتية\", \"name\": \"الإسم\", \"email\": \"البريد الإلكتروني\", \"phone\": \"الجوال\", \"choose\": \"اختر\", \"add_new\": \"إضافة وظيفة جديد\"}, \"en\": {\"edit\": \"Edit career\", \"file\": \"The CV\", \"name\": \"The name\", \"email\": \"The email\", \"phone\": \"The Phone\", \"add_new\": \"Add New career\"}}, \"module_name\": {\"ar\": \"الوظائف\", \"en\": \"Careers\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



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

--
-- Table structure for table `careers`
--

CREATE TABLE `careers` (
  `id` int(11) NOT NULL,
  `name` varchar(150) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `file` varchar(150) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `careers`
--
ALTER TABLE `careers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `email` (`email`),
  ADD KEY `name` (`name`),
  ADD KEY `phone` (`phone`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `careers`
--
ALTER TABLE `careers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;



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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Contacts', 'contacts', '{\"fields\": {\"ar\": {\"new\": \"إضافة طريقة تواصيل جديدة\", \"edit\": \"تعديل طريقة تواصل\", \"title\": \"العنوان\", \"description\": \" التفاصيل \"}, \"en\": {\"new\": \"Add New Contact\", \"edit\": \"Edit Contact\", \"title\": \"The Title\", \"description\": \"The Description\"}}, \"module_name\": {\"ar\": \"طرق التواصل\", \"en\": \"Contacts\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



--
-- Database: `cmsnesmr_cms`
--

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

--
-- Table structure for table `contacts`
--

CREATE TABLE `contacts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `deleted_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 `contact_descriptions`
--

CREATE TABLE `contact_descriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) DEFAULT NULL,
  `description` text,
  `contact_id` bigint(20) UNSIGNED DEFAULT NULL,
  `language_id` bigint(20) UNSIGNED 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 `contacts`
--
ALTER TABLE `contacts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `contact_descriptions`
--
ALTER TABLE `contact_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `contact_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `contact_descriptions_contact_id_language_id_index` (`contact_id`,`language_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `contact_descriptions`
--
ALTER TABLE `contact_descriptions`
  ADD CONSTRAINT `contact_descriptions_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `contact_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;


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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Countries', 'countries', '{\"fields\": {\"ar\": {\"new\": \"إضافة دولة جديدة\", \"code\": \"كود الدولة\", \"edit\": \"تعديل دولة\", \"name\": \"إسم الدولة\"}, \"en\": {\"new\": \"Add new country\", \"code\": \"Country code\", \"edit\": \"Edit country\", \"name\": \"Country name\"}}, \"module_name\": {\"ar\": \"الدول\", \"en\": \"Countries\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



--
-- Database: `nesmawae_water`
--

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

--
-- Table structure for table `countries`
--

CREATE TABLE `countries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` VARCHAR (5) UNIQUE NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


--
-- Table structure for table `country_descriptions`
--

CREATE TABLE `country_descriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(50) NOT NULL,
  `country_id` bigint(20) UNSIGNED NOT NULL,
  `language_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `country_descriptions`
--
ALTER TABLE `country_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `country_descriptions_country_id_language_id_index` (`country_id`,`language_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `country_descriptions`
--
ALTER TABLE `country_descriptions`
  ADD CONSTRAINT `country_descriptions_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`) ON DELETE CASCADE;
COMMIT;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Hotels', 'hotels', '{\"fields\": {\"ar\": {\"map\": \"خريطة الفندق\", \"new\": \"إضافة فندق جديد\", \"edit\": \"تعديل فندق\", \"slug\": \"The URL Slug\", \"phone\": \"تليفون الفندق\", \"name\": \"إسم الفندق\", \"description\": \"الوصف\", \"images\": \"الصور\", \"hotel_id\": \"الفندق\", \"keywords\": \"كلمات تنشيط محرك البحث\", \"more_info\": \"معلومات أكثر\", \"facilities\": \"المرافق\", \"beds_number\": \"عدد الأَسِرَّة\", \"category_id\": \"التصنيف\", \"rooms_number\": \"عدد الغرف\", \"floors_number\": \"عدد الطوابق\", \"meta_description\": \"الكلمات الوصفية\", \"distance_from_haram\": \"المسافة من الحرم\"}, \"en\": {\"map\": \"Hotel map\", \"new\": \"Add New hotel\", \"edit\": \"Edit hotel\", \"slug\": \"URL Slug\", \"phone\": \"Call & Book\", \"name\": \"Name\" , \"description\": \"Description\", \"images\": \"Images\", \"hotel_id\": \"Hotel\", \"keywords\": \"SEO keywords\", \"more_info\": \"more information\", \"facilities\": \"Facilities\", \"beds_number\": \"No of beds: \", \"category_id\": \"Category\", \"rooms_number\": \"No of rooms: \", \"floors_number\": \"No of floors: \", \"meta_description\": \"Meta Description\", \"distance_from_haram\": \"Distance from harm: \"}}, \"module_name\": {\"ar\": \"الفنادق\", \"en\": \"Hotels\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);




--
-- Database: `cms`
--

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

--
-- Table structure for table `hotels`
--

CREATE TABLE IF NOT EXISTS `hotels` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `hotel_id` bigint(20) UNSIGNED DEFAULT NULL,
  `category_id` bigint(20) UNSIGNED DEFAULT NULL,
  `distance_from_haram` varchar(10) DEFAULT NULL,
  `floors_number` varchar(5) DEFAULT NULL,
  `rooms_number` varchar(5) DEFAULT NULL,
  `beds_number` varchar(5) DEFAULT NULL,
  `phone` varchar(191) DEFAULT NULL,
  `map` text,
  `visit_counts` bigint(20) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `hotels_hotel_id_foreign` (`hotel_id`),
  KEY `hotels_category_id_hotel_id_index` (`category_id`,`hotel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `hotel_descriptions`
--

CREATE TABLE IF NOT EXISTS `hotel_descriptions` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(200) DEFAULT NULL,
  `description` longtext,
  `slug` varchar(100) DEFAULT NULL,
  `meta_description` text,
  `keywords` varchar(400) DEFAULT NULL,
  `more_info` longtext,
  `facilities` longtext,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `language_id` bigint(20) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `hotel_descriptions_hotel_id_index` (`hotel_id`),
  KEY `hotel_descriptions_language_id_index` (`language_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `hotel_photos`
--

CREATE TABLE IF NOT EXISTS `hotel_photos` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `image` varchar(200) DEFAULT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `hotel_photos_hotel_id_index` (`hotel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `hotels`
--
ALTER TABLE `hotels`
  ADD CONSTRAINT `hotels_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `hotels_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `hotel_descriptions`
--
ALTER TABLE `hotel_descriptions`
  ADD CONSTRAINT `hotel_descriptions_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `hotel_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `hotel_photos`
--
ALTER TABLE `hotel_photos`
  ADD CONSTRAINT `hotel_photos_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;



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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Locations', 'locations', '{\"fields\": {\"ar\": {\"box\": \"صندوق بريد\", \"fax\": \"الفاكس\", \"new\": \"اضافة فرع\", \"edit\": \"تعديل فرع\", \"name\": \"اسم الفرع\", \"slug\": \"Slug رابط\", \"email\": \"الايميل\", \"phone\": \"رقم الهاتف\", \"images\": \"الصور\", \"address\": \"العنوان\", \"keywords\": \"الكلمات الدليلية\", \"latitude\": \"خط العرض\", \"longitude\": \"خط الطول\", \"description\": \"الوصف\", \"meta_description\": \"الكلمات الوصفية\"}, \"en\": {\"box\": \"P.O.Box\", \"fax\": \"Fax\", \"new\": \"Add Location\", \"edit\": \"Edit Location\", \"name\": \"Name\", \"slug\": \"Slug url\", \"email\": \"Email\", \"phone\": \"Phone\", \"images\": \"Images\", \"address\": \"Address\", \"keywords\": \"Keywords\", \"latitude\": \"Latitude\", \"longitude\": \"Longitude\", \"description\": \"Description\", \"meta_description\": \"Meta description\"}}, \"module_name\": {\"ar\": \"عناوين الفروع\", \"en\": \"Locations\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



--
-- Database: `cmsnesmt_cms`
--

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

--
-- Table structure for table `locations`
--

CREATE TABLE `locations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `meta` json DEFAULT NULL,
  `images` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `location_descriptions`
--

CREATE TABLE `location_descriptions` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(250) NULL,
    `address` varchar(250) DEFAULT NULL,
    `box` varchar(100) DEFAULT NULL,
    `slug` varchar(100) DEFAULT NULL,
    `meta_description` varchar(400) NULL,
    `keywords` varchar(400) NULL,
    `description` longtext NULL,
    `location_id` bigint(20) UNSIGNED DEFAULT NULL,
    `language_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `location_descriptions`
--
ALTER TABLE `location_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `location_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `location_descriptions_location_id_language_id_index` (`location_id`,`language_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `location_descriptions`
--
ALTER TABLE `location_descriptions`
  ADD CONSTRAINT `location_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `location_descriptions_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;



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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Members', 'members', '{\"fields\": {\"ar\": {\"new\": \"إضافة عضو جديد\", \"edit\": \"تعديل عضو\", \"name\": \"الإسم بالكامل\", \"role\": \"الصلاحيات\", \"email\": \"البريد الإلكتروني\", \"phone\": \"رقم الجوال\", \"photo\": \"صورة البروفايل\", \"gender\": \"الجنس\", \"password\": \"كلمة المرور\", \"birth_date\": \"تاريخ الميلاد\"}, \"en\": {\"new\": \"Add New member\", \"edit\": \"Edit member\", \"name\": \"Full name\", \"role\": \"Roles\", \"email\": \"Email\", \"phone\": \"Phone\", \"photo\": \"Profile image\", \"gender\": \"Gender\", \"password\": \"Password\", \"birth_date\": \"Birth date\"}}, \"module_name\": {\"ar\": \"الأعضاء\", \"en\": \"Members\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



--
-- Database: `cms`
--

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

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(300) NOT NULL,
  `email` varchar(250) NOT NULL,
  `phone` varchar(14) DEFAULT NULL,
  `photo` varchar(300) DEFAULT NULL,
  `gender` enum('male','female') DEFAULT NULL,
  `birth_date` date DEFAULT NULL,
  `admin_token` varchar(100) DEFAULT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(100) NOT NULL,
  `role` enum('super_admin','admin','sub_admin') NOT NULL DEFAULT 'sub_admin',
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`),
  UNIQUE KEY `users_phone_unique` (`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;




-- Insert the module details
INSERT INTO `modules` ( `name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES
('Package Categories', 'packageCategories', '{\"fields\": {\"ar\": {\"edit\": \"تعديل قسم\", \"name\": \"الإسم\", \"slug\": \"The Slug\", \"add_new\": \"إضافة قسم جديد\", \"keywords\": \"الكلمات الدليلية\", \"meta_description\": \"الكلمات الوصفية\"}, \"en\": {\"edit\": \"Edit Category\", \"name\": \"The Name\", \"slug\": \"The Slug\", \"add_new\": \"Add New Category\", \"keywords\": \"The Keywords\", \"meta_description\": \"The Meta Description\"}}, \"module_name\": {\"ar\": \"اقسام الباقات\", \"en\": \"Packages Categories\"}}', '2021-04-01 10:18:06', '2021-04-01 10:18:06', NULL),
('Packages', 'packages', '{\"fields\": {\"ar\": {\"edit\": \"تعديل باقة\", \"slug\": \"The URL Slug\", \"image\": \"الصورة\", \"title\": \"العنوان\", \"video\": \"الفيديو\", \"add_new\": \"إضافة باقة جديد\", \"keywords\": \"كلمات تنشيط محرك البحث\", \"video_url\": \"رابط الفيديو\", \"local_link\": \"ملف محلي\", \"video_type\": \"نوع الفيديو\", \"category_id\": \"الأقسام\", \"description\": \"الوصف\", \"external_link\": \"رابط خارجي\", \"meta_description\": \"الكلمات الوصفية\"}, \"en\": {\"edit\": \"Edit Package\", \"slug\": \"The URL Slug\", \"image\": \"The Image\", \"title\": \"The Title\", \"video\": \"The Video\", \"add_new\": \"Add New Package\", \"keywords\": \"SEO keywords\", \"video_url\": \"The Url\", \"local_link\": \"Local Storage\", \"video_type\": \"Video Type\", \"category_id\": \"The Category\", \"description\": \"The Description\", \"external_link\": \"External Link\", \"meta_description\": \"Meta Description\"}}, \"module_name\": {\"ar\": \"الباقات\", \"en\": \"Packages\"}}', '2021-04-01 10:18:06', '2021-04-01 10:18:06', NULL);


CREATE TABLE `packages` (
  `id` bigint UNSIGNED NOT NULL,
  `image` varchar(250) DEFAULT NULL,
  `video` text,
  `video_type` enum('1','2') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '1-> Youtube video file, 2-> localfile',
  `package_category_id` bigint UNSIGNED DEFAULT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `visit_counts` bigint DEFAULT NULL,
  `meta` json DEFAULT NULL,
  `offer` tinyint(1) GENERATED ALWAYS AS (json_extract(`meta`,_utf8mb3'$.offer')) VIRTUAL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `package_categories` (
  `id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `package_category_descriptions` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `keywords` varchar(400) NOT NULL,
  `meta_description` text NOT NULL,
  `package_category_id` bigint UNSIGNED DEFAULT NULL,
  `language_id` bigint UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `package_descriptions` (
  `id` bigint UNSIGNED NOT NULL,
  `title` varchar(191) DEFAULT NULL,
  `description` longtext,
  `slug` varchar(100) DEFAULT NULL,
  `meta_description` text NOT NULL,
  `keywords` varchar(400) NOT NULL,
  `meta` json DEFAULT NULL,
  `package_id` bigint UNSIGNED DEFAULT NULL,
  `language_id` bigint UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `package_photos` (
  `id` bigint UNSIGNED NOT NULL,
  `image` varchar(250) DEFAULT NULL,
  `package_id` bigint UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


ALTER TABLE `packages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `packages_package_category_id_foreign` (`package_category_id`),
  ADD KEY `packages_user_id_package_category_id_index` (`user_id`,`package_category_id`),
  ADD KEY `packages_offer_index` (`offer`);

ALTER TABLE `package_categories`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `package_category_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `package_category_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `package_category_descriptions_id_foreign` (`package_category_id`);

ALTER TABLE `package_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `package_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `package_descriptions_package_id_language_id_index` (`package_id`,`language_id`);
ALTER TABLE `package_descriptions` ADD FULLTEXT KEY `title` (`title`);
ALTER TABLE `package_descriptions` ADD FULLTEXT KEY `keywords` (`keywords`);

ALTER TABLE `package_photos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `package_photos_package_id_index` (`package_id`);


ALTER TABLE `packages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

ALTER TABLE `package_categories`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

ALTER TABLE `package_category_descriptions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

ALTER TABLE `package_descriptions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

ALTER TABLE `package_photos`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;


ALTER TABLE `packages`
  ADD CONSTRAINT `packages_package_category_id_foreign` FOREIGN KEY (`package_category_id`) REFERENCES `package_categories` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  ADD CONSTRAINT `packages_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

ALTER TABLE `package_category_descriptions`
  ADD CONSTRAINT `package_category_descriptions_id_foreign` FOREIGN KEY (`package_category_id`) REFERENCES `package_categories` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  ADD CONSTRAINT `package_category_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE;

ALTER TABLE `package_descriptions`
  ADD CONSTRAINT `package_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `package_descriptions_package_id_foreign` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT;

ALTER TABLE `package_photos`
  ADD CONSTRAINT `package_photos_package_id_foreign` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT;


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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Partners', 'partners', '{\"fields\": {\"ar\": {\"new\": \"إضافة شريك جديد\", \"edit\": \"تعديل شريك\", \"image\": \"الصورة\", \"title\": \"العنوان\", \"description\": \"الوصف\"}, \"en\": {\"new\": \"Add New partner\", \"edit\": \"Edit partner\", \"image\": \"Image\", \"title\": \"Title\", \"description\": \"Description\"}}, \"module_name\": {\"ar\": \"شركاء النجاح\", \"en\": \"Partners\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);


--
-- Database: `nesmawae_water`
--

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

--
-- Table structure for table `partners`
--

CREATE TABLE `partners` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `image` varchar(200) DEFAULT NULL,
  `deleted_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 `partner_details`
--

CREATE TABLE `partner_details` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `image` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `partner_details`
--

INSERT INTO `partner_details` (`id`, `image`) VALUES
(1, ' ');

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

--
-- Table structure for table `partner_detail_descriptions`
--

CREATE TABLE `partner_detail_descriptions` (
  `id` bigint(20) UNSIGNED NULL,
  `title` varchar(100) NULL,
  `description` longtext NULL,
  `partner_detail_id` bigint(20) UNSIGNED NOT NULL,
  `language_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `partner_detail_descriptions`
--

INSERT INTO `partner_detail_descriptions` (`id`, `title`, `description`, `partner_detail_id`, `language_id`) VALUES
(5, ' ', ' ', 1, 1),
(6, ' ', ' ', 1, 2);

--
-- Indexes for dumped tables
--

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

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

--
-- Indexes for table `partner_detail_descriptions`
--
ALTER TABLE `partner_detail_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `partner_detail_descriptions_partner_detail_id_language_id_index` (`partner_detail_id`,`language_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `partner_detail_descriptions`
--
ALTER TABLE `partner_detail_descriptions`
  ADD CONSTRAINT `partner_detail_descriptions_partner_detail_id_foreign` FOREIGN KEY (`partner_detail_id`) REFERENCES `partner_details` (`id`) ON DELETE CASCADE;
COMMIT;



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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Products', 'products', '{\"fields\": {\"ar\": {\"new\": \"إضافة منتج جديدة\", \"code\": \"كود المنتج\", \"edit\": \"تعديل منتج\", \"name\": \"إسم المنتج\", \"images\": \"صور المنتج\", \"keywords\": \"كلمات تنشيط محرك البحث\", \"product_id\": \"المنتج الرئيسي\", \"description\": \"الوصف\", \"meta_description\": \"الكلمات الوصفية\"}, \"en\": {\"new\": \"Add New Product\", \"code\": \"Product code\", \"edit\": \"Edit Product\", \"name\": \"Name\", \"images\": \"Images\", \"keywords\": \"SEO keywords\", \"product_id\": \"Main product\", \"description\": \"Description\", \"meta_description\": \"Meta Description\"}}, \"module_name\": {\"ar\": \"المنتجات\", \"en\": \"Products\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);


--
-- Database: `cmsorbit_nesma_orbit`
--

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

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `image` varchar(200) DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `product_descriptions`
--

CREATE TABLE `product_descriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `keywords` varchar(100) NOT NULL,
  `meta_description` varchar(100) NOT NULL,
  `description` text NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `language_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `product_photos`
--

CREATE TABLE `product_photos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `photo` varchar(200) NOT NULL,
  `code` varchar(200) DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `products_product_id_index` (`product_id`);

--
-- Indexes for table `product_descriptions`
--
ALTER TABLE `product_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `product_descriptions_product_id_language_id_index` (`product_id`,`language_id`);

--
-- Indexes for table `product_photos`
--
ALTER TABLE `product_photos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_photos_product_id_index` (`product_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `product_descriptions`
--
ALTER TABLE `product_descriptions`
  ADD CONSTRAINT `product_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `product_descriptions_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `product_photos`
--
ALTER TABLE `product_photos`
  ADD CONSTRAINT `product_photos_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;
COMMIT;



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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Projects', 'projects', '{\"fields\": {\"ar\": {\"new\": \"إضافة مشروع جديدة\", \"edit\": \"تعديل مشروع\", \"name\": \"إسم المشروع\", \"client\": \"إسم العميل\", \"images\": \"صور المشروع\", \"keywords\": \"كلمات تنشيط محرك البحث\", \"country_id\": \"الدولة\", \"category_id\": \"نوع المشروع\", \"description\": \"وصف المشروع\", \"work_scopes\": \"مجال العمل\", \"started_date\": \"تاريخ البداية\", \"project_value\": \"قيمة المشروع\", \"completed_date\": \"تاريخ الإكمال\", \"meta_description\": \"الكلمات الوصفية\"}, \"en\": {\"new\": \"Add New Project\", \"edit\": \"Edit Project\", \"name\": \"project name\", \"client\": \"Client name\", \"images\": \"project images\", \"keywords\": \"SEO keywords\", \"country_id\": \"Country\", \"category_id\": \"Project type\", \"description\": \"Project description\", \"work_scopes\": \"Scope of work\", \"started_date\": \"Started date\", \"project_value\": \"Project value\", \"completed_date\": \"Completion date\", \"meta_description\": \"Meta Description\"}}, \"module_name\": {\"ar\": \"المشاريع\", \"en\": \"Projects\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



--
-- Database: `nesmawae_water`
--

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

INSERT INTO `categories` (`id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '2022-03-04 10:03:01', '2022-03-05 13:24:19', NULL),
(2, '2022-03-04 10:03:02', '2022-03-05 13:24:42', NULL);

--
-- Dumping data for table `category_descriptions`
--

INSERT INTO `category_descriptions` (`id`, `name`, `slug`, `keywords`, `meta_description`, `category_id`, `language_id`) VALUES
(7, 'حكومي', 'حكومي', 'حكومي', 'حكومي', 1, 1),
(8, 'Government', 'Government', 'Government', 'Government', 1, 2),
(9, 'خاص', 'خاص', 'خاص', 'خاص', 2, 1),
(10, 'Private', 'Private', 'Private', 'Private', 2, 2);

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

--
-- Dumping data for table `countries`
--

INSERT INTO `countries` (`id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '2022-03-04 10:03:01', '2022-03-04 17:17:59', NULL),
(2, '2022-03-04 10:03:01', '2022-03-04 10:03:01', NULL);


--
-- Dumping data for table `country_descriptions`
--

INSERT INTO `country_descriptions` (`id`, `name`, `country_id`, `language_id`) VALUES
(2, 'Bahrain', 2, 1),
(4, 'Bahrain', 2, 2),
(5, 'Saudi Arabia', 1, 1),
(6, 'Saudi Arabia', 1, 2);

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

--
-- Table structure for table `projects`
--

CREATE TABLE `projects` (
  `id` bigint(20) UNSIGNED NULL,
  `client` varchar(100) DEFAULT NULL,
  `project_value` double DEFAULT NULL,
  `started_date` date DEFAULT NULL,
  `completed_date` date DEFAULT NULL,
  `country_id` bigint(20) UNSIGNED DEFAULT NULL,
  `category_id` bigint(20) UNSIGNED DEFAULT NULL,
  `images` json DEFAULT NULL,
  `files` json DEFAULT NULL,
  `start_year` smallint(6) DEFAULT NULL,
  `start_month` tinyint(4) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `project_descriptions`
--

CREATE TABLE `project_descriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `keywords` varchar(100) NULL,
  `meta_description` varchar(100) NULL,
  `description` longtext NULL,
  `work_scopes` longtext NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `language_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `project_details`
--

CREATE TABLE `project_details` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `image` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `project_details`
--

INSERT INTO `project_details` (`id`, `image`) VALUES
(1, ' ');

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

--
-- Table structure for table `project_detail_descriptions`
--

CREATE TABLE `project_detail_descriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(100) NULL,
  `description` longtext NULL,
  `project_detail_id` bigint(20) UNSIGNED NOT NULL,
  `language_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `project_detail_descriptions`
--

INSERT INTO `project_detail_descriptions` (`id`, `title`, `description`, `project_detail_id`, `language_id`) VALUES
(7, ' ', ' ', 1, 1),
(8, ' ', ' ', 1, 2);


--
-- Indexes for table `projects`
--
ALTER TABLE `projects`
  ADD PRIMARY KEY (`id`),
  ADD KEY `projects_country_id_category_id_index` (`country_id`,`category_id`),
  ADD KEY `start_year` (`start_year`),
  ADD KEY `start_month` (`start_month`);

--
-- Indexes for table `project_descriptions`
--
ALTER TABLE `project_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `project_descriptions_project_id_language_id_index` (`project_id`,`language_id`);

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

--
-- Indexes for table `project_detail_descriptions`
--
ALTER TABLE `project_detail_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_detail_descriptions_project_detail_id_language_id_index` (`project_detail_id`,`language_id`);

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

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

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

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

--
-- Constraints for table `project_descriptions`
--
ALTER TABLE `project_descriptions`
  ADD CONSTRAINT `project_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_descriptions_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `project_detail_descriptions`
--
ALTER TABLE `project_detail_descriptions`
  ADD CONSTRAINT `project_detail_descriptions_project_detail_id_foreign` FOREIGN KEY (`project_detail_id`) REFERENCES `project_details` (`id`) ON DELETE CASCADE;
COMMIT;



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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Rooms', 'rooms', '{\"fields\": {\"ar\": {\"new\": \"إضافة غرفة جديدة\", \"edit\": \"تعديل غرفة\", \"name\": \"إسم الغرفة\", \"image\": \"الصورة\", \"keywords\": \"كلمات تنشيط محرك البحث\", \"description\": \"وصف الغرفة\", \"meta_description\": \"الكلمات الوصفية\"}, \"en\": {\"new\": \"Add New Room\", \"edit\": \"Edit Room\", \"name\": \"Room name\", \"image\": \"Image\", \"keywords\": \"SEO keywords\", \"description\": \"Description\", \"meta_description\": \"Meta Description\"}}, \"module_name\": {\"ar\": \"الغرف\", \"en\": \"Rooms\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



--
-- Database: `cmsorbit_nesma_orbit`
--

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

--
-- Table structure for table `rooms`
--

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

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

--
-- Table structure for table `room_descriptions`
--

CREATE TABLE `room_descriptions` (
  `id` bigint(20) UNSIGNED NULL,
  `name` varchar(100) NOT NULL,
  `keywords` varchar(100) NOT NULL,
  `meta_description` varchar(100) NOT NULL,
  `description` text NOT NULL,
  `room_id` bigint(20) UNSIGNED NOT NULL,
  `language_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `room_descriptions`
--
ALTER TABLE `room_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `room_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `room_descriptions_room_id_language_id_index` (`room_id`,`language_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `room_descriptions`
--
ALTER TABLE `room_descriptions`
  ADD CONSTRAINT `room_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `room_descriptions_room_id_foreign` FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`) ON DELETE CASCADE;
COMMIT;



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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Services', 'services', '{\"fields\": {\"ar\": {\"new\": \"إضاف خدمة جديدة\", \"edit\": \"تعديل خدمة\", \"name\": \"إسم الخدمة\", \"slug\": \"رابط Slug\", \"image\": \"الصورة\", \"keywords\": \"كلمات تنشيط محرك البحث\", \"description\": \"وصف الخدمة\", \"meta_description\": \"الكلمات الوصفية\"}, \"en\": {\"new\": \"Add New Service\", \"edit\": \"Edit service\", \"name\": \"Service name\", \"slug\": \"Slug url\", \"image\": \"Image\", \"keywords\": \"SEO keywords\", \"description\": \"Service description\", \"meta_description\": \"Meta description\"}}, \"module_name\": {\"ar\": \"الخدمات\", \"en\": \"Services\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



--
-- Database: `cmsorbit_nesma_orbit`
--

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

--
-- Table structure for table `services`
--

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

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

--
-- Table structure for table `service_descriptions`
--

CREATE TABLE `service_descriptions` (
  `id` bigint(20) UNSIGNED NULL,
  `name` varchar(100) NULL,
  `keywords` varchar(300) NULL,
  `meta_description` varchar(300) NULL,
  `slug` varchar(300) NULL,
  `description` longtext NULL,
  `service_id` bigint(20) UNSIGNED NOT NULL,
  `language_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `service_descriptions`
--
ALTER TABLE `service_descriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `service_descriptions_language_id_foreign` (`language_id`),
  ADD KEY `service_descriptions_service_id_language_id_index` (`service_id`,`language_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `service_descriptions`
--
ALTER TABLE `service_descriptions`
  ADD CONSTRAINT `service_descriptions_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `service_descriptions_service_id_foreign` FOREIGN KEY (`service_id`) REFERENCES `services` (`id`) ON DELETE CASCADE;
COMMIT;



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

START TRANSACTION;

-- Insert into modules table
INSERT INTO `modules` (`name`, `path`, `meta`, `created_at`, `updated_at`, `deleted_at`) VALUES ('Unit Lease', 'units', '{\"fields\": {\"ar\": [], \"en\": []}, \"module_name\": {\"ar\": \"إستئجار الواحدات\", \"en\": \" Unit Lease\"}}', '2022-07-01 01:07:27', '2022-07-01 01:07:27', NULL);



--
-- Database: `cmsnesmr_cms`
--

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

--
-- Table structure for table `units`
--

CREATE TABLE `units` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `applicant_name` varchar(100) NOT NULL,
  `nationality` varchar(20) NOT NULL,
  `dependent_no` varchar(10) NOT NULL,
  `adult` varchar(10) NOT NULL,
  `children` varchar(10) NOT NULL,
  `id_type` enum('iqama','passport') NOT NULL,
  `id_no` varchar(30) NOT NULL,
  `rental_source` enum('company','self') NOT NULL,
  `company_name` varchar(100) DEFAULT NULL,
  `company_address` varchar(200) DEFAULT NULL,
  `company_contact_no` varchar(15) DEFAULT NULL,
  `person_name` varchar(100) DEFAULT NULL,
  `person_address` varchar(200) DEFAULT NULL,
  `person_contact_no` varchar(15) DEFAULT NULL,
  `applicant_contact` json NOT NULL,
  `selected_compound` json NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

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

--
-- AUTO_INCREMENT for dumped tables
--

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

