From c1d93079cfd1c625c956e6edbc00a8517de7be72 Mon Sep 17 00:00:00 2001 From: Bahar Date: Sat, 22 Aug 2026 15:14:25 +0330 Subject: [PATCH] feat:add changes database --- .../airlinedatabase/airline-agency (5).sql | 655 ++++++++++++++++++ 1 file changed, 655 insertions(+) create mode 100644 database/airlinedatabase/airline-agency (5).sql diff --git a/database/airlinedatabase/airline-agency (5).sql b/database/airlinedatabase/airline-agency (5).sql new file mode 100644 index 0000000..ed6993e --- /dev/null +++ b/database/airlinedatabase/airline-agency (5).sql @@ -0,0 +1,655 @@ +-- phpMyAdmin SQL Dump +-- version 5.2.3 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1:3306 +-- Generation Time: Aug 22, 2026 at 08:44 AM +-- Server version: 8.4.7 +-- PHP Version: 8.3.28 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Database: `airline-agency` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `activity_logs` +-- + +DROP TABLE IF EXISTS `activity_logs`; +CREATE TABLE IF NOT EXISTS `activity_logs` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `admin_id` bigint UNSIGNED DEFAULT NULL, + `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `model_id` bigint UNSIGNED NOT NULL, + `action` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, + `changes` longtext COLLATE utf8mb4_unicode_ci, + `created_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `activity_logs_model_type_model_id_index` (`model_type`,`model_id`), + KEY `activity_logs_admin_id_index` (`admin_id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- +-- Dumping data for table `activity_logs` +-- + +INSERT INTO `activity_logs` (`id`, `admin_id`, `model_type`, `model_id`, `action`, `changes`, `created_at`) VALUES +(1, 1, 'App\\Models\\Flight', 3, 'updated', '{\"summary\":{\"old\":\"\",\"new\":\"\\u067e\\u0631\\u0648\\u0627\\u0632 \\u0627\\u0645\\u0646\"}}', '2026-08-22 06:13:55'), +(2, 1, 'App\\Models\\Flight', 1, 'updated', '{\"views\":{\"old\":45,\"new\":46}}', '2026-08-22 07:00:46'), +(3, 1, 'App\\Models\\Tour', 3, 'updated', '{\"duration\":{\"old\":5,\"new\":\"10\"}}', '2026-08-22 08:22:30'), +(4, 1, 'App\\Models\\Flight', 3, 'updated', '{\"price\":{\"old\":5000000,\"new\":\"699997\"}}', '2026-08-22 08:41:28'), +(5, 1, 'App\\Models\\Tour', 1, 'updated', '{\"views\":{\"old\":45,\"new\":46}}', '2026-08-22 08:43:50'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `admins` +-- + +DROP TABLE IF EXISTS `admins`; +CREATE TABLE IF NOT EXISTS `admins` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `file_id` bigint UNSIGNED DEFAULT NULL, + `first_name` varchar(20) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL, + `last_name` varchar(200) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL, + `email` varchar(250) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL, + `username` varchar(200) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL, + `password` varchar(250) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL, + `status` tinyint UNSIGNED NOT NULL COMMENT '0:disable\r\n|\r\n1:enable', + `created_at` timestamp NOT NULL, + `updated_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `admins_file_id_fk` (`file_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `admins` +-- + +INSERT INTO `admins` (`id`, `file_id`, `first_name`, `last_name`, `email`, `username`, `password`, `status`, `created_at`, `updated_at`) VALUES +(1, 19, 'زهرا', 'علیپور', 'zahraalipoor@gmail.com', 'admin', '$2y$12$JUvkZB6lVmNsF384FQ101ujAdmf1jUlHBmkRm2JEPEwsjfoofF0zS', 1, '2026-07-24 11:32:20', '2026-08-19 04:58:27'), +(4, NULL, 'سوگند', 'اصغری', 'sogandasgh@gmail.com', 'sognd', '$2y$12$P/os6J5AEoSiOqxyDnal8OP0CAEmx1Sn00mMynpkNV8tDCapUOtAu', 1, '2026-08-19 05:34:43', '2026-08-19 13:38:25'), +(5, NULL, 'رضا', 'رضایی', 'rezaeiireza@gmail.com', 'reza', '$2y$12$8LiHtBAp4MaR7V4EM4dHyeCw0gKI1I71OMyvNtdpqffHbh2qWkgqu', 1, '2026-08-19 08:53:05', '2026-08-19 13:38:33'), +(7, NULL, 'مینا', 'اسماعیل نژاد', 'minaesmaeli@gmail.com', 'mina80', '$2y$12$giXuiIvoQvJHX0ueoCodF.aqo0NRccqllWjYGwdhTOh58/ujqBDza', 1, '2026-08-19 10:11:28', '2026-08-19 10:11:28'), +(8, NULL, 'سارا', 'ساداتی', 'sarasdn@gmail.com', 'sarasdn', '$2y$12$xgD6VpUr32axPmgDoIzXNuxoE/nJlHXUQw1Jgx5nz6rw3XbWCVfE.', 1, '2026-08-19 20:41:18', '2026-08-19 20:42:22'), +(9, NULL, 'ایمان', 'رضایی', 'iman91@gmail.com', 'iman91', '$2y$12$RnAiGOYE.u/wVxnTiKXsgu.xt87pH3WBCxekI.VEwAWebJE05gXW2', 1, '2026-08-22 04:31:42', '2026-08-22 04:31:42'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `admin_permission` +-- + +DROP TABLE IF EXISTS `admin_permission`; +CREATE TABLE IF NOT EXISTS `admin_permission` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `admin_id` bigint UNSIGNED NOT NULL, + `admin_view` tinyint(1) NOT NULL DEFAULT '0', + `admin_create` tinyint(1) NOT NULL DEFAULT '0', + `admin_edit` tinyint(1) NOT NULL DEFAULT '0', + `admin_delete` tinyint(1) NOT NULL DEFAULT '0', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_view` tinyint(1) NOT NULL DEFAULT '0', + `user_edit` tinyint(1) NOT NULL DEFAULT '0', + `user_delete` tinyint(1) NOT NULL DEFAULT '0', + `tour_view` tinyint(1) NOT NULL DEFAULT '0', + `tour_create` tinyint(1) NOT NULL DEFAULT '0', + `tour_edit` tinyint(1) NOT NULL DEFAULT '0', + `tour_delete` tinyint(1) NOT NULL DEFAULT '0', + `flight_view` tinyint(1) NOT NULL DEFAULT '0', + `flight_create` tinyint(1) NOT NULL DEFAULT '0', + `flight_edit` tinyint(1) NOT NULL DEFAULT '0', + `flight_delete` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `admin_permission_admin_id_unique` (`admin_id`) +) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `admin_permission` +-- + +INSERT INTO `admin_permission` (`id`, `admin_id`, `admin_view`, `admin_create`, `admin_edit`, `admin_delete`, `created_at`, `updated_at`, `user_view`, `user_edit`, `user_delete`, `tour_view`, `tour_create`, `tour_edit`, `tour_delete`, `flight_view`, `flight_create`, `flight_edit`, `flight_delete`) VALUES +(1, 1, 1, 1, 1, 1, NULL, '2026-08-20 04:50:00', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +(2, 4, 1, 0, 1, 0, '2026-08-19 15:14:46', '2026-08-19 15:35:48', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(3, 7, 1, 1, 1, 1, '2026-08-19 15:15:10', '2026-08-19 19:58:37', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(4, 8, 1, 1, 0, 0, '2026-08-19 20:41:18', '2026-08-22 04:29:47', 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0), +(5, 9, 1, 1, 1, 1, '2026-08-22 04:31:42', '2026-08-22 04:45:57', 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `airlines` +-- + +DROP TABLE IF EXISTS `airlines`; +CREATE TABLE IF NOT EXISTS `airlines` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(250) COLLATE utf32_persian_ci NOT NULL, + `code` varchar(20) COLLATE utf32_persian_ci NOT NULL, + `file_id` bigint UNSIGNED NOT NULL, + `status` tinyint NOT NULL COMMENT '0:disable|1:enable', + `created_at` timestamp NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `airlines` +-- + +INSERT INTO `airlines` (`id`, `name`, `code`, `file_id`, `status`, `created_at`) VALUES +(1, 'زاگرس', '15', 1, 0, '2026-08-16 13:08:14'), +(2, 'کیش ایر', '20', 0, 0, '2026-08-20 06:55:59'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `airports` +-- + +DROP TABLE IF EXISTS `airports`; +CREATE TABLE IF NOT EXISTS `airports` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(250) COLLATE utf32_persian_ci NOT NULL, + `city_id` bigint UNSIGNED DEFAULT NULL, + `code` varchar(10) COLLATE utf32_persian_ci NOT NULL, + `country` varchar(255) COLLATE utf32_persian_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `airports_fk1` (`city_id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `airports` +-- + +INSERT INTO `airports` (`id`, `name`, `city_id`, `code`, `country`) VALUES +(1, 'مهراباد', 1, '12', 'ایران'), +(2, 'دستغیب', 2, '15', 'ایران'), +(3, 'کیش', 3, '40', 'ایران'), +(4, 'ساری', 4, '20', 'ایران'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bookings` +-- + +DROP TABLE IF EXISTS `bookings`; +CREATE TABLE IF NOT EXISTS `bookings` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `user_id` bigint UNSIGNED NOT NULL, + `flight_id` bigint UNSIGNED DEFAULT NULL, + `tour_date_id` bigint UNSIGNED DEFAULT NULL, + `adult_count` int UNSIGNED NOT NULL, + `child_count` int UNSIGNED NOT NULL, + `total_price` int UNSIGNED NOT NULL, + `tracking_code` varchar(50) COLLATE utf32_persian_ci NOT NULL, + `created_at` timestamp NOT NULL, + `status` tinyint NOT NULL COMMENT '0 = pending\r\n1 = confirmed\r\n2 = cancelled', + `updated_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `bookings_fk2` (`flight_id`), + KEY `bookings_fk3` (`tour_date_id`), + KEY `bookings_fk1` (`user_id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `bookings` +-- + +INSERT INTO `bookings` (`id`, `user_id`, `flight_id`, `tour_date_id`, `adult_count`, `child_count`, `total_price`, `tracking_code`, `created_at`, `status`, `updated_at`) VALUES +(1, 8, 1, NULL, 1, 0, 5000000, 'BK-A7PLNYASX4', '2026-08-18 10:43:13', 0, '2026-08-18 10:43:13'), +(2, 8, 1, NULL, 1, 0, 5000000, 'BK-ZVLWWTQY6D', '2026-08-18 11:19:05', 0, '2026-08-18 11:19:05'), +(3, 8, 1, NULL, 1, 0, 5000000, 'BK-IZOZTGLI9M', '2026-08-18 11:31:51', 0, '2026-08-18 11:31:51'), +(4, 8, 1, NULL, 1, 0, 5000000, 'BK-SVZK5CDJQV', '2026-08-18 11:32:03', 0, '2026-08-18 11:32:03'), +(5, 8, 2, NULL, 1, 0, 1500, 'BK-YIHGSA46QT', '2026-08-18 14:33:53', 0, '2026-08-18 14:33:53'), +(6, 11, 1, NULL, 1, 0, 5000000, 'BK-YQE6W9SSE0', '2026-08-18 21:59:42', 0, '2026-08-18 21:59:42'), +(7, 13, 1, NULL, 1, 0, 5000000, 'BK-QOXBBFHBTD', '2026-08-21 18:36:04', 0, '2026-08-21 18:36:04'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `booking_passengers` +-- + +DROP TABLE IF EXISTS `booking_passengers`; +CREATE TABLE IF NOT EXISTS `booking_passengers` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `booking_id` bigint UNSIGNED NOT NULL, + `first_name` varchar(100) COLLATE utf32_persian_ci NOT NULL, + `last_name` varchar(100) COLLATE utf32_persian_ci NOT NULL, + `national_code` varchar(20) COLLATE utf32_persian_ci NOT NULL, + `passenger_type` tinyint NOT NULL COMMENT '0 = child\r\n1 = adult', + `birth_date` date NOT NULL, + `created_at` timestamp NOT NULL, + `updated_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `bookings_ passengers_fk1` (`booking_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `cities` +-- + +DROP TABLE IF EXISTS `cities`; +CREATE TABLE IF NOT EXISTS `cities` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `province_id` bigint UNSIGNED NOT NULL, + `name` varchar(100) COLLATE utf32_persian_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `cities_fk1` (`province_id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `cities` +-- + +INSERT INTO `cities` (`id`, `province_id`, `name`) VALUES +(1, 1, 'تهران'), +(2, 2, 'شیراز'), +(3, 4, 'کیش'), +(4, 5, 'ساری'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `comments` +-- + +DROP TABLE IF EXISTS `comments`; +CREATE TABLE IF NOT EXISTS `comments` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `user_id` bigint UNSIGNED DEFAULT NULL, + `flight_id` bigint UNSIGNED DEFAULT NULL, + `tour_id` bigint UNSIGNED DEFAULT NULL, + `comment` text COLLATE utf32_persian_ci NOT NULL, + `status` tinyint NOT NULL COMMENT '0:pending|1:approaved |2:rejected', + `created_at` timestamp NOT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `guest_name` varchar(255) COLLATE utf32_persian_ci DEFAULT NULL, + `guest_email` varchar(255) COLLATE utf32_persian_ci DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `comments_user_fk` (`user_id`), + KEY `comments.flight_fk1` (`flight_id`), + KEY `comments.tour_fk1` (`tour_id`) +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `comments` +-- + +INSERT INTO `comments` (`id`, `user_id`, `flight_id`, `tour_id`, `comment`, `status`, `created_at`, `updated_at`, `guest_name`, `guest_email`) VALUES +(4, NULL, 2, NULL, 'شسیبلاتنمک', 1, '2026-08-17 10:11:18', '2026-08-17 10:11:18', 'بهار', 'rezaeiibahar8080@gmail.com'), +(5, NULL, 2, NULL, 'سیبلذادتئنوم', 1, '2026-08-17 10:21:29', '2026-08-17 10:21:29', 'بهار', 'rezaeiibahar8080@gmail.com'), +(6, NULL, NULL, 1, 'سلام عالی بود خیلی خوش گذشت', 1, '2026-08-17 14:33:23', '2026-08-17 14:33:23', 'بهار', 'rezaeiibahar8080@gmail.com'), +(9, 8, 2, NULL, 'یبلاتن', 1, '2026-08-18 10:37:41', '2026-08-18 10:37:41', NULL, NULL), +(10, 10, 1, NULL, 'بهترینه', 1, '2026-08-18 20:10:47', '2026-08-18 20:10:47', NULL, NULL), +(11, 10, NULL, 1, 'عالیه خیلی خوش گذشت', 0, '2026-08-18 20:11:27', '2026-08-18 20:11:27', NULL, NULL), +(12, NULL, 1, NULL, 'سلام دوست عزیز', 1, '2026-08-20 06:39:23', '2026-08-20 06:39:23', 'بهار', 'rezaeiibahar8080@gmail.com'), +(13, 13, 1, NULL, 'سلام عالی', 1, '2026-08-21 17:54:12', '2026-08-21 17:54:12', NULL, NULL), +(14, 13, NULL, 3, 'عالی بود', 0, '2026-08-21 19:18:09', '2026-08-21 19:18:09', NULL, NULL), +(15, 13, 3, NULL, 'بهترین پرواز', 1, '2026-08-21 19:23:14', '2026-08-21 19:23:14', NULL, NULL), +(16, 13, NULL, 2, 'تور کیش عالی بود', 0, '2026-08-21 19:25:04', '2026-08-21 19:25:04', NULL, NULL), +(17, 13, NULL, 2, 'تور به یادماندنی', 1, '2026-08-21 19:29:22', '2026-08-21 19:29:22', NULL, NULL); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `favorites` +-- + +DROP TABLE IF EXISTS `favorites`; +CREATE TABLE IF NOT EXISTS `favorites` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `user_id` bigint UNSIGNED NOT NULL, + `flight_id` bigint UNSIGNED DEFAULT NULL, + `tour_id` bigint UNSIGNED DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `favorites_user_fk` (`user_id`), + KEY `favorites_fligh_fk` (`flight_id`), + KEY `favorites_tour_fk` (`tour_id`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `favorites` +-- + +INSERT INTO `favorites` (`id`, `user_id`, `flight_id`, `tour_id`, `created_at`, `updated_at`) VALUES +(13, 13, 2, NULL, NULL, NULL), +(14, 13, NULL, 2, NULL, NULL), +(15, 13, 3, NULL, NULL, NULL); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `files` +-- + +DROP TABLE IF EXISTS `files`; +CREATE TABLE IF NOT EXISTS `files` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(200) COLLATE utf32_persian_ci NOT NULL, + `extension` varchar(10) COLLATE utf32_persian_ci NOT NULL, + `size` bigint UNSIGNED NOT NULL COMMENT 'bytes', + `original_name` varchar(350) COLLATE utf32_persian_ci NOT NULL, + `path` varchar(300) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL, + `created_at` timestamp NOT NULL, + `updated_at` timestamp NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `files` +-- + +INSERT INTO `files` (`id`, `name`, `extension`, `size`, `original_name`, `path`, `created_at`, `updated_at`) VALUES +(2, '178686502350329.jpg', 'jpg', 1531785, 'IMG_E0948.JPG', 'user_images/178686502350329.jpg', '2026-08-16 07:23:43', '2026-08-16 07:23:43'), +(4, '178708368099810.jpg', 'jpg', 2878480, 'IMG_4620.JPG', 'user_images/178708368099810.jpg', '2026-08-18 20:08:00', '2026-08-18 20:08:00'), +(5, '178708377890713.jpg', 'jpg', 2878480, 'IMG_4620.JPG', 'user_images/178708377890713.jpg', '2026-08-18 20:09:38', '2026-08-18 20:09:38'), +(8, 'Zlo4xGqyywP5yA7vWmxULqsicE7u3kmxQU62c6e4', 'jfif', 25049, 'images (1).jfif', 'flights/Zlo4xGqyywP5yA7vWmxULqsicE7u3kmxQU62c6e4.jpg', '2026-08-20 08:49:13', '2026-08-20 08:49:13'), +(11, 'x754Adc2gYKzUF7lC2UeAcxVfshG0PMatIYKML8v', 'jfif', 17837, 'images (3).jfif', 'flights/x754Adc2gYKzUF7lC2UeAcxVfshG0PMatIYKML8v.jpg', '2026-08-20 09:42:22', '2026-08-20 09:42:22'), +(12, 'HWWwZyihzUt1ICU55MnH7sAaC78VUvRqlGGPgAiX', 'jfif', 7562, 'images (2).jfif', 'flights/HWWwZyihzUt1ICU55MnH7sAaC78VUvRqlGGPgAiX.jpg', '2026-08-20 09:42:38', '2026-08-20 09:42:38'), +(15, 'Jd6OdkiPpsPZoRuFqsK7PXMCrhJGsicgvkHMVwvU', 'jfif', 81940, 'images.jfif', 'tours/Jd6OdkiPpsPZoRuFqsK7PXMCrhJGsicgvkHMVwvU.jpg', '2026-08-20 11:22:36', '2026-08-20 11:22:36'), +(16, 'nmLTn2kFxtmb9u2CCJDtNH7BNVDslsPb5yslO1Tu', 'jpg', 68490, '1111111111111.jpg', 'tours/nmLTn2kFxtmb9u2CCJDtNH7BNVDslsPb5yslO1Tu.jpg', '2026-08-20 11:38:10', '2026-08-20 11:38:10'), +(17, '8ydQEykLE5NGsbQQ6nQxCkiB3g5B79xJW84Ve1x5', 'jfif', 54830, 'images (1).jfif', 'tours/8ydQEykLE5NGsbQQ6nQxCkiB3g5B79xJW84Ve1x5.jpg', '2026-08-20 11:40:06', '2026-08-20 11:40:06'), +(18, 'AxuobdDTwT98reo6l9AIb5uR8SGw5QE7UvikpTKO', 'webp', 122286, '5nivvbthka.webp', 'tours/AxuobdDTwT98reo6l9AIb5uR8SGw5QE7UvikpTKO.jpg', '2026-08-20 11:48:28', '2026-08-20 11:48:28'), +(19, 'DOLztk6OCnQIEBPt3aDtmEPWPkJj7cZpJ8b6cKqm', 'jfif', 26059, 'images (2).jfif', 'tours/DOLztk6OCnQIEBPt3aDtmEPWPkJj7cZpJ8b6cKqm.jpg', '2026-08-20 11:50:45', '2026-08-20 11:50:45'), +(21, '178732634165538.jpg', 'jpg', 2679471, 'IMG_5312.JPG', 'user_images/178732634165538.jpg', '2026-08-21 15:32:21', '2026-08-21 15:32:21'), +(22, '178733050497402.webp', 'webp', 9528, 'avatar-profile-icon-flat-style-female-user-vector-illustration-isolated-background-women-sign-business-concept-321407993.webp', 'user_images/178733050497402.webp', '2026-08-21 16:41:44', '2026-08-21 16:41:44'), +(23, '178738551824629.jpg', 'jpg', 15529, 'images.jfif', 'user_images/178738551824629.jpg', '2026-08-22 07:58:38', '2026-08-22 07:58:38'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `flights` +-- + +DROP TABLE IF EXISTS `flights`; +CREATE TABLE IF NOT EXISTS `flights` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `arrival_aiport_id` bigint UNSIGNED NOT NULL, + `departure_airport_id` bigint UNSIGNED NOT NULL, + `airline_id` bigint UNSIGNED NOT NULL, + `file_id` bigint UNSIGNED NOT NULL, + `title` varchar(250) COLLATE utf32_persian_ci NOT NULL, + `views` int UNSIGNED NOT NULL, + `summary` varchar(512) COLLATE utf32_persian_ci NOT NULL, + `flight_type` tinyint NOT NULL COMMENT '0:departure|1:return|2:roundtrip', + `departure_time` datetime NOT NULL, + `price` decimal(10,0) NOT NULL, + `capacity` int UNSIGNED NOT NULL, + `status` tinyint NOT NULL COMMENT '0:disable |1:enable', + `created_at` timestamp NOT NULL, + `updated_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `flights_fk1` (`airline_id`), + KEY `flights_fk2` (`file_id`), + KEY `flights_fk3` (`arrival_aiport_id`), + KEY `flights_fk4` (`departure_airport_id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `flights` +-- + +INSERT INTO `flights` (`id`, `arrival_aiport_id`, `departure_airport_id`, `airline_id`, `file_id`, `title`, `views`, `summary`, `flight_type`, `departure_time`, `price`, `capacity`, `status`, `created_at`, `updated_at`) VALUES +(1, 2, 1, 1, 12, 'تهران به شیراز', 46, '', 2, '2026-08-16 13:08:20', 5000000, 0, 1, '2026-08-16 13:13:41', '2026-08-22 07:00:46'), +(2, 1, 2, 1, 11, 'شیراز به تهران', 54, '', 2, '2026-08-16 21:53:46', 1500, 0, 1, '2026-08-16 21:54:40', '2026-08-21 18:39:40'), +(3, 4, 1, 1, 8, 'تهران ساری', 11, 'پرواز امن', 0, '2026-08-22 11:20:00', 699997, 0, 1, '2026-08-20 07:51:07', '2026-08-22 08:41:28'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `provinces` +-- + +DROP TABLE IF EXISTS `provinces`; +CREATE TABLE IF NOT EXISTS `provinces` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(100) COLLATE utf32_persian_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `provinces` +-- + +INSERT INTO `provinces` (`id`, `name`) VALUES +(1, 'تهران'), +(2, 'شیراز'), +(3, 'اصفهان'), +(4, 'کیش'), +(5, 'ساری'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `site_visits` +-- + +DROP TABLE IF EXISTS `site_visits`; +CREATE TABLE IF NOT EXISTS `site_visits` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `user_agent` text COLLATE utf8mb4_unicode_ci, + `url` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `site_visits_created_at_index` (`created_at`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- +-- Dumping data for table `site_visits` +-- + +INSERT INTO `site_visits` (`id`, `ip_address`, `user_agent`, `url`, `created_at`, `updated_at`) VALUES +(1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0', 'http://127.0.0.1:8000', '2026-08-22 05:13:05', '2026-08-22 05:13:05'), +(2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0', 'http://127.0.0.1:8000', '2026-08-22 05:21:23', '2026-08-22 05:21:23'), +(3, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36', 'http://127.0.0.1:8000', '2026-08-22 07:35:43', '2026-08-22 07:35:43'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tours` +-- + +DROP TABLE IF EXISTS `tours`; +CREATE TABLE IF NOT EXISTS `tours` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `title` varchar(250) COLLATE utf32_persian_ci NOT NULL, + `summary` varchar(512) COLLATE utf32_persian_ci NOT NULL, + `descriptions` text COLLATE utf32_persian_ci NOT NULL, + `file_id` bigint UNSIGNED NOT NULL, + `origin` varchar(250) COLLATE utf32_persian_ci NOT NULL, + `views` int UNSIGNED NOT NULL, + `destination` varchar(250) COLLATE utf32_persian_ci NOT NULL, + `duration` int UNSIGNED NOT NULL, + `price` bigint UNSIGNED NOT NULL, + `status` tinyint NOT NULL COMMENT '0:disable|1:enable', + `created_at` timestamp NOT NULL, + `updated_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `tours_fk1` (`file_id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `tours` +-- + +INSERT INTO `tours` (`id`, `title`, `summary`, `descriptions`, `file_id`, `origin`, `views`, `destination`, `duration`, `price`, `status`, `created_at`, `updated_at`) VALUES +(1, 'تور تهران به مشهد', 'سفری جذاب و دیدنی برای شما', '', 18, 'تهران', 46, 'مشهد', 7, 500, 1, '2026-08-17 12:24:04', '2026-08-22 08:43:50'), +(2, 'تور تفریحی کیش', 'سفری جذاب به جزیره زیبای کیش با اقامت در هتل و گشت شهری', 'تور ۵ روزه کیش شامل اقامت، گشت شهری و بازدید از جاذبه‌های گردشگری', 17, 'تهران', 13, 'کیش', 10, 20000000, 1, '2026-08-17 12:28:57', '2026-08-21 19:29:22'), +(3, 'تور قشم', 'تور بسیار عالی', 'گشت شهری به همرراه بازید', 16, 'ساری', 3, 'قشم', 10, 2000000, 1, '2026-08-20 11:22:36', '2026-08-22 08:22:30'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tour_dates` +-- + +DROP TABLE IF EXISTS `tour_dates`; +CREATE TABLE IF NOT EXISTS `tour_dates` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `tour_id` bigint UNSIGNED NOT NULL, + `start_date` date NOT NULL, + `end_date` date NOT NULL, + `price` int UNSIGNED NOT NULL, + `capacity` int UNSIGNED NOT NULL, + `status` tinyint NOT NULL COMMENT '0:disable |1:enable', + `created_at` timestamp NOT NULL, + `updated_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `tours_dates_fk1` (`tour_id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `tour_dates` +-- + +INSERT INTO `tour_dates` (`id`, `tour_id`, `start_date`, `end_date`, `price`, `capacity`, `status`, `created_at`, `updated_at`) VALUES +(1, 2, '2026-08-20', '2026-09-01', 20000000, 10, 1, '2026-08-17 14:36:40', '2026-08-20 11:40:06'), +(2, 1, '2026-08-21', '2026-08-25', 1500, 20, 1, '2026-08-17 14:37:36', '2026-08-20 11:48:28'), +(3, 3, '2026-09-07', '2026-11-05', 2000000, 5, 1, '2026-08-20 11:22:36', '2026-08-20 11:22:36'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `users` +-- + +DROP TABLE IF EXISTS `users`; +CREATE TABLE IF NOT EXISTS `users` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `first_name` varchar(250) COLLATE utf32_persian_ci NOT NULL, + `last_name` varchar(250) COLLATE utf32_persian_ci NOT NULL, + `national_code` varchar(10) COLLATE utf32_persian_ci NOT NULL, + `gender` tinyint NOT NULL COMMENT '0:male | 1:female |2:unknown', + `marital_status` tinyint NOT NULL COMMENT '0:single |1:marrid |2:separated', + `spouse_name` varchar(256) COLLATE utf32_persian_ci DEFAULT NULL, + `mobile` varchar(11) COLLATE utf32_persian_ci NOT NULL, + `email` varchar(150) COLLATE utf32_persian_ci NOT NULL, + `image_id` bigint UNSIGNED DEFAULT NULL, + `username` varchar(200) COLLATE utf32_persian_ci NOT NULL, + `password` varchar(250) COLLATE utf32_persian_ci NOT NULL, + `email_verified_at` timestamp NULL DEFAULT NULL, + `province_id` varchar(10) COLLATE utf32_persian_ci DEFAULT NULL, + `city_id` varchar(10) COLLATE utf32_persian_ci DEFAULT NULL, + `status` tinyint UNSIGNED DEFAULT NULL COMMENT '0:disable | 1:pending | 2:enable ', + `created_at` timestamp NOT NULL, + `updated_at` timestamp NOT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `user_img_fk` (`image_id`), + KEY `users_province_fk` (`province_id`), + KEY `users_city_fk` (`city_id`) +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci; + +-- +-- Dumping data for table `users` +-- + +INSERT INTO `users` (`id`, `first_name`, `last_name`, `national_code`, `gender`, `marital_status`, `spouse_name`, `mobile`, `email`, `image_id`, `username`, `password`, `email_verified_at`, `province_id`, `city_id`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES +(2, 'سوگند', 'اصغری', '2150788772', 1, 0, NULL, '09032097811', 'sogandasgh@gmail.com', NULL, 'sogand1381', '$2y$12$.syqw5X5fA27RfoC0IwA5eyj4KH0YeDZ/ncuxl5DxdVg1RTbJemo.', NULL, NULL, NULL, 1, '2026-08-16 06:21:07', '2026-08-19 19:08:03', NULL), +(8, 'زهرا', 'علیپور', '2161632671', 1, 0, NULL, '09113241422', 'zahraalipoor@gmail.com', NULL, 'zahraalipoor', '$2y$12$JOlBcxkrNepe0bcX2vOgROt1wrwb9ZO.gkvEq.BfFp4AmRjxKuGDC', NULL, NULL, NULL, 2, '2026-08-18 08:40:28', '2026-08-18 08:40:28', NULL), +(10, 'رضا', 'رضایی', '2121385754', 0, 1, NULL, '09112237138', 'rezarezaei@gmail.com', 5, 'reza46', '$2y$12$4Oy4e9vULiUKyYEr2aCsB.WIHEy.bMZOft16hOzkNcsnLaOZSposi', NULL, '1', '3', 2, '2026-08-18 20:09:38', '2026-08-19 19:08:18', '2026-08-19 19:08:18'), +(11, 'ایمان', 'رضایی', '2151082229', 0, 0, NULL, '09051504470', 'imanrezaei@gmail.com', NULL, 'iman14', '$2y$12$Y7Z6MRu9J.rt2nMl5W.UOOGLM8rhkIAQ.KLTLeyAfninTCZo4iGAG', NULL, '10', '02', 2, '2026-08-18 21:53:10', '2026-08-18 21:53:10', NULL), +(13, 'سمیرا', 'ساداتی', '2161576259', 1, 2, NULL, '09120827742', 'samirasdnz@gmail.com', 22, 'samira10', '$2y$12$lJuccA5vRwRg/IZ8LDVBye7RHKuRmgbTOlxoET53Og7WbGGX2WqD2', NULL, '23', '09', 2, '2026-08-21 15:32:22', '2026-08-21 16:41:44', NULL), +(14, 'سونیا', 'اصغری', '2081573830', 1, 0, NULL, '09025347788', 'sonia@gmail.com', NULL, 'sonia91', '$2y$12$RfAayCyX/VE9tmMxdPSO1uOFsjh7UA7hpmzU4jYVtsFkN6fsblF.S', NULL, '06', '03', 2, '2026-08-22 05:08:29', '2026-08-22 05:08:29', NULL), +(15, 'ماهان', 'رضاییان', '7130011467', 0, 0, NULL, '09113241433', 'mahan@gmail.com', NULL, 'mahan405', '$2y$12$awmLhT8HsdDUTNgZn5VyzOMYs9cz7NUUnnVSakZmeBLJsGOkGA9JG', NULL, '23', '03', 2, '2026-08-22 06:42:33', '2026-08-22 08:27:23', '2026-08-22 08:27:23'), +(16, 'حاتمه', 'اندرزا', '2081391694', 1, 0, NULL, '09119533286', 'hatame@gmai.com', NULL, 'hatame91', '$2y$12$kTVb1xur4C0V2leQj//7cucMWHfCVnM2F7oDwbKgZeykq59FadDU.', NULL, '23', '14', 2, '2026-08-22 06:47:55', '2026-08-22 08:27:15', '2026-08-22 08:27:15'), +(18, 'بهار', 'رضایی', '2150620261', 1, 0, NULL, '09370032857', 'rezaeiibahar8080@gmail.com', 23, 'bahar80', '$2y$12$0VFQZCy13ARQaPMuESO/dunjeLGRwupMDjVfY4sYtO7TKMBSGCVt6', NULL, NULL, NULL, 2, '2026-08-22 07:27:23', '2026-08-22 07:58:38', NULL); + +-- +-- Constraints for dumped tables +-- + +-- +-- Constraints for table `airports` +-- +ALTER TABLE `airports` + ADD CONSTRAINT `airports_fk1` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + +-- +-- Constraints for table `bookings` +-- +ALTER TABLE `bookings` + ADD CONSTRAINT `bookings_fk1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + ADD CONSTRAINT `bookings_fk2` FOREIGN KEY (`flight_id`) REFERENCES `flights` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + ADD CONSTRAINT `bookings_fk3` FOREIGN KEY (`tour_date_id`) REFERENCES `tour_dates` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + +-- +-- Constraints for table `booking_passengers` +-- +ALTER TABLE `booking_passengers` + ADD CONSTRAINT `bookings_ passengers_fk1` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + +-- +-- Constraints for table `cities` +-- +ALTER TABLE `cities` + ADD CONSTRAINT `cities_fk1` FOREIGN KEY (`province_id`) REFERENCES `provinces` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + +-- +-- Constraints for table `comments` +-- +ALTER TABLE `comments` + ADD CONSTRAINT `comments.flight_fk1` FOREIGN KEY (`flight_id`) REFERENCES `flights` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + ADD CONSTRAINT `comments.tour_fk1` FOREIGN KEY (`tour_id`) REFERENCES `tours` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + ADD CONSTRAINT `comments_user_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + +-- +-- Constraints for table `favorites` +-- +ALTER TABLE `favorites` + ADD CONSTRAINT `favorites_fligh_fk` FOREIGN KEY (`flight_id`) REFERENCES `flights` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + ADD CONSTRAINT `favorites_tour_fk` FOREIGN KEY (`tour_id`) REFERENCES `tours` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + ADD CONSTRAINT `favorites_user_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + +-- +-- Constraints for table `flights` +-- +ALTER TABLE `flights` + ADD CONSTRAINT `flights_fk1` FOREIGN KEY (`airline_id`) REFERENCES `airlines` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + ADD CONSTRAINT `flights_fk2` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + ADD CONSTRAINT `flights_fk3` FOREIGN KEY (`arrival_aiport_id`) REFERENCES `airports` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + ADD CONSTRAINT `flights_fk4` FOREIGN KEY (`departure_airport_id`) REFERENCES `airports` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + +-- +-- Constraints for table `tours` +-- +ALTER TABLE `tours` + ADD CONSTRAINT `tours_fk1` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + +-- +-- Constraints for table `tour_dates` +-- +ALTER TABLE `tour_dates` + ADD CONSTRAINT `tours_dates_fk1` FOREIGN KEY (`tour_id`) REFERENCES `tours` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + +-- +-- Constraints for table `users` +-- +ALTER TABLE `users` + ADD CONSTRAINT `user_img_fk` FOREIGN KEY (`image_id`) REFERENCES `files` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;