-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 26 أكتوبر 2021 الساعة 11:17
-- إصدار الخادم: 10.1.38-MariaDB
-- PHP Version: 7.3.3

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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: `sama`
--

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

--
-- بنية الجدول `academic_years`
--

CREATE TABLE `academic_years` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `academic_years`
--

INSERT INTO `academic_years` (`id`, `title`, `code`, `start_date`, `end_date`, `created_at`, `updated_at`) VALUES
(1, '2021-2022', '2122', '2021-09-01', '2022-01-25', '2021-10-09 21:00:00', '2021-10-10 12:19:23'),
(2, '2022-2023', '2223', '2022-09-01', '2023-04-30', '2021-10-10 12:06:55', '2021-10-10 12:14:09');

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

--
-- بنية الجدول `attendees`
--

CREATE TABLE `attendees` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `status` enum('delay','absence','present','excusedAbsent','excusedDelay') COLLATE utf8mb4_unicode_ci NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `cities`
--

CREATE TABLE `cities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `cities`
--

INSERT INTO `cities` (`id`, `title`, `code`, `created_at`, `updated_at`) VALUES
(1, 'ضاحية قدسيا', 'QS', NULL, NULL),
(2, 'صحنايا', 'SH', NULL, NULL),
(3, 'دمشق', 'DS', NULL, NULL),
(4, 'اشرفية صحنايا', 'AS', NULL, NULL);

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

--
-- بنية الجدول `classes`
--

CREATE TABLE `classes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `deactivated_parents_accounts`
--

CREATE TABLE `deactivated_parents_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `deactivated_parents_accounts`
--

INSERT INTO `deactivated_parents_accounts` (`id`, `username`, `password`, `parent_id`, `created_at`, `updated_at`) VALUES
(1, 'zdthnju', 'sjyfttb', 14, '2021-10-05 21:00:00', '2021-10-05 21:00:00'),
(2, 'xngkilv', 'ocdbgsd', 2, NULL, NULL),
(3, 'vivesjom', '0stnnppm', 18, '2021-10-07 12:43:51', '2021-10-07 12:43:51');

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

--
-- بنية الجدول `divisions`
--

CREATE TABLE `divisions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `capacity` int(7) UNSIGNED NOT NULL,
  `level_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `divisions`
--

INSERT INTO `divisions` (`id`, `title`, `code`, `capacity`, `level_id`, `created_at`, `updated_at`) VALUES
(1, 'الشعبة الاولى', 'div-first', 50, 3, NULL, NULL),
(2, 'a2', 'two', 40, 3, '2021-10-01 21:00:00', '2021-10-01 21:00:00'),
(3, 'a3', 'three', 40, 3, '2021-10-01 21:00:00', '2021-10-01 21:00:00'),
(4, 'الشعبة الاولى', 'F-21', 40, 4, '2021-10-03 21:00:00', '2021-10-11 08:55:03'),
(5, 'الشعبة الثانية', 'F-22', 40, 4, '2021-10-11 08:44:25', '2021-10-11 08:44:25'),
(6, 'F-11', 'f-11', 40, 3, '2021-10-12 07:47:32', '2021-10-12 07:47:32'),
(7, 'F-21', 'F-21', 40, 4, '2021-10-12 07:48:03', '2021-10-12 07:48:03'),
(8, 'F-31', 'F-31', 40, 5, '2021-10-12 07:48:52', '2021-10-12 07:48:52'),
(9, 'F-41', 'F-41', 40, 6, '2021-10-12 07:49:12', '2021-10-12 07:49:12'),
(10, 'F-51', 'F-51', 44, 7, '2021-10-12 07:49:35', '2021-10-12 07:49:35'),
(11, 'F-61', 'F-61', 44, 8, '2021-10-12 07:49:50', '2021-10-12 07:49:50'),
(12, 'SM-11', 'SM-11', 40, 9, '2021-10-12 07:50:29', '2021-10-12 07:50:29'),
(13, 'SM-21', 'SM-21', 44, 10, '2021-10-12 07:50:46', '2021-10-12 07:50:46'),
(14, 'SM-31', 'SM-31', 44, 11, '2021-10-12 07:51:11', '2021-10-12 07:51:11'),
(15, 'SF-31', 'SF-31', 44, 18, '2021-10-12 07:55:46', '2021-10-12 07:55:46'),
(16, 'SF-21', 'SF-21', 22, 17, '2021-10-12 07:56:03', '2021-10-12 07:56:03'),
(17, 'SF-11', 'SF-11', 44, 16, '2021-10-12 07:56:26', '2021-10-12 07:56:26'),
(18, 'HF-11', 'HF-11', 45, 19, '2021-10-12 07:58:01', '2021-10-12 07:58:01'),
(19, 'HF-11', 'HF-21', 40, 20, '2021-10-12 07:58:28', '2021-10-12 07:58:28'),
(20, 'HF-31', 'HF-31', 40, 21, '2021-10-12 07:58:47', '2021-10-12 07:58:47'),
(21, 'HM-31', 'HM-31', 23, 14, '2021-10-12 07:59:11', '2021-10-12 07:59:11'),
(22, 'HM-21', 'HM-21', 45, 13, '2021-10-12 07:59:36', '2021-10-12 07:59:36'),
(23, 'HM-11', 'HM-11', 45, 12, '2021-10-12 07:59:56', '2021-10-12 07:59:56');

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

--
-- بنية الجدول `exam_forms`
--

CREATE TABLE `exam_forms` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `level_id` bigint(20) UNSIGNED NOT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `attachment` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `exam_programs`
--

CREATE TABLE `exam_programs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `level_id` bigint(20) UNSIGNED NOT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `semester_id` bigint(20) UNSIGNED NOT NULL,
  `attachment` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `guidance_counselors`
--

CREATE TABLE `guidance_counselors` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `settings` text COLLATE utf8mb4_unicode_ci,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `guidance_counselors`
--

INSERT INTO `guidance_counselors` (`id`, `first_name`, `last_name`, `username`, `phone`, `email`, `stage_id`, `email_verified_at`, `password`, `settings`, `remember_token`, `created_at`, `updated_at`) VALUES
(2, 'guidanceCounselors', 'guidanceCounselors', 'guidanceCounselors', '08956232154', 'guidanceCounselors@school.com', 4, NULL, '$2y$10$K/GM.vOUxIKH4Kb197RgIuoQpwMe3ZbP9cxgvO98th2RW13N2n59q', '{\"status\":\"1\"}', 'grwz5id2WGvfjYj2bycrx4QTukPaTl6fXS295ggof7kcUjVm3JOfl4KxTvvH', '2021-10-13 08:14:04', '2021-10-13 08:57:01');

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

--
-- بنية الجدول `guidance_counselor_divisions`
--

CREATE TABLE `guidance_counselor_divisions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `guidance_counselor_id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `is_temporary` tinyint(1) NOT NULL,
  `end_in` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `headmasters`
--

CREATE TABLE `headmasters` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `settings` text COLLATE utf8mb4_unicode_ci,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `homework`
--

CREATE TABLE `homework` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `level_id` bigint(20) UNSIGNED NOT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `semester_id` bigint(20) UNSIGNED NOT NULL,
  `attachment` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `languages`
--

CREATE TABLE `languages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `languages`
--

INSERT INTO `languages` (`id`, `title`, `code`, `created_at`, `updated_at`) VALUES
(1, 'English ', 'en', '2021-09-29 21:00:00', '2021-09-29 21:00:00');

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

--
-- بنية الجدول `levels`
--

CREATE TABLE `levels` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_level` bigint(20) UNSIGNED DEFAULT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `levels`
--

INSERT INTO `levels` (`id`, `title`, `code`, `parent_level`, `stage_id`, `created_at`, `updated_at`) VALUES
(3, 'الصف الاول', 'F-1', NULL, 4, NULL, '2021-10-10 09:14:17'),
(4, 'الصف الثاني', 'F-2', 3, 4, '2021-10-03 21:00:00', '2021-10-10 09:33:43'),
(5, 'الصف الثالث', 'F-3', 4, 4, '2021-10-10 08:49:02', '2021-10-10 08:49:02'),
(6, 'الصف الرابع', 'F-4', 5, 4, '2021-10-10 08:49:35', '2021-10-10 08:49:35'),
(7, 'الصف الخامس', 'F-5', 6, 4, '2021-10-10 08:49:58', '2021-10-10 08:49:58'),
(8, 'الصف السادس', 'F-6', 7, 4, '2021-10-10 08:50:16', '2021-10-10 08:50:16'),
(9, 'الصف السابع', 'S-1', NULL, 5, '2021-10-10 08:55:08', '2021-10-10 08:55:08'),
(10, 'الصف الثامن', 'S-2', 9, 5, '2021-10-10 08:55:46', '2021-10-10 08:55:46'),
(11, 'الصف التاسع', 'S-3', 10, 5, '2021-10-10 08:56:07', '2021-10-10 08:56:07'),
(12, 'الصف العاشر', 'H-1', NULL, 1, '2021-10-10 08:56:31', '2021-10-10 08:56:31'),
(13, 'الصف الحادي عشر', 'H-2', 12, 1, '2021-10-10 08:56:59', '2021-10-10 08:56:59'),
(14, 'بكلوريا', 'H-3', 13, 1, '2021-10-10 08:58:39', '2021-10-10 08:58:39'),
(16, 'الصف السابع', 'SF-1', NULL, 6, '2021-10-12 07:52:57', '2021-10-12 07:52:57'),
(17, 'الصف الثامن', 'SF-2', 16, 6, '2021-10-12 07:53:28', '2021-10-12 07:53:28'),
(18, 'الصف التاسع', 'SF-3', 17, 6, '2021-10-12 07:53:49', '2021-10-12 07:53:49'),
(19, 'الصف العاشر', 'HF-1', NULL, 7, '2021-10-12 07:54:24', '2021-10-12 07:54:24'),
(20, 'الصف الحادي عشر', 'HF-2', 19, 7, '2021-10-12 07:54:48', '2021-10-12 07:54:48'),
(21, 'بكلوريا', 'HF-3', 20, 7, '2021-10-12 07:55:21', '2021-10-12 07:55:21');

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

--
-- بنية الجدول `messages_forms`
--

CREATE TABLE `messages_forms` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `letters_number` int(11) NOT NULL,
  `messages_number` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `migrations`
--

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

--
-- إرجاع أو استيراد بيانات الجدول `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2021_09_18_124506_create_permissions_table', 1),
(6, '2021_09_18_124731_create_roles_table', 1),
(7, '2021_09_18_124806_create_role_permissions_table', 1),
(8, '2021_09_18_125103_create_temporary_users_permissions_table', 1),
(9, '2021_09_18_125239_create_religions_table', 1),
(10, '2021_09_18_125811_create_messages_forms_table', 1),
(11, '2021_09_18_125905_create_parents_table', 1),
(12, '2021_09_18_130223_create_parent_accounts_table', 1),
(13, '2021_09_18_130256_create_parent_notifications_table', 1),
(14, '2021_09_18_130344_create_stages_table', 1),
(15, '2021_09_18_130437_create_levels_table', 1),
(16, '2021_09_18_130505_create_semesters_table', 1),
(17, '2021_09_18_130931_create_divisions_table', 1),
(18, '2021_09_18_131029_create_students_table', 1),
(19, '2021_09_18_131118_create_attendees_table', 1),
(20, '2021_09_18_131126_create_transaction_types_table', 1),
(21, '2021_09_18_131307_create_student_financial_records_table', 1),
(22, '2021_09_18_131432_create_nationalities_table', 1),
(23, '2021_09_18_131456_create_student_nationalities_table', 1),
(24, '2021_09_18_131623_create_languages_table', 1),
(25, '2021_09_18_131649_create_student_languages_table', 1),
(26, '2021_09_18_131726_create_transportations_table', 1),
(27, '2021_09_18_131849_create_student_transportations_table', 1),
(28, '2021_09_18_131936_create_classes_table', 1),
(29, '2021_09_18_132004_create_student_notes_table', 1),
(30, '2021_09_18_132026_create_student_levels_table', 1),
(31, '2021_09_18_132152_create_student_health_records_table', 1),
(32, '2021_09_18_132328_create_exam_forms_table', 1),
(33, '2021_09_18_132359_create_school_programs_table', 1),
(34, '2021_09_18_132502_create_study_materials_table', 1),
(35, '2021_09_18_132525_create_exam_programs_table', 1),
(36, '2021_09_18_132722_create_homework_table', 1),
(37, '2021_09_18_132802_create_student_grades_table', 1),
(38, '2021_09_18_132912_create_semester_exams_table', 1),
(39, '2021_09_18_133003_create_student_exam_grades_table', 1),
(40, '2021_09_18_130920_create_cities_table', 2),
(42, '2021_10_06_105453_create_deactivated_parents_accounts_table', 4),
(43, '2021_10_10_134337_create_academic_years_table', 5),
(51, '2021_10_12_140008_create_headmasters_table', 6),
(52, '2021_10_12_140210_create_guidance_counselors_table', 6),
(53, '2021_10_12_140336_create_guidance_counselor_divisions_table', 6),
(54, '2021_09_18_130340_create_headmasters_table', 7),
(55, '2021_10_25_123143_create_users_permissions_table', 7);

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

--
-- بنية الجدول `nationalities`
--

CREATE TABLE `nationalities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `country` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `nationalities`
--

INSERT INTO `nationalities` (`id`, `title`, `country`, `created_at`, `updated_at`) VALUES
(1, 'syrian', 'syria', '2021-09-27 21:00:00', '2021-09-27 21:00:00'),
(2, 'Lebanese', 'Lebanon ', '2021-10-03 21:00:00', '2021-10-03 21:00:00'),
(6, 'Palestinian', 'Palestine ', '2021-10-03 21:00:00', '2021-10-03 21:00:00'),
(9, 'Jordanian', 'Jordan ', '2021-10-03 21:00:00', '2021-10-03 21:00:00'),
(10, 'Saudi', 'Kingdom of Saudia Arabia', '2021-10-03 21:00:00', '2021-10-03 21:00:00');

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

--
-- بنية الجدول `parents`
--

CREATE TABLE `parents` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `gender` enum('male','female') COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `job` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `parents`
--

INSERT INTO `parents` (`id`, `first_name`, `last_name`, `gender`, `phone`, `job`, `created_at`, `updated_at`) VALUES
(1, 'nour', 'mother', 'female', '0963321789', 'any', NULL, '2021-10-09 09:48:17'),
(2, 'mohamed', 'father', 'male', '0789963321', 'any', NULL, NULL),
(3, 'moon', 'sun', 'female', '0859651894', 'any', '2021-09-27 21:00:00', '2021-09-27 21:00:00'),
(4, 'moon1', 'sun1', 'female', '0859651894', 'any', '2021-09-27 21:00:00', '2021-09-27 21:00:00'),
(5, 'moon2', 'sun2', 'female', '0859651894', 'any', '2021-09-27 21:00:00', '2021-09-27 21:00:00'),
(6, 'moon2', 'sun2', 'female', '0859651896', 'any', '2021-09-27 21:00:00', '2021-09-27 21:00:00'),
(7, 'moon3', 'sun3', 'female', '0869651896', 'any', '2021-09-27 21:00:00', '2021-09-27 21:00:00'),
(8, 'maria', 'maria', 'female', '0987412623', 'maria', '2021-10-04 10:50:08', '2021-10-04 10:50:08'),
(9, 'khosih', 'khosih', 'male', '098762345', 'khosih', '2021-10-04 11:07:28', '2021-10-04 11:07:28'),
(10, 'maria', 'maria', 'female', '0123456789', 'any', '2021-10-06 08:39:10', '2021-10-06 08:39:10'),
(11, 'maria', 'maria', 'female', '01234056789', 'any', '2021-10-06 08:40:13', '2021-10-06 08:40:13'),
(12, 'mena', 'lon', 'female', '0987645314', 'any', '2021-10-06 08:47:30', '2021-10-06 08:47:30'),
(13, 'mena', 'lon', 'female', '0987675314', 'any', '2021-10-06 08:49:47', '2021-10-06 08:49:47'),
(14, 'mena', 'lon', 'female', '0988675314', 'any', '2021-10-06 08:50:43', '2021-10-06 08:50:43'),
(15, 'mena', 'lon', 'female', '0980675314', 'any', '2021-10-06 08:53:45', '2021-10-06 08:53:45'),
(16, 'mena', 'lon', 'female', '0980670314', 'any', '2021-10-06 08:59:51', '2021-10-06 08:59:51'),
(17, 'mena', 'lon', 'female', '0980679814', 'any', '2021-10-06 09:00:56', '2021-10-06 09:00:56'),
(18, 'ana', 'mor', 'female', '+20963258741', 'ss', '2021-10-07 12:43:51', '2021-10-07 12:43:51');

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

--
-- بنية الجدول `parent_accounts`
--

CREATE TABLE `parent_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `parent_id` bigint(20) UNSIGNED NOT NULL,
  `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `parent_accounts`
--

INSERT INTO `parent_accounts` (`id`, `parent_id`, `username`, `email`, `email_verified_at`, `password`, `created_at`, `updated_at`) VALUES
(1, 1, 'nour12345', 'nour@gm.co', NULL, '$2y$10$s6zNV9ZeM5Y5W3k1vMgYouxtEfrfVFbIpHfzShHojqNuNl.G4H2Ve', NULL, '2021-10-09 09:56:59');

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

--
-- بنية الجدول `parent_notifications`
--

CREATE TABLE `parent_notifications` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `parent_account_id` bigint(20) UNSIGNED NOT NULL,
  `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `read_at` datetime NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `group` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `permissions`
--

INSERT INTO `permissions` (`id`, `title`, `code`, `group`, `created_at`, `updated_at`) VALUES
(250, 'browse users', 'browse-users', 'users', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(251, 'edit users', 'edit-users', 'users', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(252, 'delete users', 'delete-users', 'users', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(253, 'add users', 'add-users', 'users', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(254, 'view users', 'view-users', 'users', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(255, 'browse roles', 'browse-roles', 'roles', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(256, 'edit roles', 'edit-roles', 'roles', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(257, 'delete roles', 'delete-roles', 'roles', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(258, 'add roles', 'add-roles', 'roles', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(259, 'view roles', 'view-roles', 'roles', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(260, 'browse courses', 'browse-courses', 'courses', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(261, 'edit courses', 'edit-courses', 'courses', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(262, 'delete courses', 'delete-courses', 'courses', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(263, 'add courses', 'add-courses', 'courses', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(264, 'view courses', 'view-courses', 'courses', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(275, 'browse stages', 'browse-stages', 'stages', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(276, 'edit stages', 'edit-stages', 'stages', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(277, 'delete stages', 'delete-stages', 'stages', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(278, 'add stages', 'add-stages', 'stages', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(279, 'view stages', 'view-stages', 'stages', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(280, 'browse divisions', 'browse-divisions', 'divisions', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(281, 'edit divisions', 'edit-divisions', 'divisions', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(282, 'delete divisions', 'delete-divisions', 'divisions', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(283, 'add divisions', 'add-divisions', 'divisions', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(284, 'view divisions', 'view-divisions', 'divisions', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(285, 'browse levels', 'browse-levels', 'levels', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(286, 'edit levels', 'edit-levels', 'levels', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(287, 'delete levels', 'delete-levels', 'levels', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(288, 'add levels', 'add-levels', 'levels', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(289, 'view levels', 'view-levels', 'levels', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(290, 'browse classes', 'browse-classes', 'classes', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(291, 'edit classes', 'edit-classes', 'classes', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(292, 'delete classes', 'delete-classes', 'classes', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(293, 'add classes', 'add-classes', 'classes', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(294, 'view classes', 'view-classes', 'classes', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(300, 'browse semesters', 'browse-semesters', 'semesters', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(301, 'edit semesters', 'edit-semesters', 'semesters', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(302, 'delete semesters', 'delete-semesters', 'semesters', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(303, 'add semesters', 'add-semesters', 'semesters', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(304, 'view semesters', 'view-semesters', 'semesters', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(310, 'browse attendance', 'browse-attendance', 'attendance', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(311, 'edit attendance', 'edit-attendance', 'attendance', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(312, 'delete attendance', 'delete-attendance', 'attendance', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(313, 'add attendance', 'add-attendance', 'attendance', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(314, 'view attendance', 'view-attendance', 'attendance', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(320, 'browse grades', 'browse-grades', 'grades', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(321, 'edit grades', 'edit-grades', 'grades', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(322, 'delete grades', 'delete-grades', 'grades', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(323, 'add grades', 'add-grades', 'grades', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(324, 'view grades', 'view-grades', 'grades', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(325, 'access dashboard', 'access-dashboard', 'general', '2021-10-09 11:14:09', '2021-10-09 11:14:09'),
(331, 'browse exam forms', 'browse-exam-forms', 'exam forms', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(332, 'edit exam forms', 'edit-exam-forms', 'exam forms', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(333, 'delete exam forms', 'delete-exam-forms', 'exam forms', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(334, 'add exam forms', 'add-exam-forms', 'exam forms', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(335, 'view exam forms', 'view-exam-forms', 'exam forms', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(336, 'browse exam tables', 'browse-exam-tables', 'exam tables', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(337, 'edit exam tables', 'edit-exam-tables', 'exam tables', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(338, 'delete exam tables', 'delete-exam-tables', 'exam tables', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(339, 'add exam tables', 'add-exam-tables', 'exam tables', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(340, 'view exam tables', 'view-exam-tables', 'exam tables', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(341, 'browse students financials records', 'browse-students-financials-records', 'students financials records', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(342, 'edit students financials records', 'edit-students-financials-records', 'students financials records', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(343, 'delete students financials records', 'delete-students-financials-records', 'students financials records', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(344, 'add students financials records', 'add-students-financials-records', 'students financials records', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(345, 'view students financials records', 'view-students-financials-records', 'students financials records', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(346, 'browse school programs', 'browse-school-programs', 'school programs', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(347, 'edit school programs', 'edit-school-programs', 'school programs', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(348, 'delete school programs', 'delete-school-programs', 'school programs', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(349, 'add school programs', 'add-school-programs', 'school programs', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(350, 'view school programs', 'view-school-programs', 'school programs', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(351, 'browse students notes', 'browse-students-notes', 'students notes', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(352, 'edit students notes', 'edit-students-notes', 'students notes', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(353, 'delete students notes', 'delete-students-notes', 'students notes', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(354, 'add students notes', 'add-students-notes', 'students notes', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(355, 'view students notes', 'view-students-notes', 'students notes', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(356, 'browse academic years', 'browse-academic-years', 'academic years', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(357, 'edit academic years', 'edit-academic-years', 'academic years', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(358, 'delete academic years', 'delete-academic-years', 'academic years', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(359, 'add academic years', 'add-academic-years', 'academic years', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(360, 'view academic years', 'view-academic-years', 'academic years', '2021-10-13 11:45:33', '2021-10-13 11:45:33'),
(366, 'browse study materials', 'browse-study-materials', 'study materials', '2021-10-14 12:08:31', '2021-10-14 12:08:31'),
(367, 'edit study materials', 'edit-study-materials', 'study materials', '2021-10-14 12:08:31', '2021-10-14 12:08:31'),
(368, 'delete study materials', 'delete-study-materials', 'study materials', '2021-10-14 12:08:31', '2021-10-14 12:08:31'),
(369, 'add study materials', 'add-study-materials', 'study materials', '2021-10-14 12:08:31', '2021-10-14 12:08:31'),
(370, 'view study materials', 'view-study-materials', 'study materials', '2021-10-14 12:08:31', '2021-10-14 12:08:31');

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

--
-- بنية الجدول `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tokenable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text COLLATE utf8mb4_unicode_ci,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `religions`
--

CREATE TABLE `religions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `religions`
--

INSERT INTO `religions` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Muslim', 'Muslims ', NULL, NULL);

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

--
-- بنية الجدول `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `roles`
--

INSERT INTO `roles` (`id`, `title`, `description`, `created_at`, `updated_at`) VALUES
(3, 'super admin', 'all permissions', '2021-09-25 04:40:52', '2021-09-26 10:58:49'),
(8, 'Coordinator', 'school coordinator', '2021-10-11 12:17:08', '2021-10-11 12:17:08');

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

--
-- بنية الجدول `role_permissions`
--

CREATE TABLE `role_permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `role_permissions`
--

INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`, `updated_at`) VALUES
(809, 3, 250, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(810, 3, 251, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(811, 3, 252, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(812, 3, 253, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(813, 3, 254, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(814, 3, 255, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(815, 3, 256, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(816, 3, 257, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(817, 3, 258, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(818, 3, 259, '2021-10-09 11:14:40', '2021-10-09 11:14:40'),
(885, 3, 260, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(886, 3, 261, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(887, 3, 262, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(888, 3, 263, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(889, 3, 264, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(890, 3, 275, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(891, 3, 276, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(892, 3, 277, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(893, 3, 278, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(894, 3, 279, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(895, 3, 280, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(896, 3, 281, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(897, 3, 282, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(898, 3, 283, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(899, 3, 284, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(900, 3, 285, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(901, 3, 286, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(902, 3, 287, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(903, 3, 288, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(904, 3, 289, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(905, 3, 290, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(906, 3, 291, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(907, 3, 292, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(908, 3, 293, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(909, 3, 294, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(910, 3, 300, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(911, 3, 301, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(912, 3, 302, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(913, 3, 303, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(914, 3, 304, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(915, 3, 310, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(916, 3, 311, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(917, 3, 312, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(918, 3, 313, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(919, 3, 314, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(920, 3, 320, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(921, 3, 321, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(922, 3, 322, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(923, 3, 323, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(924, 3, 324, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(925, 3, 325, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(926, 3, 331, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(927, 3, 332, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(928, 3, 333, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(929, 3, 334, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(930, 3, 335, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(931, 3, 336, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(932, 3, 337, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(933, 3, 338, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(934, 3, 339, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(935, 3, 340, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(936, 3, 341, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(937, 3, 342, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(938, 3, 343, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(939, 3, 344, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(940, 3, 345, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(941, 3, 346, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(942, 3, 347, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(943, 3, 348, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(944, 3, 349, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(945, 3, 350, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(946, 3, 351, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(947, 3, 352, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(948, 3, 353, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(949, 3, 354, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(950, 3, 355, '2021-10-13 11:47:07', '2021-10-13 11:47:07'),
(956, 3, 356, '2021-10-13 12:00:01', '2021-10-13 12:00:01'),
(957, 3, 357, '2021-10-13 12:00:01', '2021-10-13 12:00:01'),
(958, 3, 358, '2021-10-13 12:00:01', '2021-10-13 12:00:01'),
(959, 3, 359, '2021-10-13 12:00:01', '2021-10-13 12:00:01'),
(960, 3, 360, '2021-10-13 12:00:01', '2021-10-13 12:00:01'),
(961, 3, 366, '2021-10-14 12:12:19', '2021-10-14 12:12:19'),
(962, 3, 367, '2021-10-14 12:12:19', '2021-10-14 12:12:19'),
(963, 3, 368, '2021-10-14 12:12:19', '2021-10-14 12:12:19'),
(964, 3, 369, '2021-10-14 12:12:19', '2021-10-14 12:12:19'),
(965, 3, 370, '2021-10-14 12:12:19', '2021-10-14 12:12:19');

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

--
-- بنية الجدول `school_programs`
--

CREATE TABLE `school_programs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `level_id` bigint(20) UNSIGNED NOT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `attachment` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `semesters`
--

CREATE TABLE `semesters` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `academic_year_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `semesters`
--

INSERT INTO `semesters` (`id`, `title`, `code`, `start_date`, `end_date`, `academic_year_id`, `created_at`, `updated_at`) VALUES
(1, 'الفصل الصيفي', 'S-2021', '2021-09-01', '2022-01-03', 1, NULL, '2021-10-12 08:18:32'),
(2, 'الفصل الاول', 's-1', '2021-10-03', '2022-02-20', 1, '2021-10-10 10:32:45', '2021-10-10 10:32:45'),
(3, 'الفصل الثاني', 'sem-2', '2022-01-18', '2022-04-30', 1, '2021-10-10 11:04:26', '2021-10-10 11:11:21');

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

--
-- بنية الجدول `semester_exams`
--

CREATE TABLE `semester_exams` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `semester_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `stages`
--

CREATE TABLE `stages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `stages`
--

INSERT INTO `stages` (`id`, `title`, `code`, `created_at`, `updated_at`) VALUES
(1, 'ثانوي ذكور', 'Height-M', '2021-09-25 21:00:00', '2021-10-13 10:42:31'),
(4, 'ابتدائي', 'First', '2021-10-10 08:06:51', '2021-10-10 08:06:51'),
(5, 'إعدادي ذكور', 'Second-M', '2021-10-10 08:07:14', '2021-10-11 10:58:44'),
(6, 'إعدادي إناث', 'Second-F', '2021-10-11 10:59:25', '2021-10-11 10:59:25'),
(7, 'ثانوي إناث', 'Height-F', '2021-10-11 11:00:00', '2021-10-11 11:00:00');

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

--
-- بنية الجدول `students`
--

CREATE TABLE `students` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `birth_date` date NOT NULL,
  `birth_place` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `gender` enum('male','female') COLLATE utf8mb4_unicode_ci NOT NULL,
  `city_id` bigint(20) UNSIGNED NOT NULL,
  `street` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
  `area` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `telephone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `emergency_phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `emergency_kinship` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `religion_id` bigint(20) UNSIGNED NOT NULL,
  `mother_id` bigint(20) UNSIGNED NOT NULL,
  `father_id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `students`
--

INSERT INTO `students` (`id`, `first_name`, `last_name`, `birth_date`, `birth_place`, `gender`, `city_id`, `street`, `area`, `phone`, `telephone`, `emergency_phone`, `emergency_kinship`, `religion_id`, `mother_id`, `father_id`, `division_id`, `created_at`, `updated_at`) VALUES
(3, 'student', 'last student', '1999-12-01', 'damascus', 'male', 0, 'zaid', 'fahaama', '5632423', '0963741852', '0785214632', 'brother', 1, 1, 2, 1, NULL, NULL),
(5, 'student', 'last student', '1999-12-01', 'damascus', 'male', 0, 'zaid', 'fahaama', '5632423', '0963741852', '0785214632', 'brother', 1, 14, 2, 1, NULL, NULL),
(9, 'نور', 'ياسين', '1999-10-15', 'دير الزور', 'female', 1, 'اصالة', 'ج11', '201234567890', '20963258741', '0968258741', 'اخ', 1, 17, 9, 4, '2021-10-02 13:26:29', '2021-10-11 13:59:44'),
(10, 'نور', 'ياسين', '1999-10-15', 'دير الزور', 'female', 1, 'اصالة', 'ج11', '+201234567890', '+20963258741', '0968258741', 'اخ', 1, 1, 2, 1, '2021-10-02 13:54:43', '2021-10-02 13:54:43'),
(11, 'نور', 'ياسين', '1999-10-15', 'دير الزور', 'female', 1, 'اصالة', 'ج11', '+201234567890', '+20963258741', '0968258741', 'اخ', 1, 1, 2, 1, '2021-10-02 13:56:15', '2021-10-02 13:56:15');

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

--
-- بنية الجدول `student_exam_grades`
--

CREATE TABLE `student_exam_grades` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `grade` double NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `material_id` bigint(20) UNSIGNED NOT NULL,
  `semester_exam_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `student_financial_records`
--

CREATE TABLE `student_financial_records` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `note` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `debit` double NOT NULL,
  `credit` double NOT NULL,
  `balance` double NOT NULL,
  `transaction_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `transaction_date` date NOT NULL,
  `transaction_type_id` bigint(20) UNSIGNED NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `student_grades`
--

CREATE TABLE `student_grades` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `grade` double NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `material_id` bigint(20) UNSIGNED NOT NULL,
  `semester_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `student_health_records`
--

CREATE TABLE `student_health_records` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `student_health_records`
--

INSERT INTO `student_health_records` (`id`, `title`, `description`, `student_id`, `created_at`, `updated_at`) VALUES
(5, 'ورم', 'warm', 9, '2021-10-02 13:26:29', '2021-10-02 13:26:29'),
(7, 'ورم', 'warm', 10, '2021-10-02 13:54:43', '2021-10-02 13:54:43'),
(8, 'sts', 'dd', 10, '2021-10-02 13:54:43', '2021-10-02 13:54:43'),
(9, 'ورم', 'warm', 11, '2021-10-02 13:56:15', '2021-10-02 13:56:15'),
(10, 'sts', 'dd', 11, '2021-10-02 13:56:15', '2021-10-02 13:56:15');

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

--
-- بنية الجدول `student_languages`
--

CREATE TABLE `student_languages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `level` enum('1','2','3','4','5') COLLATE utf8mb4_unicode_ci NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `language_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `student_languages`
--

INSERT INTO `student_languages` (`id`, `level`, `student_id`, `language_id`, `created_at`, `updated_at`) VALUES
(2, '3', 9, 1, '2021-10-02 13:26:29', '2021-10-05 07:46:42'),
(4, '2', 11, 1, '2021-10-02 13:56:15', '2021-10-02 13:56:15');

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

--
-- بنية الجدول `student_levels`
--

CREATE TABLE `student_levels` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `school` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('0','1') COLLATE utf8mb4_unicode_ci NOT NULL,
  `year` year(4) NOT NULL,
  `level_id` bigint(20) UNSIGNED NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `student_levels`
--

INSERT INTO `student_levels` (`id`, `school`, `status`, `year`, `level_id`, `student_id`, `created_at`, `updated_at`) VALUES
(3, 'التألق', '1', 2020, 3, 9, '2021-10-02 13:26:29', '2021-10-04 12:59:52'),
(5, 'التألق', '0', 2020, 3, 11, '2021-10-02 13:56:15', '2021-10-02 13:56:15'),
(6, 'w', '0', 0000, 3, 9, '2021-10-04 12:55:38', '2021-10-04 12:58:43'),
(7, 's', '1', 2023, 4, 9, '2021-10-04 12:55:38', '2021-10-04 12:59:44');

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

--
-- بنية الجدول `student_nationalities`
--

CREATE TABLE `student_nationalities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `nationality_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `student_nationalities`
--

INSERT INTO `student_nationalities` (`id`, `student_id`, `nationality_id`, `created_at`, `updated_at`) VALUES
(2, 9, 1, '2021-10-04 07:36:52', '2021-10-04 07:36:52'),
(4, 9, 6, '2021-10-04 07:36:52', '2021-10-04 07:36:52');

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

--
-- بنية الجدول `student_notes`
--

CREATE TABLE `student_notes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `student_transportations`
--

CREATE TABLE `student_transportations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `transportation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `student_transportations`
--

INSERT INTO `student_transportations` (`id`, `student_id`, `transportation_id`, `created_at`, `updated_at`) VALUES
(2, 10, NULL, '2021-10-02 13:54:43', '2021-10-02 13:54:43'),
(3, 11, NULL, '2021-10-02 13:56:15', '2021-10-02 13:56:15'),
(5, 9, NULL, '2021-10-04 11:43:52', '2021-10-04 11:43:52');

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

--
-- بنية الجدول `study_materials`
--

CREATE TABLE `study_materials` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `level_id` bigint(20) UNSIGNED NOT NULL,
  `max_grade` int(11) NOT NULL,
  `min_grade` int(11) NOT NULL,
  `attachments` tinytext COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `study_materials`
--

INSERT INTO `study_materials` (`id`, `title`, `description`, `level_id`, `max_grade`, `min_grade`, `attachments`, `created_at`, `updated_at`) VALUES
(1, 'الرياضيات', '.', 12, 600, 240, 'attachments/p02sFo88lloGYoAZwarMyn0dMDNkxmUJxFeCwprf.xlsx', '2021-10-13 14:30:15', '2021-10-14 09:50:34'),
(2, 'اللغة العربية', '.', 12, 600, 300, 'attachments/PGb2vxeDSfPwESncgMKKTjV4JBzNvBOWpq7VoLSB.xlsx', '2021-10-13 14:32:15', '2021-10-14 10:49:16');

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

--
-- بنية الجدول `temporary_users_permissions`
--

CREATE TABLE `temporary_users_permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `expires_at` datetime NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `transaction_types`
--

CREATE TABLE `transaction_types` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `transportations`
--

CREATE TABLE `transportations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `driver_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `bus_image` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` double NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- بنية الجدول `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `settings` text COLLATE utf8mb4_unicode_ci,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `users`
--

INSERT INTO `users` (`id`, `first_name`, `last_name`, `username`, `email`, `email_verified_at`, `password`, `role_id`, `settings`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'L.admin', 'admin', 'admin@admin.com', NULL, '$2y$10$qhh/BzAI1lmvy0xmirrfdOUGOUwlrpJgNhW2MawUqmKdUXx6x6.pG', 3, NULL, '7vMQKgEHcvDqiiD62hofpEljB3G1gJ2oOASwtE7uC1XET8cqoU0rucqA20zM', '2021-09-23 10:46:28', '2021-09-23 10:46:28'),
(2, 'admin', 'L.admin', 'admin0', 'admin@0admin.com', NULL, '$2y$10$oTDUoS1oXLmPrkZZQjVGBO24OETXZOGXzNMKFgQ0kAhjkz2lY8sp2', 3, NULL, NULL, '2021-09-23 10:47:26', '2021-09-23 10:47:26'),
(3, 'admin', 'L.admin', 'admin1', 'admin@1admin.com', NULL, '$2y$10$wPNNuHGq1jA4G1ZqVXdrVOo17SmvYkBrjIMkPgissjvRNV9/UkHp.', 3, NULL, NULL, '2021-09-23 10:47:38', '2021-09-23 10:47:38'),
(4, 'admin', 'L.admin', 'admin10', 'admin0@1admin.com', NULL, '$2y$10$oR.ZoHe9azQ/bZjEw8YBFejyVj4zU82NMYoeDA3IOVxN0671iCw9y', 3, NULL, NULL, '2021-09-23 10:47:53', '2021-09-23 10:47:53'),
(5, 'admin', 'L.admin', '2admin', 'admi2n@admin.com', NULL, '$2y$10$7IWI8zOKY6/fa3bYJRTxqOyorG.nGYCeWb7b45Zn/eQJtyhK5iVV2', 3, NULL, NULL, '2021-09-23 10:48:03', '2021-09-23 10:48:03');

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

--
-- بنية الجدول `users_permissions`
--

CREATE TABLE `users_permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `details` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `users_permissions`
--

INSERT INTO `users_permissions` (`id`, `user_id`, `permission_id`, `details`, `created_at`, `updated_at`) VALUES
(1, 1, 325, '{}', '2021-10-24 21:00:00', '2021-10-24 21:00:00');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `attendees`
--
ALTER TABLE `attendees`
  ADD PRIMARY KEY (`id`),
  ADD KEY `attendees_student_id_foreign` (`student_id`);

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

--
-- Indexes for table `classes`
--
ALTER TABLE `classes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `classes_stage_id_foreign` (`stage_id`);

--
-- Indexes for table `deactivated_parents_accounts`
--
ALTER TABLE `deactivated_parents_accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `deactivated_parents_accounts_parent_id_foreign` (`parent_id`);

--
-- Indexes for table `divisions`
--
ALTER TABLE `divisions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `divisions_level_id_foreign` (`level_id`);

--
-- Indexes for table `exam_forms`
--
ALTER TABLE `exam_forms`
  ADD PRIMARY KEY (`id`),
  ADD KEY `exam_forms_level_id_foreign` (`level_id`),
  ADD KEY `exam_forms_stage_id_foreign` (`stage_id`),
  ADD KEY `exam_forms_division_id_foreign` (`division_id`);

--
-- Indexes for table `exam_programs`
--
ALTER TABLE `exam_programs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `exam_programs_level_id_foreign` (`level_id`),
  ADD KEY `exam_programs_stage_id_foreign` (`stage_id`),
  ADD KEY `exam_programs_division_id_foreign` (`division_id`),
  ADD KEY `exam_programs_semester_id_foreign` (`semester_id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `guidance_counselors`
--
ALTER TABLE `guidance_counselors`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `guidance_counselors_email_unique` (`email`),
  ADD KEY `guidance_counselors_stage_id_foreign` (`stage_id`);

--
-- Indexes for table `guidance_counselor_divisions`
--
ALTER TABLE `guidance_counselor_divisions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `guidance_counselor_divisions_guidance_counselor_id_foreign` (`guidance_counselor_id`),
  ADD KEY `guidance_counselor_divisions_division_id_foreign` (`division_id`);

--
-- Indexes for table `headmasters`
--
ALTER TABLE `headmasters`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `headmasters_email_unique` (`email`);

--
-- Indexes for table `homework`
--
ALTER TABLE `homework`
  ADD PRIMARY KEY (`id`),
  ADD KEY `homework_level_id_foreign` (`level_id`),
  ADD KEY `homework_stage_id_foreign` (`stage_id`),
  ADD KEY `homework_division_id_foreign` (`division_id`),
  ADD KEY `homework_semester_id_foreign` (`semester_id`);

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

--
-- Indexes for table `levels`
--
ALTER TABLE `levels`
  ADD PRIMARY KEY (`id`),
  ADD KEY `levels_parent_level_foreign` (`parent_level`),
  ADD KEY `levels_stage_id_foreign` (`stage_id`);

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

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

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

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

--
-- Indexes for table `parent_accounts`
--
ALTER TABLE `parent_accounts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `parent_accounts_email_unique` (`email`),
  ADD KEY `parent_accounts_parent_id_foreign` (`parent_id`);

--
-- Indexes for table `parent_notifications`
--
ALTER TABLE `parent_notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `parent_notifications_parent_account_id_foreign` (`parent_account_id`);

--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
  ADD KEY `password_resets_email_index` (`email`);

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

--
-- Indexes for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);

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

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

--
-- Indexes for table `role_permissions`
--
ALTER TABLE `role_permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `role_permissions_permission_id_foreign` (`permission_id`),
  ADD KEY `role_permissions_role_id_foreign` (`role_id`);

--
-- Indexes for table `school_programs`
--
ALTER TABLE `school_programs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `school_programs_level_id_foreign` (`level_id`),
  ADD KEY `school_programs_stage_id_foreign` (`stage_id`),
  ADD KEY `school_programs_division_id_foreign` (`division_id`);

--
-- Indexes for table `semesters`
--
ALTER TABLE `semesters`
  ADD PRIMARY KEY (`id`),
  ADD KEY `semester_academic_year_id_academic_year_id_foreign` (`academic_year_id`);

--
-- Indexes for table `semester_exams`
--
ALTER TABLE `semester_exams`
  ADD PRIMARY KEY (`id`),
  ADD KEY `semester_exams_stage_id_foreign` (`stage_id`),
  ADD KEY `semester_exams_division_id_foreign` (`division_id`),
  ADD KEY `semester_exams_semester_id_foreign` (`semester_id`);

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

--
-- Indexes for table `students`
--
ALTER TABLE `students`
  ADD PRIMARY KEY (`id`),
  ADD KEY `students_religion_id_foreign` (`religion_id`),
  ADD KEY `students_mother_id_foreign` (`mother_id`),
  ADD KEY `students_father_id_foreign` (`father_id`),
  ADD KEY `students_division_id_foreign` (`division_id`),
  ADD KEY `students_city_id_foreign` (`city_id`);

--
-- Indexes for table `student_exam_grades`
--
ALTER TABLE `student_exam_grades`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_exam_grades_student_id_foreign` (`student_id`),
  ADD KEY `student_exam_grades_material_id_foreign` (`material_id`),
  ADD KEY `student_exam_grades_semester_exam_id_foreign` (`semester_exam_id`);

--
-- Indexes for table `student_financial_records`
--
ALTER TABLE `student_financial_records`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_financial_records_transaction_type_id_foreign` (`transaction_type_id`),
  ADD KEY `student_financial_records_student_id_foreign` (`student_id`);

--
-- Indexes for table `student_grades`
--
ALTER TABLE `student_grades`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_grades_student_id_foreign` (`student_id`),
  ADD KEY `student_grades_material_id_foreign` (`material_id`),
  ADD KEY `student_grades_semester_id_foreign` (`semester_id`);

--
-- Indexes for table `student_health_records`
--
ALTER TABLE `student_health_records`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_health_records_student_id_foreign` (`student_id`);

--
-- Indexes for table `student_languages`
--
ALTER TABLE `student_languages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_languages_student_id_foreign` (`student_id`),
  ADD KEY `student_languages_language_id_foreign` (`language_id`);

--
-- Indexes for table `student_levels`
--
ALTER TABLE `student_levels`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_levels_level_id_foreign` (`level_id`),
  ADD KEY `student_levels_student_id_foreign` (`student_id`);

--
-- Indexes for table `student_nationalities`
--
ALTER TABLE `student_nationalities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_nationalities_student_id_foreign` (`student_id`),
  ADD KEY `student_nationalities_nationality_id_foreign` (`nationality_id`);

--
-- Indexes for table `student_notes`
--
ALTER TABLE `student_notes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_notes_student_id_foreign` (`student_id`);

--
-- Indexes for table `student_transportations`
--
ALTER TABLE `student_transportations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_transportations_student_id_foreign` (`student_id`),
  ADD KEY `student_transportations_transportation_id_foreign` (`transportation_id`);

--
-- Indexes for table `study_materials`
--
ALTER TABLE `study_materials`
  ADD PRIMARY KEY (`id`),
  ADD KEY `study_materials_level_id_foreign` (`level_id`);

--
-- Indexes for table `temporary_users_permissions`
--
ALTER TABLE `temporary_users_permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `temporary_users_permissions_user_id_foreign` (`user_id`),
  ADD KEY `temporary_users_permissions_permission_id_foreign` (`permission_id`);

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

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

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`);

--
-- Indexes for table `users_permissions`
--
ALTER TABLE `users_permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `users_permissions_user_id_foreign` (`user_id`),
  ADD KEY `users_permissions_permission_id_foreign` (`permission_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- قيود الجداول المحفوظة
--

--
-- القيود للجدول `attendees`
--
ALTER TABLE `attendees`
  ADD CONSTRAINT `attendees_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `classes`
--
ALTER TABLE `classes`
  ADD CONSTRAINT `classes_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `stages` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `deactivated_parents_accounts`
--
ALTER TABLE `deactivated_parents_accounts`
  ADD CONSTRAINT `deactivated_parents_accounts_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `parents` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `divisions`
--
ALTER TABLE `divisions`
  ADD CONSTRAINT `divisions_level_id_foreign` FOREIGN KEY (`level_id`) REFERENCES `levels` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `exam_forms`
--
ALTER TABLE `exam_forms`
  ADD CONSTRAINT `exam_forms_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `divisions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `exam_forms_level_id_foreign` FOREIGN KEY (`level_id`) REFERENCES `levels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `exam_forms_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `stages` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `exam_programs`
--
ALTER TABLE `exam_programs`
  ADD CONSTRAINT `exam_programs_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `divisions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `exam_programs_level_id_foreign` FOREIGN KEY (`level_id`) REFERENCES `levels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `exam_programs_semester_id_foreign` FOREIGN KEY (`semester_id`) REFERENCES `semesters` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `exam_programs_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `stages` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `guidance_counselors`
--
ALTER TABLE `guidance_counselors`
  ADD CONSTRAINT `guidance_counselors_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `stages` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `guidance_counselor_divisions`
--
ALTER TABLE `guidance_counselor_divisions`
  ADD CONSTRAINT `guidance_counselor_divisions_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `divisions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `guidance_counselor_divisions_guidance_counselor_id_foreign` FOREIGN KEY (`guidance_counselor_id`) REFERENCES `guidance_counselors` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `homework`
--
ALTER TABLE `homework`
  ADD CONSTRAINT `homework_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `divisions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `homework_level_id_foreign` FOREIGN KEY (`level_id`) REFERENCES `levels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `homework_semester_id_foreign` FOREIGN KEY (`semester_id`) REFERENCES `semesters` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `homework_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `stages` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `levels`
--
ALTER TABLE `levels`
  ADD CONSTRAINT `levels_parent_level_foreign` FOREIGN KEY (`parent_level`) REFERENCES `levels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `levels_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `stages` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `parent_accounts`
--
ALTER TABLE `parent_accounts`
  ADD CONSTRAINT `parent_accounts_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `parents` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `parent_notifications`
--
ALTER TABLE `parent_notifications`
  ADD CONSTRAINT `parent_notifications_parent_account_id_foreign` FOREIGN KEY (`parent_account_id`) REFERENCES `parent_accounts` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `role_permissions`
--
ALTER TABLE `role_permissions`
  ADD CONSTRAINT `role_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- القيود للجدول `school_programs`
--
ALTER TABLE `school_programs`
  ADD CONSTRAINT `school_programs_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `divisions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `school_programs_level_id_foreign` FOREIGN KEY (`level_id`) REFERENCES `levels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `school_programs_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `stages` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `semesters`
--
ALTER TABLE `semesters`
  ADD CONSTRAINT `semester_academic_year_id_academic_year_id_foreign` FOREIGN KEY (`academic_year_id`) REFERENCES `academic_years` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `semester_exams`
--
ALTER TABLE `semester_exams`
  ADD CONSTRAINT `semester_exams_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `divisions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `semester_exams_semester_id_foreign` FOREIGN KEY (`semester_id`) REFERENCES `semesters` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `semester_exams_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `stages` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `students`
--
ALTER TABLE `students`
  ADD CONSTRAINT `students_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `divisions` (`id`),
  ADD CONSTRAINT `students_father_id_foreign` FOREIGN KEY (`father_id`) REFERENCES `parents` (`id`),
  ADD CONSTRAINT `students_mother_id_foreign` FOREIGN KEY (`mother_id`) REFERENCES `parents` (`id`),
  ADD CONSTRAINT `students_religion_id_foreign` FOREIGN KEY (`religion_id`) REFERENCES `religions` (`id`);

--
-- القيود للجدول `student_exam_grades`
--
ALTER TABLE `student_exam_grades`
  ADD CONSTRAINT `student_exam_grades_material_id_foreign` FOREIGN KEY (`material_id`) REFERENCES `study_materials` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_exam_grades_semester_exam_id_foreign` FOREIGN KEY (`semester_exam_id`) REFERENCES `semester_exams` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_exam_grades_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `student_financial_records`
--
ALTER TABLE `student_financial_records`
  ADD CONSTRAINT `student_financial_records_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_financial_records_transaction_type_id_foreign` FOREIGN KEY (`transaction_type_id`) REFERENCES `transaction_types` (`id`);

--
-- القيود للجدول `student_grades`
--
ALTER TABLE `student_grades`
  ADD CONSTRAINT `student_grades_material_id_foreign` FOREIGN KEY (`material_id`) REFERENCES `study_materials` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_grades_semester_id_foreign` FOREIGN KEY (`semester_id`) REFERENCES `semesters` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_grades_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `student_health_records`
--
ALTER TABLE `student_health_records`
  ADD CONSTRAINT `student_health_records_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `student_languages`
--
ALTER TABLE `student_languages`
  ADD CONSTRAINT `student_languages_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_languages_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `student_levels`
--
ALTER TABLE `student_levels`
  ADD CONSTRAINT `student_levels_level_id_foreign` FOREIGN KEY (`level_id`) REFERENCES `levels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_levels_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `student_nationalities`
--
ALTER TABLE `student_nationalities`
  ADD CONSTRAINT `student_nationalities_nationality_id_foreign` FOREIGN KEY (`nationality_id`) REFERENCES `nationalities` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_nationalities_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `student_notes`
--
ALTER TABLE `student_notes`
  ADD CONSTRAINT `student_notes_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `student_transportations`
--
ALTER TABLE `student_transportations`
  ADD CONSTRAINT `student_transportations_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_transportations_transportation_id_foreign` FOREIGN KEY (`transportation_id`) REFERENCES `transportations` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `study_materials`
--
ALTER TABLE `study_materials`
  ADD CONSTRAINT `study_materials_level_id_foreign` FOREIGN KEY (`level_id`) REFERENCES `levels` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `temporary_users_permissions`
--
ALTER TABLE `temporary_users_permissions`
  ADD CONSTRAINT `temporary_users_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `temporary_users_permissions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- القيود للجدول `users_permissions`
--
ALTER TABLE `users_permissions`
  ADD CONSTRAINT `users_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `users_permissions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
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 */;
