Files
sogandAsghary.Project09/database/backup/airline_agency (4).sql
T
2026-08-22 16:05:25 -07:00

685 lines
51 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 22, 2026 at 09:38 PM
-- Server version: 8.0.31
-- PHP Version: 8.0.26
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,
`log_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`subject_id` bigint UNSIGNED NOT NULL,
`causer_id` bigint UNSIGNED DEFAULT NULL,
`event` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`changes` json DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `activity_logs`
--
INSERT INTO `activity_logs` (`id`, `log_name`, `subject_id`, `causer_id`, `event`, `changes`, `created_at`) VALUES
(1, 'tours', 1, 1, 'updated', '{\"after\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"status\": 0, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"capacity\": null, \"airline_id\": null, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"flight_type\": null, \"departure_time\": \"2026-08-22T06:28:00.000000Z\", \"arrival_airport_id\": null, \"departure_airport_id\": null}, \"before\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"status\": 0, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"capacity\": null, \"airline_id\": null, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"flight_type\": null, \"departure_time\": \"2026-08-22T06:28:00.000000Z\", \"arrival_airport_id\": null, \"departure_airport_id\": null}}', '2026-08-21 07:33:18'),
(2, 'flights', 2, 1, 'updated', '{\"after\": {\"price\": 34000000, \"title\": \"تبریز به مشهد\", \"status\": 0, \"summary\": \"سیبلاتنمکنتالبیس\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"گکمنوتئالذبیقیفابغتعغهخمذلربیبیفاعئدذر\", \"flight_type\": 0, \"departure_time\": \"2026-08-31T22:07:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}, \"before\": {\"price\": 34000000, \"title\": \"تبریز به مشهد\", \"status\": 0, \"summary\": \"سیبلاتنمکنتالبیس\", \"capacity\": 18, \"airline_id\": 1, \"description\": \"گکمنوتئالذبیقیفابغتعغهخمذلربیبیفاعئدذر\", \"flight_type\": 0, \"departure_time\": \"2026-08-31T22:07:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}}', '2026-08-21 07:45:52'),
(3, 'flights', 2, 1, 'updated', '{\"after\": {\"price\": 34000000, \"title\": \"تبریز\", \"status\": 0, \"summary\": \"سیبلاتنمکنتالبیس\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"گکمنوتئالذبیقیفابغتعغهخمذلربیبیفاعئدذر\", \"flight_type\": 0, \"departure_time\": \"2026-08-31T22:07:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}, \"before\": {\"price\": 34000000, \"title\": \"تبریز به مشهد\", \"status\": 0, \"summary\": \"سیبلاتنمکنتالبیس\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"گکمنوتئالذبیقیفابغتعغهخمذلربیبیفاعئدذر\", \"flight_type\": 0, \"departure_time\": \"2026-08-31T22:07:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}}', '2026-08-21 07:48:01'),
(4, 'flights', 5, 1, 'created', '[]', '2026-08-21 08:16:17'),
(5, 'flights', 5, 1, 'deleted', '[]', '2026-08-21 08:17:19'),
(6, 'flights', 4, 1, 'updated', '{\"after\": {\"price\": 12900000, \"title\": \"پروازززز\", \"status\": 1, \"summary\": \"منوتئداذلربزیطس\", \"capacity\": 5, \"airline_id\": 1, \"description\": \"هخمهنتلطسذرناتئدلذرزتداذلرز\", \"flight_type\": 1, \"departure_time\": \"2026-09-01T09:45:00.000000Z\", \"arrival_airport_id\": 18, \"departure_airport_id\": 23}, \"before\": {\"price\": 12900000, \"title\": \"پروازززز\", \"status\": 0, \"summary\": \"منوتئداذلربزیطس\", \"capacity\": 5, \"airline_id\": 1, \"description\": \"هخمهنتلطسذرناتئدلذرزتداذلرز\", \"flight_type\": 1, \"departure_time\": \"2026-09-01T09:45:00.000000Z\", \"arrival_airport_id\": 18, \"departure_airport_id\": 23}}', '2026-08-22 17:07:41'),
(7, 'flights', 4, 1, 'updated', '{\"after\": {\"price\": 12900000, \"title\": \"پروازززز\", \"status\": 0, \"summary\": \"منوتئداذلربزیطس\", \"capacity\": 5, \"airline_id\": 1, \"description\": \"هخمهنتلطسذرناتئدلذرزتداذلرز\", \"flight_type\": 2, \"return_time\": \"2026-09-06T06:30:00.000000Z\", \"departure_time\": \"2026-09-01T20:15:00.000000Z\", \"arrival_airport_id\": 18, \"departure_airport_id\": 23}, \"before\": {\"price\": 12900000, \"title\": \"پروازززز\", \"status\": 1, \"summary\": \"منوتئداذلربزیطس\", \"capacity\": 5, \"airline_id\": 1, \"description\": \"هخمهنتلطسذرناتئدلذرزتداذلرز\", \"flight_type\": 1, \"return_time\": null, \"departure_time\": \"2026-09-01T20:15:00.000000Z\", \"arrival_airport_id\": 18, \"departure_airport_id\": 23}}', '2026-08-22 16:09:00'),
(8, 'flights', 4, 1, 'updated', '{\"after\": {\"price\": 12900000, \"title\": \"پروازززز\", \"status\": 1, \"summary\": \"منوتئداذلربزیطس\", \"capacity\": 5, \"airline_id\": 1, \"description\": \"هخمهنتلطسذرناتئدلذرزتداذلرز\", \"flight_type\": 2, \"return_time\": \"2026-09-06T06:30:00.000000Z\", \"departure_time\": \"2026-09-01T20:15:00.000000Z\", \"arrival_airport_id\": 18, \"departure_airport_id\": 23}, \"before\": {\"price\": 12900000, \"title\": \"پروازززز\", \"status\": 0, \"summary\": \"منوتئداذلربزیطس\", \"capacity\": 5, \"airline_id\": 1, \"description\": \"هخمهنتلطسذرناتئدلذرزتداذلرز\", \"flight_type\": 2, \"return_time\": \"2026-09-06T06:30:00.000000Z\", \"departure_time\": \"2026-09-01T20:15:00.000000Z\", \"arrival_airport_id\": 18, \"departure_airport_id\": 23}}', '2026-08-22 16:09:10'),
(9, 'flights', 4, 1, 'updated', '{\"after\": {\"price\": 12900000, \"title\": \"تهران → اهواز\", \"status\": 1, \"summary\": \"پرواز رفت و برگشت تهران به اهواز\", \"capacity\": 5, \"airline_id\": 1, \"description\": \"پرواز مستقیم با خدمات کامل، مناسب سفرهای تفریحی و کاری.\", \"flight_type\": 2, \"return_time\": \"2026-09-06T06:30:00.000000Z\", \"departure_time\": \"2026-09-01T20:15:00.000000Z\", \"arrival_airport_id\": 18, \"departure_airport_id\": 23}, \"before\": {\"price\": 12900000, \"title\": \"پروازززز\", \"status\": 1, \"summary\": \"منوتئداذلربزیطس\", \"capacity\": 5, \"airline_id\": 1, \"description\": \"هخمهنتلطسذرناتئدلذرزتداذلرز\", \"flight_type\": 2, \"return_time\": \"2026-09-06T06:30:00.000000Z\", \"departure_time\": \"2026-09-01T20:15:00.000000Z\", \"arrival_airport_id\": 18, \"departure_airport_id\": 23}}', '2026-08-22 18:29:22'),
(10, 'flights', 2, 1, 'updated', '{\"after\": {\"price\": 34000000, \"title\": \"تبریز\", \"status\": 0, \"summary\": \"پرواز رفت از تبریز به به مشهد\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"پرواز مستقیم به مشهد با ایرلاین ایرانپیما\", \"flight_type\": 0, \"return_time\": null, \"departure_time\": \"2026-09-01T08:37:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}, \"before\": {\"price\": 34000000, \"title\": \"تبریز\", \"status\": 0, \"summary\": \"سیبلاتنمکنتالبیس\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"گکمنوتئالذبیقیفابغتعغهخمذلربیبیفاعئدذر\", \"flight_type\": 0, \"return_time\": null, \"departure_time\": \"2026-09-01T08:37:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}}', '2026-08-22 18:30:44'),
(11, 'flights', 2, 1, 'updated', '{\"after\": {\"price\": 34000000, \"title\": \"تبریز\", \"status\": 1, \"summary\": \"پرواز رفت از تبریز به به مشهد\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"پرواز مستقیم به مشهد با ایرلاین ایرانپیما\", \"flight_type\": 0, \"return_time\": null, \"departure_time\": \"2026-09-01T08:37:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}, \"before\": {\"price\": 34000000, \"title\": \"تبریز\", \"status\": 0, \"summary\": \"پرواز رفت از تبریز به به مشهد\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"پرواز مستقیم به مشهد با ایرلاین ایرانپیما\", \"flight_type\": 0, \"return_time\": null, \"departure_time\": \"2026-09-01T08:37:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}}', '2026-08-22 18:31:09'),
(12, 'flights', 6, 1, 'created', '[]', '2026-08-22 18:35:41'),
(13, 'tours', 4, 1, 'updated', '{\"after\": {\"price\": 123456, \"title\": \"تور پاریس ۶ روزه\", \"origin\": \"تهران\", \"status\": 1, \"file_id\": 28, \"summary\": \"خدمات: پرواز + هتل + ترانسفر\", \"duration\": 6, \"description\": \"برج ایفل، موزه لوور، خیابان شانزلیزه و رود سن\", \"destination\": \"پاریس، فرانسه\", \"departure_time\": \"2026-10-07T16:30:00.000000Z\"}, \"before\": {\"price\": 123456, \"title\": \"j,v\", \"origin\": \"تهران\", \"status\": 1, \"file_id\": 17, \"summary\": \"asdfghjkl\", \"duration\": 9, \"description\": \"sdfghjkl\", \"destination\": \"کیش\", \"departure_time\": \"2026-08-22T17:18:00.000000Z\"}}', '2026-08-22 18:39:33'),
(14, 'tours', 1, 1, 'updated', '{\"after\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"origin\": \"تهران\", \"status\": 0, \"file_id\": 29, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"duration\": 5, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"destination\": \"استانبول\", \"departure_time\": \"2026-08-22T16:58:00.000000Z\"}, \"before\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"origin\": \"تهران\", \"status\": 0, \"file_id\": 8, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"duration\": 9, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"destination\": \"استانبول\", \"departure_time\": \"2026-08-22T16:58:00.000000Z\"}}', '2026-08-22 18:40:25'),
(15, 'tours', 1, 1, 'updated', '{\"after\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"origin\": \"تهران\", \"status\": 0, \"file_id\": 29, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"duration\": 5, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"destination\": \"استانبول\", \"departure_time\": \"2026-08-22T16:58:00.000000Z\"}, \"before\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"origin\": \"تهران\", \"status\": 0, \"file_id\": 29, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"duration\": 5, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"destination\": \"استانبول\", \"departure_time\": \"2026-08-22T16:58:00.000000Z\"}}', '2026-08-22 18:41:25'),
(16, 'tours', 1, 1, 'updated', '{\"after\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"origin\": \"تهران\", \"status\": 0, \"file_id\": 29, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"duration\": 5, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"destination\": \"استانبول\", \"departure_time\": \"2026-08-22T16:58:00.000000Z\"}, \"before\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"origin\": \"تهران\", \"status\": 0, \"file_id\": 29, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"duration\": 5, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"destination\": \"استانبول\", \"departure_time\": \"2026-08-22T16:58:00.000000Z\"}}', '2026-08-22 18:41:26'),
(17, 'tours', 1, 1, 'updated', '{\"after\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"origin\": \"تهران\", \"status\": 1, \"file_id\": 29, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"duration\": 5, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"destination\": \"استانبول\", \"departure_time\": \"2026-08-22T16:58:00.000000Z\"}, \"before\": {\"price\": 3400000, \"title\": \"تور استانبول ویژه تابستان\", \"origin\": \"تهران\", \"status\": 0, \"file_id\": 29, \"summary\": \"سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره\", \"duration\": 5, \"description\": \"تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری\", \"destination\": \"استانبول\", \"departure_time\": \"2026-08-22T16:58:00.000000Z\"}}', '2026-08-22 18:41:45'),
(18, 'tours', 5, 1, 'created', '[]', '2026-08-22 18:44:56'),
(19, 'flights', 2, 1, 'updated', '{\"after\": {\"price\": 33400, \"title\": \"تبریز\", \"status\": 0, \"summary\": \"پرواز رفت از تبریز به به مشهد\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"پرواز مستقیم به مشهد با ایرلاین ایرانپیما\", \"flight_type\": 0, \"return_time\": null, \"departure_time\": \"2026-09-01T08:37:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}, \"before\": {\"price\": 34000000, \"title\": \"تبریز\", \"status\": 1, \"summary\": \"پرواز رفت از تبریز به به مشهد\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"پرواز مستقیم به مشهد با ایرلاین ایرانپیما\", \"flight_type\": 0, \"return_time\": null, \"departure_time\": \"2026-09-01T08:37:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}}', '2026-08-22 20:28:43'),
(20, 'tours', 4, 1, 'updated', '{\"after\": {\"price\": 12345600, \"title\": \"تور پاریس ۶ روزه\", \"origin\": \"تهران\", \"status\": 0, \"file_id\": 28, \"summary\": \"خدمات: پرواز + هتل + ترانسفر\", \"duration\": 6, \"description\": \"برج ایفل، موزه لوور، خیابان شانزلیزه و رود سن\", \"destination\": \"پاریس، فرانسه\", \"departure_time\": \"2026-10-07T16:30:00.000000Z\"}, \"before\": {\"price\": 123456, \"title\": \"تور پاریس ۶ روزه\", \"origin\": \"تهران\", \"status\": 1, \"file_id\": 28, \"summary\": \"خدمات: پرواز + هتل + ترانسفر\", \"duration\": 6, \"description\": \"برج ایفل، موزه لوور، خیابان شانزلیزه و رود سن\", \"destination\": \"پاریس، فرانسه\", \"departure_time\": \"2026-10-07T16:30:00.000000Z\"}}', '2026-08-22 20:31:24'),
(21, 'flights', 2, 1, 'updated', '{\"after\": {\"price\": 33400, \"title\": \"تبریز\", \"status\": 1, \"summary\": \"پرواز رفت از تبریز به به مشهد\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"پرواز مستقیم به مشهد با ایرلاین ایرانپیما\", \"flight_type\": 0, \"return_time\": null, \"departure_time\": \"2026-09-01T08:37:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}, \"before\": {\"price\": 33400, \"title\": \"تبریز\", \"status\": 0, \"summary\": \"پرواز رفت از تبریز به به مشهد\", \"capacity\": 25, \"airline_id\": 1, \"description\": \"پرواز مستقیم به مشهد با ایرلاین ایرانپیما\", \"flight_type\": 0, \"return_time\": null, \"departure_time\": \"2026-09-01T08:37:00.000000Z\", \"arrival_airport_id\": 22, \"departure_airport_id\": 21}}', '2026-08-22 20:33:17'),
(22, 'tours', 4, 1, 'updated', '{\"after\": {\"price\": 12345600, \"title\": \"تور پاریس ۶ روزه\", \"origin\": \"تهران\", \"status\": 1, \"file_id\": 28, \"summary\": \"خدمات: پرواز + هتل + ترانسفر\", \"duration\": 6, \"description\": \"برج ایفل، موزه لوور، خیابان شانزلیزه و رود سن\", \"destination\": \"پاریس، فرانسه\", \"departure_time\": \"2026-10-07T16:30:00.000000Z\"}, \"before\": {\"price\": 12345600, \"title\": \"تور پاریس ۶ روزه\", \"origin\": \"تهران\", \"status\": 0, \"file_id\": 28, \"summary\": \"خدمات: پرواز + هتل + ترانسفر\", \"duration\": 6, \"description\": \"برج ایفل، موزه لوور، خیابان شانزلیزه و رود سن\", \"destination\": \"پاریس، فرانسه\", \"departure_time\": \"2026-10-07T16:30:00.000000Z\"}}', '2026-08-22 20:33:30');
-- --------------------------------------------------------
--
-- Table structure for table `admins`
--
DROP TABLE IF EXISTS `admins`;
CREATE TABLE IF NOT EXISTS `admins` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`first_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`last_name` varchar(62) COLLATE utf8mb4_unicode_ci NOT NULL,
`username` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
`last_login_at` timestamp NULL DEFAULT NULL,
`status` tinyint UNSIGNED NOT NULL COMMENT '0:disable | 1:enable',
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `admins`
--
INSERT INTO `admins` (`id`, `first_name`, `last_name`, `username`, `email`, `password`, `last_login_at`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admini', 'admin', 'email@gmail.com', '$2y$12$86axCeLw15vxaxN27sJW7.EJ5p663aHKl6/B3HZkLNBCRhE5Nxcxy', '2026-08-23 01:31:19', 1, '2026-08-01 10:10:31', '2026-08-23 01:31:19'),
(4, 'سوگند', 'اصغری', 'sahy', 'sogandasghary@gmail.com', '$2y$12$pDS56N07IfrPlW8VyYA30uksELqxB/zSPo.CAQYbFlViXWXX3MK/u', '2026-08-22 17:11:21', 1, '2026-08-19 13:01:48', '2026-08-22 17:11:21');
-- --------------------------------------------------------
--
-- Table structure for table `admin_permissions`
--
DROP TABLE IF EXISTS `admin_permissions`;
CREATE TABLE IF NOT EXISTS `admin_permissions` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`admin_id` bigint UNSIGNED NOT NULL,
`flight_create` tinyint(1) NOT NULL DEFAULT '0',
`flight_edit` tinyint(1) NOT NULL DEFAULT '0',
`flight_delete` 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',
`booking_view` tinyint(1) NOT NULL DEFAULT '0',
`booking_edit` tinyint(1) NOT NULL DEFAULT '0',
`booking_delete` tinyint(1) NOT NULL DEFAULT '0',
`user_view` tinyint(1) NOT NULL DEFAULT '0',
`user_edit` tinyint(1) NOT NULL DEFAULT '0',
`user_delete` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT 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',
PRIMARY KEY (`id`),
UNIQUE KEY `admin_permissions_admin_id_unique` (`admin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `admin_permissions`
--
INSERT INTO `admin_permissions` (`id`, `admin_id`, `flight_create`, `flight_edit`, `flight_delete`, `tour_create`, `tour_edit`, `tour_delete`, `booking_view`, `booking_edit`, `booking_delete`, `user_view`, `user_edit`, `user_delete`, `created_at`, `updated_at`, `admin_view`, `admin_create`, `admin_edit`, `admin_delete`) VALUES
(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, '2026-08-19 16:28:45', '2026-08-19 16:28:45', 1, 1, 1, 1),
(2, 4, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, '2026-08-20 03:02:19', '2026-08-22 21:22:08', 1, 0, 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(256) 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=2 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, 'ایرانپیما', '10', 1, 1, '2026-08-16 23:08:18');
-- --------------------------------------------------------
--
-- 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(200) COLLATE utf32_persian_ci NOT NULL,
`city_id` bigint UNSIGNED NOT NULL,
`country` varchar(255) COLLATE utf32_persian_ci NOT NULL,
`code` varchar(10) COLLATE utf32_persian_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `airports_fk1` (`city_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci;
--
-- Dumping data for table `airports`
--
INSERT INTO `airports` (`id`, `name`, `city_id`, `country`, `code`) VALUES
(1, 'مهرآباد', 1, 'ایران', '12'),
(2, 'فرودگاه اصفهان', 2, 'ایران', '34'),
(17, 'فرودگاه بین‌المللی مهرآباد', 1, 'ایران', 'THR'),
(18, 'فرودگاه بین‌المللی امام خمینی', 1, 'ایران', 'IKA'),
(19, 'فرودگاه بین‌المللی شهید بهشتی اصفهان', 2, 'ایران', 'IFN'),
(20, 'فرودگاه بین‌المللی شهید دستغیب شیراز', 19, 'ایران', 'SYZ'),
(21, 'فرودگاه بین‌المللی شهید هاشمی‌نژاد مشهد', 20, 'ایران', 'MHD'),
(22, 'فرودگاه بین‌المللی شهید مدنی تبریز', 21, 'ایران', 'TBZ'),
(23, 'فرودگاه بین‌المللی شهید قاسم سلیمانی اهواز', 22, 'ایران', 'AWZ');
-- --------------------------------------------------------
--
-- 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 DEFAULT NULL,
`flight_id` bigint UNSIGNED DEFAULT NULL,
`tour_id` bigint UNSIGNED DEFAULT NULL,
`adult_count` int UNSIGNED DEFAULT NULL,
`child_count` int UNSIGNED DEFAULT NULL,
`total_price` int UNSIGNED DEFAULT NULL,
`tracking_code` varchar(50) COLLATE utf32_persian_ci NOT NULL,
`status` tinyint NOT NULL COMMENT '0: pending | 1: confirmed | 2: cancelled',
`created_at` timestamp NOT NULL,
PRIMARY KEY (`id`),
KEY `bookings_fk1` (`flight_id`),
KEY `bookings_fk3` (`user_id`),
KEY `bookings_fk2` (`tour_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_id`, `adult_count`, `child_count`, `total_price`, `tracking_code`, `status`, `created_at`) VALUES
(4, 6, 1, NULL, NULL, NULL, NULL, '5LITGW1JKN', 0, '2026-08-19 08:30:09'),
(5, 6, NULL, 2, NULL, NULL, NULL, 'HM4DK1AULW', 0, '2026-08-19 08:32:21'),
(6, 6, NULL, 2, NULL, NULL, NULL, 'ZVCXRIDHTC', 0, '2026-08-19 08:36:44'),
(7, 6, 4, NULL, NULL, NULL, NULL, 'WGNMKC67W6', 0, '2026-08-22 18:47:50');
-- --------------------------------------------------------
--
-- 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(150) COLLATE utf32_persian_ci NOT NULL,
`last_name` varchar(150) COLLATE utf32_persian_ci NOT NULL,
`national_code` varchar(20) COLLATE utf32_persian_ci NOT NULL,
`birth_date` date NOT NULL,
`passenger_type` tinyint UNSIGNED NOT NULL COMMENT '0: adult | 1: child ',
`created_ar` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`),
KEY `booking_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(255) COLLATE utf32_persian_ci NOT NULL,
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`),
KEY `cities_fk1` (`province_id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci;
--
-- Dumping data for table `cities`
--
INSERT INTO `cities` (`id`, `province_id`, `name`, `created_at`, `updated_at`) VALUES
(1, 1, 'تهران', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(2, 2, 'اصفهان', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(15, 1, 'تهران', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(16, 4, 'تهران', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(17, 2, 'اصفهان', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(18, 5, 'اصفهان', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(19, 6, 'شیراز', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(20, 7, 'مشهد', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(21, 8, 'تبریز', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(22, 9, 'اهواز', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(30, 10, 'قائمشهر', '2026-08-22 15:42:35', '2026-08-22 15:42:35'),
(31, 10, 'ساری', '2026-08-22 18:47:29', '2026-08-22 18:47:29'),
(32, 10, 'بابل', '2026-08-22 18:47:43', '2026-08-22 18:47:43');
-- --------------------------------------------------------
--
-- 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,
`guest_name` varchar(255) CHARACTER SET utf32 COLLATE utf32_persian_ci DEFAULT NULL,
`guest_email` varchar(255) CHARACTER SET utf32 COLLATE utf32_persian_ci DEFAULT NULL,
`status` tinyint UNSIGNED NOT NULL COMMENT '0: pending | 1: approved | 2: rejected',
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`),
KEY `comments_fk1` (`user_id`),
KEY `comments_fk2` (`flight_id`),
KEY `comments_fk3` (`tour_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`id`, `user_id`, `flight_id`, `tour_id`, `comment`, `guest_name`, `guest_email`, `status`, `created_at`, `updated_at`) VALUES
(1, NULL, 1, NULL, 'پچجحخهعغفقثصضشسیبلاتنمکگ/.وئدذرزط', 'sogand', 'sogandasghary@gmail.com', 1, '2026-08-17 20:59:51', '2026-08-17 20:59:51'),
(2, NULL, 1, NULL, ';lkjk,hjmgnhfbgdvfcds', 'sogand', 'sogandasghary@gmail.com', 1, '2026-08-17 20:59:51', '2026-08-17 20:59:51'),
(3, NULL, NULL, NULL, 'عالی', 'sogand', 'sogandasghary@gmail.com', 1, '2026-08-18 11:20:53', '2026-08-18 11:20:53'),
(4, NULL, NULL, 1, 'perfect', 'sogand', 'sogandasghary@gmail.com', 1, '2026-08-18 11:30:43', '2026-08-18 11:30:43'),
(5, 6, 1, NULL, 'عالی بود خیلی ممنون', NULL, NULL, 1, '2026-08-19 05:22:09', '2026-08-19 05:22:09'),
(6, 6, 4, NULL, 'عالی', NULL, NULL, 1, '2026-08-22 18:48:24', '2026-08-22 18:48:24');
-- --------------------------------------------------------
--
-- 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,
`original_name` varchar(500) COLLATE utf32_persian_ci NOT NULL,
`path` varchar(300) COLLATE utf32_persian_ci NOT NULL,
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 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
(1, '6_69034_1786901444.jpg', 'jpg', 19910, 'images (2).jpg', 'user_profile/6_69034_1786901444.jpg', '2026-08-17 04:00:44', '2026-08-17 04:00:44'),
(2, '7_33478_1787176371.jpg', 'jpg', 52329, 'images (5).jpg', 'user_profile/7_33478_1787176371.jpg', '2026-08-20 08:22:51', '2026-08-20 08:22:51'),
(3, '8_17428_1787176523.jpg', 'jpg', 17703, 'images (4).jpg', 'user_profile/8_17428_1787176523.jpg', '2026-08-20 08:25:23', '2026-08-20 08:25:23'),
(4, '9_89003_1787177176.jpg', 'jpg', 17703, 'images (4).jpg', 'user_profile/9_89003_1787177176.jpg', '2026-08-20 08:36:16', '2026-08-20 08:36:16'),
(5, 'd503xcpGVr0dtl2sGD9z2YYnurcg34Wvf0PBrhgA', 'jpg', 19910, 'images (2).jpg', 'flights/d503xcpGVr0dtl2sGD9z2YYnurcg34Wvf0PBrhgA.jpg', '2026-08-20 12:27:17', '2026-08-20 12:27:17'),
(6, 'CH14OFRCkwYeNDm6aPXfjut4XrmvhKL90xfkFYKf', 'jpg', 7485, 'images (3).jpg', 'flights/CH14OFRCkwYeNDm6aPXfjut4XrmvhKL90xfkFYKf.jpg', '2026-08-20 12:33:45', '2026-08-20 12:33:45'),
(7, '2HLZSaFrD83FFtyzPJCat2Ig3qVS8foS0P2VQmrY', 'jpg', 11866, 'images (6).jpg', 'flights/2HLZSaFrD83FFtyzPJCat2Ig3qVS8foS0P2VQmrY.jpg', '2026-08-20 13:21:48', '2026-08-20 13:21:48'),
(8, 'OVrbwQ9F6K4e3aK5hIWDruyBSBLsWDC63JzbcSNq', 'jpg', 52329, 'images (5).jpg', 'tours/OVrbwQ9F6K4e3aK5hIWDruyBSBLsWDC63JzbcSNq.jpg', '2026-08-21 03:06:00', '2026-08-21 03:06:00'),
(9, 'DdjtdMsjarQQgZjBGOeWIRwkyTROvEWidsg7x4zc', 'jpg', 52329, 'images (5).jpg', 'flights/DdjtdMsjarQQgZjBGOeWIRwkyTROvEWidsg7x4zc.jpg', '2026-08-21 03:07:53', '2026-08-21 03:07:53'),
(10, 'joMv1O7sqAdprI1tlyz9facCcsJOtANZXDLrDzqj', 'jpg', 9446, 'images.jpg', 'tours/joMv1O7sqAdprI1tlyz9facCcsJOtANZXDLrDzqj.jpg', '2026-08-21 03:10:52', '2026-08-21 03:10:52'),
(17, '2R5veCAO6SSPMwFnzoe6RyEotorjRBerWSOVsyqW', 'jpg', 11866, 'images (6).jpg', 'tours/2R5veCAO6SSPMwFnzoe6RyEotorjRBerWSOVsyqW.jpg', '2026-08-21 03:48:33', '2026-08-21 03:48:33'),
(18, 'vm3tStDcMfvp67WghfrhaR4516Z7GcBx0MWfO3Nw', 'jpg', 17703, 'images (4).jpg', 'flights/vm3tStDcMfvp67WghfrhaR4516Z7GcBx0MWfO3Nw.jpg', '2026-08-21 05:18:00', '2026-08-21 05:18:00'),
(19, 'SZm3IJtrvVSWkGJZJ41CeDai6CbuF6Wur21VjJ53', 'jpg', 11866, 'images (6).jpg', 'flights/SZm3IJtrvVSWkGJZJ41CeDai6CbuF6Wur21VjJ53.jpg', '2026-08-21 08:16:17', '2026-08-21 08:16:17'),
(20, '6_80797_1787266425.jpg', 'jpg', 17703, 'images (4).jpg', 'user_profile/6_80797_1787266425.jpg', '2026-08-21 09:23:45', '2026-08-21 09:23:45'),
(21, '6_71542_1787266435.jpg', 'jpg', 52329, 'images (5).jpg', 'user_profile/6_71542_1787266435.jpg', '2026-08-21 09:23:55', '2026-08-21 09:23:55'),
(22, '6_14361_1787424630.jpg', 'jpg', 13116, 'ldC1YIDUxX3mJwfevmIv9srFkn5jdZHE4lqGXGFL4zX66U3yz6fRPf53DYuFkBGtxMFCtzEw8e_P2ZpZ9AKFZx48td2aZqJ-fxvqE7qcAf3-b0N6WvbnLNtrEm1MvL4YEIGNuag5nHn-w7gvL7UiUZlJ8k4pfV_-CFucPk9lp6jtuPPfYfXxku7eLa4DxuRZ.jpg', 'user_profile/6_14361_1787424630.jpg', '2026-08-21 09:24:05', '2026-08-22 18:50:30'),
(23, '10_82001_1787416222.jpg', 'jpg', 9446, 'images.jpg', 'user_profile/10_82001_1787416222.jpg', '2026-08-22 16:30:22', '2026-08-22 16:30:22'),
(24, '11_40744_1787418139.jpg', 'jpg', 9446, 'images.jpg', 'user_profile/11_40744_1787418139.jpg', '2026-08-22 17:02:19', '2026-08-22 17:02:19'),
(25, 'mrUJjYbPTZUnaAq2SA9ZFj1Pt64IXWZF5nBJzPpQ', 'jpg', 109492, '75HUDvAeG9GVDasZfp3S_z2yvvb0iCRzs4VoF-7ajB-Ai_MA3muWlhVL0dF0dOr__pziPKoMtF6-Qj7Njr-P96hDm6gKuQTJWnAM0Y-XI2OSkpQYq0fM_Mm-rQYR40xlHIaGH6brXfEhAclIi_8IZ5K-vd0QDLUMQtgZM53upKNv1N3r2ZLjulwKe7rXgT_X.jpg', 'flights/mrUJjYbPTZUnaAq2SA9ZFj1Pt64IXWZF5nBJzPpQ.jpg', '2026-08-22 18:29:22', '2026-08-22 18:29:22'),
(26, '2mK1lR7fD4HSfvtFnzN5peLulnmmhHcKUGKJmeZW', 'jpg', 137367, 'd_-pjFkM29z0e1DvxGntBKngb1azJtGIJdjaqK-3dSkvYbCdpD56eFdExu_D6So8O-ddbh_BwRzsWqDPP2ILNoaRJeKUiY49M1FlYyoo9m9VL4kOSuUgr_rNod_Y0VapIFZn0lxq45shvTDU_shNMdhQA4DjngXXsP3D4IfZzYb_J5WExsvElo49tWTpIiNe.jpg', 'flights/2mK1lR7fD4HSfvtFnzN5peLulnmmhHcKUGKJmeZW.jpg', '2026-08-22 18:30:44', '2026-08-22 18:30:44'),
(27, 'y3DmURzGdQSR4UOZLKVd57HqbcEZYhVTCyO7FQFU', 'jpg', 36781, 'RpAV7UCl1V5lNrFPMLfHsawKbpYivlBgiNZMEdhqOL4cLGuW1DpixaCjtsrL6x9D0OtsrujKMV55AizDKuu6KRWV5H0btA6yi21GebdSMzwu_Welp1TYd1hFRCaTxwQaGl3v0yzHPrfio0C9R4ueDUQaEnNGOyGGE75NIDFbNDFFI_sTVqsJnegUTd1wjYzd.jpg', 'flights/y3DmURzGdQSR4UOZLKVd57HqbcEZYhVTCyO7FQFU.jpg', '2026-08-22 18:35:41', '2026-08-22 18:35:41'),
(28, 'mlJzGwpKUMmsz6S2XXlAU3BejpHpregfM4J7UBay', 'jpg', 50807, '-hSYM22TIDTqy2x79O151yk4T8K08gPEIvCcs1bbxIulqBtOdEmHfclH__C--hzTo18M0BRDsmCI1h8wLDppu5X6GQn-t3NChzVZOjTD6smfmuUh3QvytimkdAXlBfFH58bxucUWEv12lSSDT2IdmEJ15Vy6AvZ-D7W50lUwnict2RopKW4zs9-9r4xm9IO9.jpg', 'tours/mlJzGwpKUMmsz6S2XXlAU3BejpHpregfM4J7UBay.jpg', '2026-08-22 18:39:33', '2026-08-22 18:39:33'),
(29, 'LV6x0kQ1PxTG4vQs6dhyM1uCDpdmDurXnxCIuehg', 'jpg', 165068, 'istanbul-tour.jpg', 'tours/LV6x0kQ1PxTG4vQs6dhyM1uCDpdmDurXnxCIuehg.jpg', '2026-08-22 18:40:25', '2026-08-22 18:40:25'),
(30, 'vXmzVNOa3eKFbYeKjQDNIB21zjTTu0mClhZvonRt', 'jpg', 204690, 'hevWaV2mJnh7U4S3VQOuQ3GfeAgQl8xwmda19vMQf5l-61As1uzRHIu2aW7lLXg9OrQXBmKAZ9L_BSUyx1EFf93dIVmB9ef6lpKgXqhEqJqP8rOJnpiALC87bSfikpLBF86weFQHAx8wS9Org_r-Etx9CyIyN408Oq54CjAiw3Y.jpg', 'tours/vXmzVNOa3eKFbYeKjQDNIB21zjTTu0mClhZvonRt.jpg', '2026-08-22 18:44:56', '2026-08-22 18:44:56');
-- --------------------------------------------------------
--
-- Table structure for table `flights`
--
DROP TABLE IF EXISTS `flights`;
CREATE TABLE IF NOT EXISTS `flights` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`title` varchar(256) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL,
`file_id` bigint UNSIGNED DEFAULT NULL,
`airline_id` bigint UNSIGNED NOT NULL,
`flight_type` tinyint UNSIGNED NOT NULL COMMENT '0: departure | 1: return | 2: roundtrip',
`departure_time` timestamp NOT NULL,
`return_time` timestamp NULL DEFAULT NULL,
`departure_airport_id` bigint UNSIGNED NOT NULL,
`arrival_airport_id` bigint UNSIGNED NOT NULL,
`price` decimal(10,0) NOT NULL,
`summary` varchar(512) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL,
`capacity` int NOT NULL,
`views` int UNSIGNED NOT NULL,
`description` varchar(512) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL,
`status` tinyint NOT NULL COMMENT '0: disable | 1: enable',
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
`created_by` bigint UNSIGNED DEFAULT NULL,
`updated_by` bigint UNSIGNED DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `flights_fk1` (`airline_id`),
KEY `flights_fk2` (`file_id`),
KEY `flights_fk3` (`arrival_airport_id`),
KEY `flights_fk4` (`departure_airport_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci;
--
-- Dumping data for table `flights`
--
INSERT INTO `flights` (`id`, `title`, `file_id`, `airline_id`, `flight_type`, `departure_time`, `return_time`, `departure_airport_id`, `arrival_airport_id`, `price`, `summary`, `capacity`, `views`, `description`, `status`, `created_at`, `updated_at`, `created_by`, `updated_by`) VALUES
(1, 'تهران به اصفهان', NULL, 1, 0, '2026-08-17 08:37:41', NULL, 1, 2, '200000000', 'منتالفبقیثسصثقفغعهخحخهعغفقثص', 22, 78, 'کمنتالفقثصثقفغعهنمنتالقی', 1, '2026-08-17 08:37:41', '2026-08-22 18:46:38', NULL, NULL),
(2, 'تبریز', 26, 1, 0, '2026-09-01 08:37:00', NULL, 21, 22, '33400', 'پرواز رفت از تبریز به به مشهد', 25, 3, 'پرواز مستقیم به مشهد با ایرلاین ایرانپیما', 1, '2026-08-17 08:37:50', '2026-08-22 20:33:17', NULL, 1),
(4, 'تهران → اهواز', 25, 1, 2, '2026-09-01 20:15:00', '2026-09-06 06:30:00', 23, 18, '12900000', 'پرواز رفت و برگشت تهران به اهواز', 5, 13, 'پرواز مستقیم با خدمات کامل، مناسب سفرهای تفریحی و کاری.', 1, '2026-08-20 13:21:48', '2026-08-22 18:52:51', NULL, 1),
(6, 'تهران به شیراز', 27, 1, 0, '2026-09-17 08:03:00', NULL, 1, 20, '224000000', 'پرواز یک‌طرفه تهران به شیراز', 54, 0, 'پرواز مستقیم تهران به شیراز', 1, '2026-08-22 18:35:41', '2026-08-22 18:35:41', 1, 1);
-- --------------------------------------------------------
--
-- 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(200) COLLATE utf32_persian_ci NOT NULL,
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci;
--
-- Dumping data for table `provinces`
--
INSERT INTO `provinces` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'تهران', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(2, 'اصفهان', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(4, 'تهران', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(5, 'اصفهان', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(6, 'فارس', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(7, 'خراسان رضوی', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(8, 'آذربایجان شرقی', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(9, 'خوزستان', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(10, 'مازندران', '2026-08-22 15:40:05', '2026-08-22 15:40:28');
-- --------------------------------------------------------
--
-- 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(256) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL,
`summary` text CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL,
`description` text CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL,
`origin` varchar(200) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL,
`destination` varchar(256) CHARACTER SET utf32 COLLATE utf32_persian_ci NOT NULL,
`departure_time` timestamp NOT NULL,
`file_id` bigint UNSIGNED DEFAULT NULL,
`duration` int UNSIGNED NOT NULL,
`views` int UNSIGNED NOT NULL DEFAULT '0',
`price` int NOT NULL,
`status` tinyint NOT NULL COMMENT '0: disable | 1: enable',
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
`created_by` bigint UNSIGNED DEFAULT NULL,
`updated_by` bigint UNSIGNED DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `tours_fk1` (`file_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci;
--
-- Dumping data for table `tours`
--
INSERT INTO `tours` (`id`, `title`, `summary`, `description`, `origin`, `destination`, `departure_time`, `file_id`, `duration`, `views`, `price`, `status`, `created_at`, `updated_at`, `created_by`, `updated_by`) VALUES
(1, 'تور استانبول ویژه تابستان', 'سفر ۵ روزه به استانبول با اقامت در هتل ۴ ستاره', 'تور استانبول شامل اقامت، ترانسفر فرودگاهی و گشت شهری', 'تهران', 'استانبول', '2026-08-22 16:58:00', 29, 5, 0, 3400000, 1, '2026-08-20 16:58:15', '2026-08-22 18:41:45', NULL, 1),
(2, 'تور ۵ روزه استانبول', 'تور جذاب و اقتصادی استانبول با اقامت در هتل مناسب', 'این تور شامل بازدید از جاذبه‌های تاریخی و گردشگری استانبول، اقامت در هتل و برنامه‌های تفریحی متنوع است.', 'تهران', 'استانبول', '2026-08-20 16:58:15', NULL, 10, 135, 15000000, 1, '2026-08-20 16:58:15', '2026-08-22 17:05:43', NULL, NULL),
(4, 'تور پاریس ۶ روزه', 'خدمات: پرواز + هتل + ترانسفر', 'برج ایفل، موزه لوور، خیابان شانزلیزه و رود سن', 'تهران', 'پاریس، فرانسه', '2026-10-07 16:30:00', 28, 6, 4, 12345600, 1, '2026-08-21 03:48:33', '2026-08-22 20:33:30', NULL, 1),
(5, 'تور دبی ۴ روزه', 'خدمات: پرواز + هتل + صبحانه + ترانسفر', 'توضیحات: بازدید از برج خلیفه، دبی مال، مارینا و سافاری صحرا', 'کیش', 'دبی , امارات', '2026-09-28 08:14:00', 30, 4, 0, 20000000, 1, '2026-08-22 18:44:56', '2026-08-22 18:44:56', 1, 1);
-- --------------------------------------------------------
--
-- 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,
`departure_date` date NOT NULL,
`return_date` date NOT NULL,
`price` int UNSIGNED NOT NULL,
`capacity` int UNSIGNED NOT NULL,
`status` tinyint NOT NULL COMMENT '1: disable | 2:enable',
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`),
KEY `tours_dates_fk1` (`tour_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci;
-- --------------------------------------------------------
--
-- 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(256) COLLATE utf32_persian_ci NOT NULL,
`last_name` varchar(256) COLLATE utf32_persian_ci NOT NULL,
`national_code` varchar(10) COLLATE utf32_persian_ci NOT NULL,
`gender` tinyint UNSIGNED NOT NULL COMMENT '0:male | 1:female | 2:unknown',
`marital_status` tinyint UNSIGNED NOT NULL COMMENT '0:single | 1:married | 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,
`file_id` bigint UNSIGNED DEFAULT NULL,
`username` varchar(200) COLLATE utf32_persian_ci NOT NULL,
`password` varchar(250) COLLATE utf32_persian_ci NOT NULL,
`province_id` bigint UNSIGNED DEFAULT NULL,
`city_id` bigint UNSIGNED DEFAULT NULL,
`status` tinyint UNSIGNED NOT NULL COMMENT '0:disable | 1:pending | 2:enable',
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`),
KEY `user_image_fk1` (`file_id`),
KEY `users_fk3` (`city_id`),
KEY `users_fk4` (`province_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 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`, `file_id`, `username`, `password`, `province_id`, `city_id`, `status`, `created_at`, `updated_at`) VALUES
(6, 'سوگند', 'اصغری', '2150788772', 1, 0, NULL, '09032097811', 'sogandasghary@gmail.com', 22, 'sahy', '$2y$12$YdFce7gFP9KIULd7d3OMfuTO9voANE9vyLq0Ykv0SFHK2jdDe0UQG', 7, 20, 0, '2026-08-17 04:00:44', '2026-08-22 18:54:07');
-- --------------------------------------------------------
--
-- Table structure for table `visits`
--
DROP TABLE IF EXISTS `visits`;
CREATE TABLE IF NOT EXISTS `visits` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`user_agent` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `visits`
--
INSERT INTO `visits` (`id`, `ip_address`, `url`, `user_agent`, `created_at`, `updated_at`) VALUES
(1, '127.0.0.1', 'http://127.0.0.1:8000', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36', '2026-08-21 05:17:05', '2026-08-21 05:17:05'),
(2, '127.0.0.1', 'http://127.0.0.1:8000', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36', '2026-08-21 05:17:17', '2026-08-21 05:17:17'),
(3, '127.0.0.1', 'http://127.0.0.1:8000', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36', '2026-08-21 05:20:12', '2026-08-21 05:20:12'),
(4, '127.0.0.1', 'http://127.0.0.1:8000', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36', '2026-08-21 10:01:44', '2026-08-21 10:01:44'),
(5, '127.0.0.1', 'http://127.0.0.1:8000', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36', '2026-08-21 10:02:06', '2026-08-21 10:02:06'),
(6, '127.0.0.1', 'http://127.0.0.1:8000', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36', '2026-08-22 16:45:32', '2026-08-22 16:45:32'),
(7, '127.0.0.1', 'http://127.0.0.1:8000', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36', '2026-08-23 01:30:49', '2026-08-23 01:30:49');
-- --------------------------------------------------------
--
-- Table structure for table `wishlists`
--
DROP TABLE IF EXISTS `wishlists`;
CREATE TABLE IF NOT EXISTS `wishlists` (
`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 `wishlist_fk1` (`user_id`),
KEY `wishlist_fk2` (`flight_id`),
KEY `wishlist_fk3` (`tour_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf32 COLLATE=utf32_persian_ci;
--
-- Dumping data for table `wishlists`
--
INSERT INTO `wishlists` (`id`, `user_id`, `flight_id`, `tour_id`, `created_at`, `updated_at`) VALUES
(7, 6, 1, NULL, '2026-08-19 15:51:58', '2026-08-19 15:51:58'),
(8, 6, 4, NULL, '2026-08-22 18:52:51', '2026-08-22 18:52:51');
--
-- Constraints for dumped tables
--
--
-- Constraints for table `admin_permissions`
--
ALTER TABLE `admin_permissions`
ADD CONSTRAINT `admin_permision_fk1` FOREIGN KEY (`admin_id`) REFERENCES `admins` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- 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 (`flight_id`) REFERENCES `flights` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `bookings_fk2` FOREIGN KEY (`tour_id`) REFERENCES `tours` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `bookings_fk3` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `booking_passengers`
--
ALTER TABLE `booking_passengers`
ADD CONSTRAINT `booking_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_fk1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `comments_fk2` FOREIGN KEY (`flight_id`) REFERENCES `flights` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `comments_fk3` FOREIGN KEY (`tour_id`) REFERENCES `tours` (`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_airport_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_image_fk1` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `users_fk3` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `users_fk4` FOREIGN KEY (`province_id`) REFERENCES `provinces` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `wishlists`
--
ALTER TABLE `wishlists`
ADD CONSTRAINT `wishlist_fk1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `wishlist_fk2` FOREIGN KEY (`flight_id`) REFERENCES `flights` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `wishlist_fk3` FOREIGN KEY (`tour_id`) REFERENCES `tours` (`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 */;