-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 24, 2025 at 08:45 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

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: `school`
--

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

--
-- Table structure for table `attendance_data`
--

CREATE TABLE `attendance_data` (
  `id` int(11) UNSIGNED NOT NULL,
  `class_id` int(11) NOT NULL,
  `class_section_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `date` date NOT NULL,
  `status` enum('present','absent','late') NOT NULL DEFAULT 'present',
  `reason` text DEFAULT NULL,
  `reported` tinyint(4) DEFAULT NULL,
  `semester` varchar(25) NOT NULL,
  `school_year` varchar(9) NOT NULL,
  `modified_by` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `attendance_data`
--

INSERT INTO `attendance_data` (`id`, `class_id`, `class_section_id`, `student_id`, `school_id`, `date`, `status`, `reason`, `reported`, `semester`, `school_year`, `modified_by`, `created_at`, `updated_at`) VALUES
(8, 0, 120, 136, '2500047', '2025-08-10', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:20:47'),
(9, 0, 120, 124, '2500035', '2025-08-10', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:20:47'),
(10, 0, 120, 107, '2500009', '2025-08-10', 'absent', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:20:47'),
(11, 0, 120, 114, '2500015', '2025-08-10', 'absent', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:20:47'),
(12, 0, 120, 110, '2500012', '2025-08-10', 'absent', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:20:47'),
(13, 0, 120, 112, '2500014', '2025-08-10', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:20:47'),
(14, 0, 120, 120, '2500019', '2025-08-10', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:20:48'),
(15, 0, 120, 116, '2500010', '2025-08-10', 'late', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:20:48'),
(16, 0, 120, 118, '2500017', '2025-08-10', 'late', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:20:48'),
(17, 0, 120, 123, '2500022', '2025-08-10', 'absent', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:20:48'),
(18, 0, 120, 117, '2500016', '2025-08-10', 'late', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:20:48'),
(19, 0, 120, 125, '2500038', '2025-08-10', 'absent', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:20:48'),
(20, 0, 120, 115, '2500011', '2025-08-10', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:20:48'),
(21, 0, 120, 119, '2500018', '2025-08-10', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:20:48'),
(22, 0, 120, 136, '2500047', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:10', '2025-08-12 03:30:10'),
(23, 0, 120, 124, '2500035', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:10', '2025-08-12 03:30:10'),
(24, 0, 120, 107, '2500009', '2025-08-12', 'absent', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:10', '2025-08-12 03:30:10'),
(25, 0, 120, 114, '2500015', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:10', '2025-08-12 03:30:10'),
(26, 0, 120, 110, '2500012', '2025-08-12', 'absent', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11'),
(27, 0, 120, 112, '2500014', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11'),
(28, 0, 120, 120, '2500019', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11'),
(29, 0, 120, 116, '2500010', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11'),
(30, 0, 120, 118, '2500017', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11'),
(31, 0, 120, 123, '2500022', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11'),
(32, 0, 120, 117, '2500016', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11'),
(33, 0, 120, 125, '2500038', '2025-08-12', 'absent', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11'),
(34, 0, 120, 115, '2500011', '2025-08-12', 'late', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11'),
(35, 0, 120, 119, '2500018', '2025-08-12', 'present', '', NULL, 'Fall', '2025-2026', 148, '2025-08-12 03:30:11', '2025-08-12 03:30:11');

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

--
-- Table structure for table `attendance_record`
--

CREATE TABLE `attendance_record` (
  `id` int(11) UNSIGNED NOT NULL,
  `class_section_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `total_absence` int(11) NOT NULL DEFAULT 0,
  `total_late` int(11) NOT NULL DEFAULT 0,
  `total_presence` int(11) NOT NULL DEFAULT 0,
  `total_attendance` int(11) NOT NULL DEFAULT 0,
  `semester` varchar(25) NOT NULL,
  `school_year` varchar(9) NOT NULL,
  `modified_by` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `attendance_record`
--

INSERT INTO `attendance_record` (`id`, `class_section_id`, `student_id`, `school_id`, `total_absence`, `total_late`, `total_presence`, `total_attendance`, `semester`, `school_year`, `modified_by`, `created_at`, `updated_at`) VALUES
(7, 120, 136, '2500047', 0, 0, 2, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:30:10'),
(8, 120, 124, '2500035', 0, 0, 2, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:30:10'),
(9, 120, 107, '2500009', 2, 0, 0, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:30:10'),
(10, 120, 114, '2500015', 1, 0, 1, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:30:11'),
(11, 120, 110, '2500012', 2, 0, 0, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:30:11'),
(12, 120, 112, '2500014', 0, 0, 2, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:47', '2025-08-12 03:30:11'),
(13, 120, 120, '2500019', 0, 0, 2, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:30:11'),
(14, 120, 116, '2500010', 0, 1, 1, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:30:11'),
(15, 120, 118, '2500017', 0, 1, 1, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:30:11'),
(16, 120, 123, '2500022', 1, 0, 1, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:30:11'),
(17, 120, 117, '2500016', 0, 1, 1, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:30:11'),
(18, 120, 125, '2500038', 2, 0, 0, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:30:11'),
(19, 120, 115, '2500011', 0, 1, 1, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:30:11'),
(20, 120, 119, '2500018', 0, 0, 2, 2, 'Fall', '2025-2026', 148, '2025-08-12 03:20:48', '2025-08-12 03:30:12');

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

--
-- Table structure for table `attendance_tracking`
--

CREATE TABLE `attendance_tracking` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `is_reported` tinyint(1) NOT NULL DEFAULT 0,
  `reason` text DEFAULT NULL,
  `is_notified` tinyint(1) NOT NULL DEFAULT 0,
  `notif_counter` int(11) NOT NULL DEFAULT 0,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `semester` varchar(25) DEFAULT NULL,
  `school_year` varchar(25) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `attendance_tracking`
--

INSERT INTO `attendance_tracking` (`id`, `student_id`, `date`, `is_reported`, `reason`, `is_notified`, `notif_counter`, `created_at`, `updated_at`, `semester`, `school_year`) VALUES
(1, 107, '2025-08-12', 0, '2 absences in 3-week streak', 0, 0, '2025-08-19 21:58:37', '2025-08-19 21:58:37', 'Fall', '2025-2026'),
(2, 107, '2025-08-10', 0, '2 absences in 3-week streak', 0, 0, '2025-08-19 21:58:37', '2025-08-19 21:58:37', 'Fall', '2025-2026'),
(3, 110, '2025-08-12', 0, '2 absences in 3-week streak', 0, 0, '2025-08-19 21:58:38', '2025-08-19 21:58:38', 'Fall', '2025-2026'),
(4, 110, '2025-08-10', 0, '2 absences in 3-week streak', 0, 0, '2025-08-19 21:58:38', '2025-08-19 21:58:38', 'Fall', '2025-2026'),
(5, 125, '2025-08-12', 0, '2 absences in 3-week streak', 0, 0, '2025-08-19 21:58:38', '2025-08-19 21:58:38', 'Fall', '2025-2026'),
(6, 125, '2025-08-10', 0, '2 absences in 3-week streak', 0, 0, '2025-08-19 21:58:38', '2025-08-19 21:58:38', 'Fall', '2025-2026');

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

--
-- Table structure for table `authorized_users`
--

CREATE TABLE `authorized_users` (
  `id` int(11) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `authorized_user_id` int(11) DEFAULT NULL,
  `firstname` varchar(255) NOT NULL,
  `lastname` varchar(255) NOT NULL,
  `phone_number` varchar(25) NOT NULL,
  `gender` varchar(10) NOT NULL,
  `email` varchar(255) NOT NULL,
  `relation_to_user` varchar(64) DEFAULT NULL,
  `token` varchar(128) DEFAULT NULL,
  `status` enum('Pending','Active') DEFAULT 'Pending',
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `calendar_events`
--

CREATE TABLE `calendar_events` (
  `id` int(11) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `date` date NOT NULL,
  `description` text DEFAULT NULL,
  `notify_parent` tinyint(1) NOT NULL DEFAULT 0,
  `notify_admin` tinyint(1) NOT NULL DEFAULT 0,
  `notify_teacher` tinyint(1) NOT NULL DEFAULT 0,
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `notification_sent` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `calendar_events`
--

INSERT INTO `calendar_events` (`id`, `title`, `date`, `description`, `notify_parent`, `notify_admin`, `notify_teacher`, `semester`, `school_year`, `notification_sent`, `created_at`, `updated_at`) VALUES
(4, 'First Day of School', '2025-09-21', '', 0, 0, 0, 'Fall', '2025-2026', 0, '2025-07-27 17:30:03', '2025-07-27 17:30:03'),
(5, 'Last Day of Registration', '2025-10-01', 'Registration ends at midnight', 0, 0, 0, 'Fall', '2025-2026', 0, '2025-07-27 17:32:00', '2025-07-27 17:32:00'),
(6, 'November Break', '2025-11-30', '', 0, 0, 0, 'Fall', '2025-2026', 0, '2025-07-27 17:32:26', '2025-07-27 17:32:26'),
(7, 'Winter Break 1', '2025-12-21', '', 0, 0, 0, 'Fall', '2025-2026', 0, '2025-07-27 17:32:47', '2025-07-27 17:32:47'),
(8, 'Winter Break 2', '2025-12-28', '', 0, 0, 0, 'Fall', '2025-2026', 0, '2025-07-27 17:33:08', '2025-07-27 17:33:08'),
(9, 'Midterm Exam', '2026-01-18', '', 0, 0, 0, 'Fall', '2025-2026', 0, '2025-07-27 17:33:22', '2025-07-27 17:33:57'),
(10, 'February Break', '2026-02-15', '', 0, 0, 0, 'Fall', '2025-2026', 0, '2025-07-27 17:34:17', '2025-07-27 17:34:17'),
(11, 'Ramadan Last 10 Break', '2026-03-15', '', 0, 0, 0, 'Fall', '2025-2026', 0, '2025-07-27 17:34:43', '2025-07-27 17:34:54'),
(12, 'Eid Al-Fitr Break', '2026-03-22', '', 0, 0, 0, 'Fall', '2024-2025', 0, '2025-07-27 17:35:15', '2025-07-27 17:35:15'),
(13, 'April Break', '2026-04-19', '', 0, 0, 0, 'Fall', '2024-2025', 0, '2025-07-27 17:35:34', '2025-07-27 17:35:34'),
(14, 'Final Exam', '2026-05-17', '', 0, 0, 0, 'Fall', '2024-2025', 0, '2025-07-27 17:35:49', '2025-07-27 17:36:29'),
(15, 'May Break', '2026-05-24', '', 0, 0, 0, 'Fall', '2024-2025', 0, '2025-07-27 17:36:09', '2025-07-27 17:36:39'),
(16, 'Ceremony Day', '2026-05-31', 'Last Day of School', 0, 0, 0, 'Fall', '2024-2025', 0, '2025-07-27 17:37:14', '2025-07-27 17:39:39');

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

--
-- Table structure for table `chapters`
--

CREATE TABLE `chapters` (
  `id` int(11) UNSIGNED NOT NULL,
  `chapter_name` varchar(100) NOT NULL,
  `class_section_id` int(11) NOT NULL,
  `school_year` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `classes`
--

CREATE TABLE `classes` (
  `id` int(11) UNSIGNED NOT NULL,
  `class_name` varchar(100) NOT NULL,
  `schedule` varchar(100) NOT NULL,
  `capacity` int(11) NOT NULL,
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `classes`
--

INSERT INTO `classes` (`id`, `class_name`, `schedule`, `capacity`, `semester`, `school_year`) VALUES
(1, '1', 'Sunday 10:00 AM - 1:00 PM', 30, '', '-1'),
(2, '2', 'Sunday 10:00 AM - 1:00 PM', 30, '', '-1'),
(3, '3', 'Sunday 10:00 AM - 1:00 PM', 30, '', '-1'),
(4, '4', 'Sunday 10:00 AM - 1:00 PM', 30, '', '-1'),
(5, '5', 'Sunday 10:00 PM - 1:00 PM', 30, '', '-1'),
(6, '6', 'Sunday 10:00 PM - 1:00 PM', 30, '', '-1'),
(7, '7', 'Sunday 10:00 AM - 1:00 PM', 30, '', '-1'),
(8, '8', 'Sunday 10:00 AM - 1:00 PM', 30, '', '-1'),
(9, '9', 'Sunday 10:00 PM - 1:00 PM', 30, '', '-1'),
(10, '10', 'Sunday 10:00 AM - 1:00 PM', 30, '', '-1'),
(11, '11', 'Sunday 10:00 AM - 1:00 PM', 30, '', '-1'),
(12, 'youth', 'Sunday 10:00 AM - 1:00 PM', 30, '', '-1');

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

--
-- Table structure for table `classSection`
--

CREATE TABLE `classSection` (
  `id` int(11) UNSIGNED NOT NULL,
  `class_id` int(11) UNSIGNED NOT NULL,
  `class_section_id` int(11) UNSIGNED NOT NULL,
  `class_section_name` varchar(100) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `classSection`
--

INSERT INTO `classSection` (`id`, `class_id`, `class_section_id`, `class_section_name`, `created_at`, `updated_at`, `semester`, `school_year`) VALUES
(1, 1, 10, '1', '2024-08-16 01:06:30', '2024-08-23 16:30:43', '', NULL),
(2, 1, 11, '1-A', '2024-08-16 01:06:30', '2024-08-23 17:15:54', '', NULL),
(3, 1, 12, '1-B', '2024-08-16 01:06:30', '2024-08-23 17:15:54', '', NULL),
(4, 1, 13, '1-C', '2024-08-16 01:06:30', '2024-08-23 17:15:54', '', NULL),
(5, 2, 20, '2', '2024-08-16 01:06:30', '2024-08-23 17:16:30', '', NULL),
(6, 2, 21, '2-A', '2024-08-16 01:06:30', '2024-08-23 17:16:30', '', NULL),
(7, 2, 22, '2-B', '2024-08-16 01:06:30', '2024-08-23 17:16:30', '', NULL),
(8, 2, 23, '2-C', '2024-08-16 01:06:30', '2024-08-23 17:16:30', '', NULL),
(9, 3, 30, '3', '2024-08-16 01:06:30', '2024-08-23 17:18:14', '', NULL),
(10, 3, 31, '3-A', '2024-08-16 01:06:30', '2024-08-23 17:18:14', '', NULL),
(11, 3, 32, '3-B', '2024-08-16 01:06:30', '2024-08-23 17:18:14', '', NULL),
(12, 3, 33, '3-C', '2024-08-16 01:06:30', '2024-08-23 17:18:14', '', NULL),
(13, 4, 40, '4', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(14, 4, 41, '4-A', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(15, 4, 42, '4-B', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(16, 4, 43, '4-C', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(17, 5, 50, '5', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(18, 5, 51, '5-A', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(19, 5, 52, '5-B', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(20, 5, 53, '', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(21, 6, 60, '6', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(22, 6, 61, '6-A', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(23, 6, 62, '6-B', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(24, 6, 63, '6-C', '2024-08-16 01:06:30', '2024-08-23 17:19:31', '', NULL),
(25, 7, 70, '7', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(26, 7, 71, '7-A', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(27, 7, 72, '7-B', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(28, 7, 73, '7-C', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(29, 8, 80, '8', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(30, 8, 81, '8-A', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(31, 8, 82, '8-B', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(32, 8, 83, '8-C', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(33, 9, 90, '9', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(34, 9, 91, '9-A', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(35, 9, 92, '9-B', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(36, 9, 93, '9-C', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(37, 10, 100, '10', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(38, 10, 101, '10-A', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(39, 10, 102, '10-B', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(40, 10, 103, '10-C', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(41, 11, 110, '11', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(42, 11, 111, '11-A', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(43, 11, 112, '11-B', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(44, 11, 113, '11-C', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(45, 12, 120, 'youth', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(46, 12, 121, 'youth-A', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(47, 12, 122, 'youth-B', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL),
(48, 12, 123, 'youth-C', '2024-08-16 01:06:30', '2024-08-23 17:21:41', '', NULL);

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

--
-- Table structure for table `class_preparation_log`
--

CREATE TABLE `class_preparation_log` (
  `id` int(10) UNSIGNED NOT NULL,
  `class_section_id` int(10) UNSIGNED NOT NULL,
  `class_section` varchar(100) DEFAULT NULL,
  `school_year` varchar(9) NOT NULL,
  `prep_data` text NOT NULL,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `class_preparation_log`
--

INSERT INTO `class_preparation_log` (`id`, `class_section_id`, `class_section`, `school_year`, `prep_data`, `created_at`) VALUES
(4, 120, 'youth', '2024-2025', '{\"White board\":1,\"Gray box\":1,\"Big tables\":1,\"Regular chairs\":3}', '2025-08-07 02:11:03'),
(5, 120, 'youth', '2025-2026', '{\"White board\":1,\"Gray box\":1,\"Big tables\":4,\"Regular chairs\":16}', '2025-08-11 03:52:58'),
(6, 11, '1-A', '2025-2026', '{\"White board\":1,\"Gray box\":1,\"Small tables\":1,\"Small chairs\":3,\"Regular chairs\":2}', '2025-08-15 04:42:50'),
(7, 23, '2-C', '2025-2026', '{\"White board\":1,\"Gray box\":1,\"Small tables\":1,\"Small chairs\":4,\"Regular chairs\":2}', '2025-08-19 21:29:08');

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

--
-- Table structure for table `configuration`
--

CREATE TABLE `configuration` (
  `id` int(11) UNSIGNED NOT NULL,
  `config_key` varchar(100) NOT NULL,
  `config_value` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `configuration`
--

INSERT INTO `configuration` (`id`, `config_key`, `config_value`) VALUES
(14, 'school_start_date', '2025-09-01'),
(13, 'delete_email_notify', 'support@alrahmaisgl.org, melabidi@alrahmaisgl.org'),
(11, 'refund_deadline', '2025-12-31'),
(10, 'total_semester2_days', '13'),
(9, 'total_semester1_days', '14'),
(8, 'semester', 'Fall'),
(7, 'youth_fee', '200'),
(6, 'second_student_fee', '220'),
(5, 'first_student_fee', '370'),
(4, 'school_year', '2025-2026'),
(3, 'cleanup_timeout', '900'),
(2, 'enrollment_deadline', '2025-09-30'),
(1, 'max_kids', '5'),
(15, 'max_age', '18'),
(16, 'min_age', '5'),
(17, 'trophy_score', '94'),
(18, 'pass_score', '60'),
(19, 'weeks_study', '35'),
(20, 'end_school_day', '2026-06-01'),
(21, 'due_date', '2026-03-01'),
(22, 'max_emergency', '2'),
(23, 'comment_reviewer', 'administrator, principal'),
(24, 'production_tokenurl_paypal', 'https://api-m.paypal.com/v1/oauth2/token'),
(25, 'production_clientid_paypal', 'AQhCgmypaitgLgretMqNrh_7mEG5fAmwCECxCxevuLDQfsQVwECFyQOU50byzPzFrwd0cVVD8r2lujIB'),
(26, 'production_secret_paypal', '[REDACTED]'),
(27, 'production_webhookid_paypal', '0H5876426L0092829'),
(28, 'production_verifylink_paypal', 'https://api-m.paypal.com/v1/notifications/verify-webhook-signature'),
(29, 'sandbox_webhookid_paypal', '0EU27043LC060650D'),
(30, 'sandbox_clientid_paypal', 'AYsiOekZUvrjgx9C5c554ZeSQ4W6yd0ZX-OHE93_D0fWoa4YXrMmroEeLiAjjdCKkELH8EVZR_yGMLPS'),
(31, 'sandbox_secret_paypal', '[REDACTED]'),
(32, 'sandbox_verifylink_paypal', 'https://api-m.sandbox.paypal.com/v1/notifications/verify-webhook-signature'),
(33, 'sandbox_tokenurl_paypal', 'https://api-m.sandbox.paypal.com/v1/oauth2/token'),
(34, 'paypal_mode', 'sandbox'),
(35, 'date_age_reference', '2025-12-31'),
(36, 'stickerWidth', '102'),
(37, 'stickerHeight', '34'),
(38, 'pageWidth', '216'),
(39, 'pageHeight', '280'),
(40, 'leftMargin', '4'),
(41, 'topMargin', '19'),
(42, 'horizontalGap', '5'),
(43, 'verticalGap', '0'),
(44, 'enable_attendance', '0');

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

--
-- Table structure for table `contactus`
--

CREATE TABLE `contactus` (
  `id` int(11) UNSIGNED NOT NULL,
  `sender_id` int(11) UNSIGNED NOT NULL,
  `reciever_id` int(11) UNSIGNED NOT NULL,
  `subject` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `current_flag`
--

CREATE TABLE `current_flag` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `student_name` varchar(255) NOT NULL,
  `grade` varchar(50) NOT NULL,
  `flag` enum('payment','attendance','grade','behavior','other') NOT NULL,
  `flag_datetime` datetime NOT NULL,
  `flag_state` enum('Open','Closed','Canceled') DEFAULT 'Open',
  `updated_by_open` int(11) DEFAULT NULL,
  `open_description` text DEFAULT NULL,
  `updated_by_closed` int(11) DEFAULT NULL,
  `close_description` text DEFAULT NULL,
  `updated_by_canceled` int(11) DEFAULT NULL,
  `cancel_description` text DEFAULT NULL,
  `semester` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `school_year` varchar(9) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `discount_usages`
--

CREATE TABLE `discount_usages` (
  `id` int(11) UNSIGNED NOT NULL,
  `voucher_id` int(11) NOT NULL,
  `invoice_id` int(11) UNSIGNED NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `discount_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `school_year` varchar(9) NOT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `used_at` datetime DEFAULT current_timestamp(),
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp(),
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `discount_vouchers`
--

CREATE TABLE `discount_vouchers` (
  `id` int(11) UNSIGNED NOT NULL,
  `code` varchar(50) NOT NULL,
  `discount_type` enum('percent','fixed') NOT NULL DEFAULT 'percent',
  `discount_value` decimal(10,2) NOT NULL,
  `max_uses` int(11) DEFAULT 1,
  `times_used` int(11) DEFAULT 0,
  `valid_from` date DEFAULT NULL,
  `valid_until` date DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `emergency_contacts`
--

CREATE TABLE `emergency_contacts` (
  `id` int(11) UNSIGNED NOT NULL,
  `emergency_contact_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `cellphone` varchar(20) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `relation` varchar(50) NOT NULL,
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `emergency_contacts`
--

INSERT INTO `emergency_contacts` (`id`, `emergency_contact_name`, `parent_id`, `cellphone`, `email`, `relation`, `semester`, `school_year`, `created_at`, `updated_at`) VALUES
(26, 'Moulay Elabidi', 108, '(617)-309-6743', 'moulay@gmail.com', 'Father', 'Fall', '2025-2026', '2025-05-13 22:33:17', '2025-05-13 22:33:17'),
(27, 'Moulay Ellabi', 110, '(617)-309-6743', 'asdsgdg46@gmail.com', 'Other', 'Fall', '2025-2026', '2025-05-14 01:03:49', '2025-05-14 01:03:49'),
(28, 'Fg Gg', 111, '(566)-566-6653', 'asdhljkh464@gmail.com', 'Grand Mother', 'Fall', '2025-2026', '2025-05-14 01:43:38', '2025-05-14 01:43:38'),
(29, 'Moulay Elabidi', 114, '(617)-309-6743', 'testas@gmail.com', 'Father', 'Fall', '2025-2026', '2025-05-18 04:04:54', '2025-05-18 04:04:54'),
(30, 'Vvn Dvcdv', 115, '(781)-485-6024', 'domran@gmail.com', 'Mother', 'Fall', '2025-2026', '2025-05-20 01:21:31', '2025-05-20 01:21:31'),
(31, 'Ebad Rahman', 119, '6038602854', 'ajawak67@gmail.com', 'Father', 'Fall', '2025-2026', '2025-06-28 21:49:22', '2025-06-28 21:49:22'),
(32, 'Amina Quadri', 119, '(630)-780-9427', 'amina.quadri@gmail.com', 'Parent', 'Fall', '2025-2026', '2025-07-20 15:02:31', '2025-07-20 15:02:31'),
(33, 'Ahmed Abdalaoui', 150, '(617)-415-3666', 'ahmedabdalaoui@gmail.com', 'Parent', 'Fall', '2025-2026', '2025-07-22 21:33:23', '2025-07-22 21:33:36'),
(35, 'Rrrr Tttt', 121, '(747)-444-7524', '', 'Friend', 'Fall', '2024-2025', '2025-08-02 02:42:54', '2025-08-02 02:42:54');

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

--
-- Table structure for table `enrollments`
--

CREATE TABLE `enrollments` (
  `id` int(10) UNSIGNED NOT NULL,
  `student_id` int(10) UNSIGNED NOT NULL,
  `class_section_id` int(10) UNSIGNED DEFAULT NULL,
  `parent_id` int(10) UNSIGNED NOT NULL,
  `enrollment_date` date NOT NULL,
  `enrollment_status` enum('admission under review','payment pending','Enrolled','withdraw under review','refund pending','withdrawn') NOT NULL DEFAULT 'admission under review',
  `withdrawal_date` date DEFAULT NULL,
  `is_withdrawn` tinyint(1) NOT NULL DEFAULT 0,
  `admission_status` enum('pending','accepted','denied') NOT NULL DEFAULT 'pending',
  `semester` varchar(25) DEFAULT NULL,
  `school_year` varchar(25) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `enrollments`
--

INSERT INTO `enrollments` (`id`, `student_id`, `class_section_id`, `parent_id`, `enrollment_date`, `enrollment_status`, `withdrawal_date`, `is_withdrawn`, `admission_status`, `semester`, `school_year`, `created_at`, `updated_at`) VALUES
(1, 136, 120, 121, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(2, 107, 120, 108, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(3, 110, 120, 110, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(4, 112, 120, 110, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(5, 114, 120, 111, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(6, 115, 120, 111, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(7, 116, 120, 111, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(8, 117, 120, 111, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(9, 118, 120, 114, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(10, 119, 120, 114, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(11, 120, 120, 115, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(12, 123, 120, 119, '2025-08-08', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-08 05:06:21', '2025-08-12 23:12:03'),
(13, 127, 11, 148, '2025-08-12', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-12 23:10:18', '2025-08-12 23:12:18'),
(14, 128, 11, 148, '2025-08-12', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-12 23:10:18', '2025-08-12 23:12:24'),
(15, 129, 11, 148, '2025-08-12', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-12 23:10:19', '2025-08-12 23:12:30'),
(16, 130, 23, 148, '2025-08-12', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-12 23:10:19', '2025-08-19 03:18:42'),
(17, 131, 23, 148, '2025-08-12', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-12 23:10:19', '2025-08-19 03:18:49'),
(18, 132, 23, 148, '2025-08-12', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-12 23:10:19', '2025-08-19 03:18:55'),
(19, 133, 23, 148, '2025-08-12', 'payment pending', NULL, 0, 'accepted', 'Fall', '2025-2026', '2025-08-12 23:10:19', '2025-08-19 03:19:03');

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

--
-- Table structure for table `events`
--

CREATE TABLE `events` (
  `id` int(11) UNSIGNED NOT NULL,
  `event_name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `flyer` varchar(255) DEFAULT NULL,
  `expiration_date` date NOT NULL,
  `semester` varchar(50) DEFAULT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `created_by` int(11) UNSIGNED DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `event_charges`
--

CREATE TABLE `event_charges` (
  `id` int(11) UNSIGNED NOT NULL,
  `event_id` int(11) UNSIGNED NOT NULL,
  `parent_id` int(11) UNSIGNED DEFAULT NULL,
  `student_id` int(11) UNSIGNED DEFAULT NULL,
  `participation` enum('yes','no') DEFAULT NULL,
  `charged` tinyint(1) DEFAULT 0,
  `semester` varchar(50) DEFAULT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `updated_by` int(11) UNSIGNED DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `examquestiondistribution`
--

CREATE TABLE `examquestiondistribution` (
  `exam_distribution_id` int(11) NOT NULL,
  `exam_id` int(11) NOT NULL,
  `question_type_id` int(11) NOT NULL,
  `num_questions` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `examquestions`
--

CREATE TABLE `examquestions` (
  `exam_question_id` int(11) NOT NULL,
  `exam_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `exams`
--

CREATE TABLE `exams` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` char(36) NOT NULL,
  `student_school_id` char(36) NOT NULL,
  `class_section_id` int(11) NOT NULL,
  `exam_name` varchar(100) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` int(11) UNSIGNED NOT NULL,
  `category` enum('Expense','Purchase','Reimbursement') NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `receipt_path` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `purchased_by` int(11) UNSIGNED DEFAULT NULL,
  `added_by` int(11) UNSIGNED NOT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL,
  `status` enum('pending','approved','denied') NOT NULL DEFAULT 'pending',
  `status_reason` text DEFAULT NULL,
  `updated_by` int(11) UNSIGNED DEFAULT NULL,
  `approved_by` int(11) UNSIGNED DEFAULT NULL,
  `reimbursement_id` int(11) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `final_exam`
--

CREATE TABLE `final_exam` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `class_section_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) NOT NULL,
  `score` float DEFAULT NULL,
  `semester` varchar(25) NOT NULL DEFAULT 'Spring',
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `final_score`
--

CREATE TABLE `final_score` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `class_section_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) NOT NULL,
  `score` float NOT NULL,
  `score_letter` varchar(9) DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `school_year` varchar(9) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `semester` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `final_score`
--

INSERT INTO `final_score` (`id`, `student_id`, `school_id`, `class_section_id`, `teacher_id`, `score`, `score_letter`, `comment`, `school_year`, `created_at`, `updated_at`, `semester`) VALUES
(1, 123, '', 11, 109, 80, 'B', NULL, '2024-2025', '2025-07-04 06:33:10', '2025-07-17 02:48:13', 'Fall'),
(2, 123, '', 30, 120, 90.34, 'A', NULL, '2024-2025', '2025-07-25 05:06:46', '2025-07-25 05:29:29', 'Fall'),
(3, 118, '', 30, 120, 88.86, 'B', NULL, '2024-2025', '2025-07-25 05:06:46', '2025-07-25 05:29:29', 'Fall'),
(4, 112, '', 30, 120, 86.9, 'B', NULL, '2024-2025', '2025-07-25 05:06:46', '2025-07-25 05:29:29', 'Fall'),
(5, 107, '', 60, 109, 94.58, 'A', NULL, '2024-2025', '2025-07-25 05:32:07', '2025-07-25 05:39:35', 'Fall'),
(6, 110, '', 60, 109, 83.84, 'B', NULL, '2024-2025', '2025-07-25 05:32:07', '2025-07-25 05:39:35', 'Fall'),
(7, 111, '', 60, 109, 77.82, 'C', NULL, '2024-2025', '2025-07-25 05:32:07', '2025-07-25 05:39:35', 'Fall');

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

--
-- Table structure for table `flag`
--

CREATE TABLE `flag` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `student_name` varchar(255) NOT NULL,
  `grade` varchar(50) NOT NULL,
  `flag` enum('payment','attendance','grade','behavior','other') NOT NULL,
  `flag_datetime` datetime NOT NULL,
  `flag_state` enum('Closed','Canceled') NOT NULL,
  `updated_by_open` int(11) DEFAULT NULL,
  `open_description` text DEFAULT NULL,
  `updated_by_closed` int(11) DEFAULT NULL,
  `close_description` text DEFAULT NULL,
  `updated_by_canceled` int(11) DEFAULT NULL,
  `cancel_description` text DEFAULT NULL,
  `semester` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `school_year` varchar(9) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `homework`
--

CREATE TABLE `homework` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `class_section_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) NOT NULL,
  `homework_index` tinyint(4) DEFAULT NULL,
  `score` float DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `semester` varchar(25) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `homework`
--

INSERT INTO `homework` (`id`, `student_id`, `school_id`, `class_section_id`, `teacher_id`, `homework_index`, `score`, `comment`, `semester`, `school_year`, `created_at`, `updated_at`) VALUES
(1, 118, '2500017', 30, 120, 1, 78, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(2, 118, '2500017', 30, 120, 2, 100, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(3, 118, '2500017', 30, 120, 3, 61, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(4, 118, '2500017', 30, 120, 4, 95, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(5, 112, '2500014', 30, 120, 1, 34, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(6, 112, '2500014', 30, 120, 2, 88, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(7, 112, '2500014', 30, 120, 3, 99, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(8, 112, '2500014', 30, 120, 4, 70, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(9, 123, '2500022', 30, 120, 1, 92, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(10, 123, '2500022', 30, 120, 2, 96, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(11, 123, '2500022', 30, 120, 3, 80, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(12, 123, '2500022', 30, 120, 4, 60, NULL, 'Fall', '2024-2025', '2025-07-25 05:20:38', '2025-07-25 05:20:38'),
(13, 107, '2500009', 60, 109, 1, 34, NULL, 'Fall', '2024-2025', '2025-07-25 05:33:36', '2025-07-25 05:33:36'),
(14, 107, '2500009', 60, 109, 2, 96, NULL, 'Fall', '2024-2025', '2025-07-25 05:33:36', '2025-07-25 05:33:36'),
(15, 107, '2500009', 60, 109, 3, 60, NULL, 'Fall', '2024-2025', '2025-07-25 05:33:36', '2025-07-25 05:33:36'),
(16, 110, '2500012', 60, 109, 1, 67, NULL, 'Fall', '2024-2025', '2025-07-25 05:33:36', '2025-07-25 05:33:36'),
(17, 110, '2500012', 60, 109, 2, 100, NULL, 'Fall', '2024-2025', '2025-07-25 05:33:36', '2025-07-25 05:33:36'),
(18, 110, '2500012', 60, 109, 3, 84, NULL, 'Fall', '2024-2025', '2025-07-25 05:33:36', '2025-07-25 05:33:36'),
(19, 111, '2500013', 60, 109, 1, 90, NULL, 'Fall', '2024-2025', '2025-07-25 05:33:36', '2025-07-25 05:33:36'),
(20, 111, '2500013', 60, 109, 2, 80, NULL, 'Fall', '2024-2025', '2025-07-25 05:33:36', '2025-07-25 05:33:36'),
(21, 111, '2500013', 60, 109, 3, 79, NULL, 'Fall', '2024-2025', '2025-07-25 05:33:36', '2025-07-25 05:33:36'),
(22, 124, '2500035', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(23, 136, '2500047', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(24, 120, '2500019', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(25, 107, '2500009', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(26, 119, '2500018', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(27, 125, '2500038', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(28, 118, '2500017', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(29, 110, '2500012', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(30, 112, '2500014', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(31, 117, '2500016', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(32, 116, '2500010', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(33, 123, '2500022', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(34, 114, '2500015', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(35, 115, '2500011', 120, 148, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-12 03:21:51', '2025-08-12 03:21:51'),
(36, 131, '2500044', 23, 108, 1, 50, NULL, 'Fall', '2025-2026', '2025-08-24 17:35:11', '2025-08-24 17:46:15'),
(37, 130, '2500043', 23, 108, 1, 99, NULL, 'Fall', '2025-2026', '2025-08-24 17:35:11', '2025-08-24 17:46:15'),
(38, 132, '2500045', 23, 108, 1, 100, NULL, 'Fall', '2025-2026', '2025-08-24 17:35:11', '2025-08-24 17:46:15'),
(39, 133, '2500046', 23, 108, 1, 100, NULL, 'Fall', '2025-2026', '2025-08-24 17:35:11', '2025-08-24 17:46:15'),
(40, 131, '2500044', 23, 108, 2, 99.3, NULL, 'Fall', '2025-2026', '2025-08-24 17:35:26', '2025-08-24 17:46:15'),
(41, 130, '2500043', 23, 108, 2, 99.3, NULL, 'Fall', '2025-2026', '2025-08-24 17:35:26', '2025-08-24 17:46:15'),
(42, 132, '2500045', 23, 108, 2, 99.3, NULL, 'Fall', '2025-2026', '2025-08-24 17:35:26', '2025-08-24 17:46:15'),
(43, 133, '2500046', 23, 108, 2, 99.5, NULL, 'Fall', '2025-2026', '2025-08-24 17:35:26', '2025-08-24 17:46:15');

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

--
-- Table structure for table `invoices`
--

CREATE TABLE `invoices` (
  `id` int(11) UNSIGNED NOT NULL,
  `parent_id` int(11) NOT NULL,
  `invoice_number` varchar(50) NOT NULL,
  `total_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `balance` decimal(10,2) DEFAULT 0.00,
  `paid_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `has_discount` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if discount applied, 0 no discount',
  `issue_date` date NOT NULL,
  `due_date` date DEFAULT NULL,
  `status` varchar(50) NOT NULL DEFAULT '''unpaid''',
  `description` text DEFAULT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  `updated_by` int(11) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `invoices`
--

INSERT INTO `invoices` (`id`, `parent_id`, `invoice_number`, `total_amount`, `balance`, `paid_amount`, `has_discount`, `issue_date`, `due_date`, `status`, `description`, `school_year`, `created_at`, `updated_at`, `updated_by`, `semester`) VALUES
(7, 121, 'INV-2500024-688d7c2f8aee0', 200.00, 200.00, 0.00, 0, '2025-08-02', '2026-03-01', 'unpaid', NULL, '2024-2025', '2025-08-02 02:47:11', '2025-08-02 02:47:11', NULL, 'Fall');

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

--
-- Table structure for table `invoice_event`
--

CREATE TABLE `invoice_event` (
  `id` int(11) UNSIGNED NOT NULL,
  `invoice_id` int(11) UNSIGNED NOT NULL,
  `event_name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `semester` varchar(50) DEFAULT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `updated_by` int(11) UNSIGNED DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `invoice_students_list`
--

CREATE TABLE `invoice_students_list` (
  `id` int(11) UNSIGNED NOT NULL,
  `invoice_id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) UNSIGNED NOT NULL,
  `student_firstname` varchar(100) NOT NULL,
  `student_lastname` varchar(100) NOT NULL,
  `school_id` int(11) UNSIGNED NOT NULL,
  `enrolled` tinyint(1) DEFAULT 1,
  `school_year` varchar(9) NOT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ip_attempts`
--

CREATE TABLE `ip_attempts` (
  `id` int(11) UNSIGNED NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `attempts` int(11) NOT NULL DEFAULT 0,
  `last_attempt_at` datetime NOT NULL,
  `blocked_until` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_attempts`
--

INSERT INTO `ip_attempts` (`id`, `ip_address`, `attempts`, `last_attempt_at`, `blocked_until`, `created_at`, `updated_at`, `school_year`, `semester`) VALUES
(1, '66.31.20.187', 2, '2025-06-28 04:40:34', NULL, '2025-06-28 00:16:53', '2025-06-28 04:40:34', NULL, NULL),
(2, '2601:18f:100:843d:35fc:90ba:2551:83a5', 2, '2025-06-28 04:40:34', NULL, '2025-06-28 04:27:29', '2025-06-28 04:40:34', NULL, NULL),
(3, '191.96.168.175', 1, '2025-06-28 19:00:34', NULL, '2025-06-28 19:00:34', '2025-06-28 19:00:34', NULL, NULL),
(4, '2600:4040:512c:6e00:78e4:ab08:ff4a:8fa9', 1, '2025-06-28 21:44:16', NULL, '2025-06-28 21:44:16', '2025-06-28 21:44:16', NULL, NULL),
(5, '2607:fb91:2d1b:c4c3:4df8:1842:b206:8a0f', 1, '2025-07-12 01:19:36', NULL, '2025-07-12 01:19:36', '2025-07-12 01:19:36', NULL, NULL),
(6, '107.77.223.189', 2, '2025-07-16 06:07:53', NULL, '2025-07-16 06:06:48', '2025-07-16 06:07:53', NULL, NULL),
(8, '71.192.39.32', 1, '2025-07-17 04:07:54', NULL, '2025-07-17 04:07:54', '2025-07-17 04:07:54', NULL, NULL),
(9, '72.74.55.8', 3, '2025-08-02 03:20:19', NULL, '2025-07-18 19:12:11', '2025-08-02 03:20:19', NULL, NULL),
(10, '146.70.59.46', 1, '2025-07-21 23:08:13', NULL, '2025-07-21 23:08:13', '2025-07-21 23:08:13', NULL, NULL),
(11, '2601:18f:802:4af0:9ca6:cc47:1dfd:235f', 2, '2025-07-22 21:23:53', NULL, '2025-07-22 21:18:30', '2025-07-22 21:23:53', NULL, NULL),
(12, '24.62.26.238', 1, '2025-07-23 11:29:10', NULL, '2025-07-23 11:29:10', '2025-07-23 11:29:10', NULL, NULL),
(14, '71.192.32.250', 3, '2025-08-08 18:53:09', NULL, '2025-07-25 05:04:16', '2025-08-08 18:53:09', NULL, NULL);

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

--
-- Table structure for table `login_activity`
--

CREATE TABLE `login_activity` (
  `id` int(11) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `email` varchar(255) NOT NULL,
  `login_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `logout_time` timestamp NULL DEFAULT NULL,
  `ip_address` varchar(255) NOT NULL,
  `user_agent` varchar(255) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `login_activity`
--

INSERT INTO `login_activity` (`id`, `user_id`, `email`, `login_time`, `logout_time`, `ip_address`, `user_agent`, `created_at`, `updated_at`, `semester`, `school_year`) VALUES
(1, 1, 'administrator@gmail.com', '2025-06-28 08:26:54', '2025-06-28 08:26:54', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-06-27 22:41:10', '2025-06-28 04:26:54', '', NULL),
(2, 1, 'administrator@gmail.com', '2025-06-28 08:26:54', '2025-06-28 08:26:54', '166.199.114.25', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-06-28 00:20:37', '2025-06-28 04:26:54', '', NULL),
(3, 1, 'administrator@gmail.com', '2025-06-28 08:26:54', '2025-06-28 08:26:54', '66.31.20.187', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1', '2025-06-28 00:23:03', '2025-06-28 04:26:54', '', NULL),
(4, 1, 'administrator@gmail.com', '2025-06-28 08:26:54', '2025-06-28 08:26:54', '71.192.39.32', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0', '2025-06-28 04:26:50', '2025-06-28 04:26:54', '', NULL),
(5, 109, 'alrahma.isgl@gmail.com', '2025-06-28 08:27:04', '2025-06-28 08:27:04', '71.192.39.32', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0', '2025-06-28 04:26:58', '2025-06-28 04:27:04', '', NULL),
(6, 109, 'alrahma.isgl@gmail.com', '2025-06-28 08:29:08', '2025-06-28 08:29:08', '71.192.39.32', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0', '2025-06-28 04:27:25', '2025-06-28 04:29:08', '', NULL),
(7, 117, 'kousami@gmail.com', '2025-06-28 08:40:10', '2025-06-28 08:40:10', '2601:18f:100:843d:35fc:90ba:2551:83a5', 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1', '2025-06-28 04:27:58', '2025-06-28 04:40:10', '', NULL),
(8, 118, 'kousami@gmail.com', '2025-06-28 08:43:44', NULL, '2601:18f:100:843d:35fc:90ba:2551:83a5', 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1', '2025-06-28 04:43:44', '2025-06-28 04:43:44', '', NULL),
(9, 119, 'rahmanek@gmail.com', '2025-07-20 19:06:36', '2025-07-20 19:06:36', '2600:4040:512c:6e00:78e4:ab08:ff4a:8fa9', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:139.0) Gecko/20100101 Firefox/139.0', '2025-06-28 21:47:33', '2025-07-20 15:06:36', '', NULL),
(10, 1, 'administrator@gmail.com', '2025-07-09 07:15:01', '2025-07-09 07:15:01', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-06-29 03:11:18', '2025-07-09 03:15:01', '', NULL),
(11, 109, 'alrahma.isgl@gmail.com', '2025-07-04 10:33:14', '2025-07-04 10:33:14', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-04 06:33:01', '2025-07-04 06:33:14', '', NULL),
(12, 1, 'administrator@gmail.com', '2025-07-09 07:15:01', '2025-07-09 07:15:01', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-04 06:33:30', '2025-07-09 03:15:01', '', NULL),
(13, 109, 'alrahma.isgl@gmail.com', '2025-07-04 22:51:16', '2025-07-04 22:51:16', '72.74.55.8', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-04 18:49:59', '2025-07-04 18:51:16', '', NULL),
(14, 109, 'alrahma.isgl@gmail.com', '2025-07-04 22:55:58', '2025-07-04 22:55:58', '72.74.55.8', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-04 18:51:33', '2025-07-04 18:55:58', '', NULL),
(15, 1, 'administrator@gmail.com', '2025-07-09 07:15:01', '2025-07-09 07:15:01', '72.74.55.8', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-04 18:56:30', '2025-07-09 03:15:01', '', NULL),
(16, 1, 'administrator@gmail.com', '2025-07-09 07:15:01', '2025-07-09 07:15:01', '71.192.39.32', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Version/18.5 Safari/605.1.15', '2025-07-04 21:59:43', '2025-07-09 03:15:01', '', NULL),
(17, 1, 'administrator@gmail.com', '2025-07-09 07:15:01', '2025-07-09 07:15:01', '66.31.20.187', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-04 23:15:20', '2025-07-09 03:15:01', '', NULL),
(18, 109, 'alrahma.isgl@gmail.com', '2025-07-07 04:28:57', '2025-07-07 04:28:57', '2607:fb91:2d24:46f7:e997:c38c:ab74:a906', 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_8_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.7 Mobile/15E148 Safari/604.1', '2025-07-07 00:26:15', '2025-07-07 00:28:57', '', NULL),
(19, 1, 'administrator@gmail.com', '2025-07-09 07:15:01', '2025-07-09 07:15:01', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-09 03:14:44', '2025-07-09 03:15:01', '', NULL),
(20, 1, 'administrator@gmail.com', '2025-07-09 07:24:10', '2025-07-09 07:24:10', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-09 03:23:52', '2025-07-09 03:24:10', '', NULL),
(21, 1, 'administrator@gmail.com', '2025-07-12 05:51:19', '2025-07-12 05:51:19', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-09 03:24:14', '2025-07-12 01:51:19', '', NULL),
(22, 1, 'administrator@gmail.com', '2025-07-12 05:51:19', '2025-07-12 05:51:19', '71.192.39.32', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-11 19:49:00', '2025-07-12 01:51:19', '', NULL),
(23, 131, 'benouallad@gmail.com', '2025-07-12 05:38:32', NULL, '2607:fb91:2d1b:c4c3:4df8:1842:b206:8a0f', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1', '2025-07-12 01:38:32', '2025-07-12 01:38:32', '', NULL),
(24, 1, 'administrator@gmail.com', '2025-07-12 05:51:19', '2025-07-12 05:51:19', '72.74.55.8', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-12 01:48:40', '2025-07-12 01:51:19', '', NULL),
(25, 1, 'administrator@gmail.com', '2025-07-14 07:03:41', '2025-07-14 07:03:41', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-14 03:01:10', '2025-07-14 03:03:41', '', NULL),
(26, 1, 'administrator@gmail.com', '2025-07-17 01:42:16', '2025-07-17 01:42:16', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-14 03:05:53', '2025-07-16 21:42:16', '', NULL),
(27, 1, 'administrator@gmail.com', '2025-07-17 01:42:16', '2025-07-17 01:42:16', '136.226.74.168', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-16 04:00:36', '2025-07-16 21:42:16', '', NULL),
(28, 1, 'administrator@gmail.com', '2025-07-17 01:42:16', '2025-07-17 01:42:16', '71.192.39.32', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-16 05:43:02', '2025-07-16 21:42:16', '', NULL),
(29, 140, 'olemtiri@hotmail.com', '2025-07-16 10:38:39', '2025-07-16 10:38:39', '107.77.223.189', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-16 06:08:18', '2025-07-16 06:38:39', '', NULL),
(30, 1, 'administrator@gmail.com', '2025-07-17 20:12:49', '2025-07-17 20:12:49', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-17 02:45:06', '2025-07-17 16:12:49', '', NULL),
(31, 109, 'alrahma.isgl@gmail.com', '2025-07-17 06:47:50', '2025-07-17 06:47:50', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-17 02:47:15', '2025-07-17 02:47:50', '', NULL),
(32, 109, 'alrahma.isgl@gmail.com', '2025-07-18 04:58:34', '2025-07-18 04:58:34', '71.192.39.32', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-17 02:47:54', '2025-07-18 00:58:34', '', NULL),
(33, 119, 'rahmanek@gmail.com', '2025-07-20 19:06:36', '2025-07-20 19:06:36', '2600:4040:512c:6e00:5dbc:bfb3:ace3:b2ac', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-17 02:56:02', '2025-07-20 15:06:36', '', NULL),
(34, 142, 'olemtiri@hotmail.com', '2025-07-19 05:40:41', '2025-07-19 05:40:41', '66.31.122.224', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-17 03:30:41', '2025-07-19 01:40:41', '', NULL),
(35, 109, 'alrahma.isgl@gmail.com', '2025-07-18 04:58:34', '2025-07-18 04:58:34', '71.192.39.32', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-17 04:07:00', '2025-07-18 00:58:34', '', NULL),
(36, 145, 'imane.lassfar@gmail.com', '2025-07-17 08:08:28', NULL, '71.192.39.32', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-17 04:08:28', '2025-07-17 04:08:28', '', NULL),
(37, 145, 'imane.lassfar@gmail.com', '2025-07-17 08:08:34', NULL, '71.192.39.32', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-17 04:08:34', '2025-07-17 04:08:34', '', NULL),
(38, 1, 'administrator@gmail.com', '2025-07-17 20:12:49', '2025-07-17 20:12:49', '71.192.32.250', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Version/18.5 Safari/605.1.15', '2025-07-17 16:12:40', '2025-07-17 16:12:49', '', NULL),
(39, 109, 'alrahma.isgl@gmail.com', '2025-07-18 04:58:34', '2025-07-18 04:58:34', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-17 23:47:51', '2025-07-18 00:58:34', '', NULL),
(40, 1, 'administrator@gmail.com', '2025-07-18 22:05:00', '2025-07-18 22:05:00', '71.192.32.250', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1', '2025-07-18 18:03:22', '2025-07-18 18:05:00', '', NULL),
(41, 1, 'administrator@gmail.com', '2025-07-20 07:43:52', '2025-07-20 07:43:52', '172.56.196.116', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1', '2025-07-18 18:05:11', '2025-07-20 03:43:52', '', NULL),
(42, 142, 'olemtiri@hotmail.com', '2025-07-19 05:40:41', '2025-07-19 05:40:41', '72.74.55.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', '2025-07-19 01:30:54', '2025-07-19 01:40:41', '', NULL),
(43, 1, 'administrator@gmail.com', '2025-07-20 07:43:52', '2025-07-20 07:43:52', '72.74.55.8', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-19 01:36:26', '2025-07-20 03:43:52', '', NULL),
(44, 142, 'olemtiri@hotmail.com', '2025-07-19 05:44:25', NULL, '72.74.55.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', '2025-07-19 01:44:25', '2025-07-19 01:44:25', '', NULL),
(45, 109, 'alrahma.isgl@gmail.com', '2025-07-21 08:24:18', '2025-07-21 08:24:18', '72.74.55.8', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-19 02:09:35', '2025-07-21 04:24:18', '', NULL),
(46, 109, 'alrahma.isgl@gmail.com', '2025-07-21 08:24:18', '2025-07-21 08:24:18', '71.192.32.250', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-20 03:43:59', '2025-07-21 04:24:18', '', NULL),
(47, 109, 'alrahma.isgl@gmail.com', '2025-07-21 08:24:18', '2025-07-21 08:24:18', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-20 04:15:40', '2025-07-21 04:24:18', '', NULL),
(48, 119, 'rahmanek@gmail.com', '2025-07-20 19:06:36', '2025-07-20 19:06:36', '2600:4040:512c:6e00:4407:4a39:8043:85ea', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-20 15:00:53', '2025-07-20 15:06:36', '', NULL),
(49, 119, 'rahmanek@gmail.com', '2025-07-20 19:08:39', '2025-07-20 19:08:39', '2600:4040:512c:6e00:4407:4a39:8043:85ea', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-20 15:06:48', '2025-07-20 15:08:39', '', NULL),
(50, 119, 'rahmanek@gmail.com', '2025-07-20 19:08:53', NULL, '2600:4040:512c:6e00:4407:4a39:8043:85ea', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-20 15:08:53', '2025-07-20 15:08:53', '', NULL),
(51, 109, 'alrahma.isgl@gmail.com', '2025-07-21 08:24:18', '2025-07-21 08:24:18', '71.192.32.250', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-21 04:23:58', '2025-07-21 04:24:18', '', NULL),
(52, 1, 'administrator@gmail.com', '2025-07-25 08:41:19', '2025-07-25 08:41:19', '71.192.32.250', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-21 04:28:43', '2025-07-25 04:41:19', '', NULL),
(53, 148, 'alrahma.isgl@gmail.com', '2025-07-22 02:58:10', '2025-07-22 02:58:10', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 22:57:55', '2025-07-21 22:58:10', '', NULL),
(54, 149, 'moltadalti@necub.com', '2025-07-22 03:48:38', '2025-07-22 03:48:38', '146.70.59.46', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-21 23:45:19', '2025-07-21 23:48:38', '', NULL),
(55, 1, 'administrator@gmail.com', '2025-07-25 08:41:19', '2025-07-25 08:41:19', '2607:fb91:d73:8c8f:4104:763c:d6cb:43d6', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-21 23:47:20', '2025-07-25 04:41:19', '', NULL),
(56, 149, 'moltadalti@necub.com', '2025-07-22 03:49:04', NULL, '146.70.59.46', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-21 23:49:04', '2025-07-21 23:49:04', '', NULL),
(57, 150, 'ahmedabdalaoui@gmail.com', '2025-07-23 01:27:07', NULL, '2601:18f:802:4af0:9ca6:cc47:1dfd:235f', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/378.0.783859256 Mobile/15E148 Safari/604.1', '2025-07-22 21:27:07', '2025-07-22 21:27:07', '', NULL),
(58, 1, 'administrator@gmail.com', '2025-07-25 08:41:19', '2025-07-25 08:41:19', '71.192.32.250', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-22 21:28:02', '2025-07-25 04:41:19', '', NULL),
(59, 151, 'fqabba242@gmail.com', '2025-07-23 02:39:46', NULL, '2600:382:b1e4:975f:1ee9:2c45:edec:7910', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-22 22:39:46', '2025-07-22 22:39:46', '', NULL),
(60, 152, 'abdelhaklmlk@gmail.com', '2025-07-23 15:44:09', '2025-07-23 15:44:09', '24.62.26.238', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-23 11:32:11', '2025-07-23 11:44:09', '', NULL),
(61, 1, 'administrator@gmail.com', '2025-07-25 08:41:19', '2025-07-25 08:41:19', '71.192.32.250', 'Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-24 19:46:22', '2025-07-25 04:41:19', '', NULL),
(62, 1, 'administrator@gmail.com', '2025-07-25 08:41:19', '2025-07-25 08:41:19', '71.192.32.250', 'Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-25 04:40:13', '2025-07-25 04:41:19', '', NULL),
(63, 148, 'alrahma.isgl@gmail.com', '2025-07-25 09:03:08', '2025-07-25 09:03:08', '71.192.32.250', 'Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-25 04:42:03', '2025-07-25 05:03:08', '', NULL),
(64, 1, 'administrator@gmail.com', '2025-07-26 05:57:36', '2025-07-26 05:57:36', '71.192.32.250', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0', '2025-07-25 04:42:22', '2025-07-26 01:57:36', '', NULL),
(65, 148, 'alrahma.isgl@gmail.com', '2025-07-25 09:03:56', '2025-07-25 09:03:56', '71.192.32.250', 'Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-25 05:03:26', '2025-07-25 05:03:56', '', NULL),
(66, 120, 'teacher@gmail.com', '2025-07-25 09:29:35', '2025-07-25 09:29:35', '71.192.32.250', 'Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-25 05:04:40', '2025-07-25 05:29:35', '', NULL),
(67, 109, 'alrahma.isgl1@gmail.com', '2025-07-28 05:43:45', '2025-07-28 05:43:45', '71.192.32.250', 'Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-25 05:30:32', '2025-07-28 01:43:45', '', NULL),
(68, 1, 'administrator@gmail.com', '2025-07-26 05:57:36', '2025-07-26 05:57:36', '72.74.55.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', '2025-07-26 00:42:44', '2025-07-26 01:57:36', '', NULL),
(69, 1, 'administrator@gmail.com', '2025-07-26 05:57:36', '2025-07-26 05:57:36', '72.74.55.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', '2025-07-26 00:44:29', '2025-07-26 01:57:36', '', NULL),
(70, 148, 'alrahma.isgl@gmail.com', '2025-07-26 05:00:45', '2025-07-26 05:00:45', '72.74.55.8', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-26 00:52:19', '2025-07-26 01:00:45', '', NULL),
(71, 148, 'alrahma.isgl@gmail.com', '2025-07-26 05:49:44', '2025-07-26 05:49:44', '72.74.55.8', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-26 01:06:28', '2025-07-26 01:49:44', '', NULL),
(72, 148, 'alrahma.isgl@gmail.com', '2025-07-26 05:49:44', '2025-07-26 05:49:44', '2607:fb91:267a:891b:959d:11c1:ee4d:9ec1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-26 01:46:31', '2025-07-26 01:49:44', '', NULL),
(73, 1, 'administrator@gmail.com', '2025-07-26 05:57:36', '2025-07-26 05:57:36', '2607:fb91:267a:891b:959d:11c1:ee4d:9ec1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-26 01:49:51', '2025-07-26 01:57:36', '', NULL),
(74, 148, 'alrahma.isgl@gmail.com', '2025-07-26 21:42:40', '2025-07-26 21:42:40', '2607:fb91:267a:891b:959d:11c1:ee4d:9ec1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-26 01:58:06', '2025-07-26 17:42:40', '', NULL),
(75, 1, 'administrator@gmail.com', '2025-07-27 21:37:17', '2025-07-27 21:37:17', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-26 19:12:02', '2025-07-27 17:37:17', '', NULL),
(76, 1, 'administrator@gmail.com', '2025-07-27 21:37:17', '2025-07-27 21:37:17', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-26 19:16:02', '2025-07-27 17:37:17', '', NULL),
(77, 1, 'administrator@gmail.com', '2025-07-27 21:37:17', '2025-07-27 21:37:17', '66.31.122.224', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-27 17:28:03', '2025-07-27 17:37:17', '', NULL),
(78, 121, 'parent@gmail.com', '2025-07-27 21:39:12', '2025-07-27 21:39:12', '66.31.122.224', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-27 17:37:29', '2025-07-27 17:39:12', '', NULL),
(79, 1, 'administrator@gmail.com', '2025-07-27 21:39:52', '2025-07-27 21:39:52', '66.31.122.224', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-27 17:39:25', '2025-07-27 17:39:52', '', NULL),
(80, 121, 'parent@gmail.com', '2025-07-27 21:43:17', '2025-07-27 21:43:17', '66.31.122.224', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-27 17:40:03', '2025-07-27 17:43:17', '', NULL),
(81, 148, 'alrahma.isgl@gmail.com', '2025-07-28 02:09:58', '2025-07-28 02:09:58', '71.192.32.250', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-07-27 19:04:17', '2025-07-27 22:09:58', '', NULL),
(82, 148, 'alrahma.isgl@gmail.com', '2025-07-29 00:13:19', '2025-07-29 00:13:19', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-27 22:14:00', '2025-07-28 20:13:19', '', NULL),
(83, 109, 'alrahma.isgl1@gmail.com', '2025-07-28 05:43:45', '2025-07-28 05:43:45', '71.192.32.250', 'Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-28 00:58:34', '2025-07-28 01:43:45', '', NULL),
(84, 1, 'administrator@gmail.com', '2025-07-28 23:32:48', '2025-07-28 23:32:48', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-28 19:31:43', '2025-07-28 19:32:48', '', NULL),
(85, 148, 'alrahma.isgl@gmail.com', '2025-07-29 00:13:19', '2025-07-29 00:13:19', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-28 19:32:54', '2025-07-28 20:13:19', '', NULL),
(86, 148, 'alrahma.isgl@gmail.com', '2025-07-30 02:49:10', '2025-07-30 02:49:10', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-28 20:13:26', '2025-07-29 22:49:10', '', NULL),
(87, 121, 'parent@gmail.com', '2025-07-30 03:01:27', '2025-07-30 03:01:27', '72.74.55.8', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1', '2025-07-29 01:15:57', '2025-07-29 23:01:27', '', NULL),
(88, 148, 'alrahma.isgl@gmail.com', '2025-07-30 02:49:10', '2025-07-30 02:49:10', '72.74.55.8', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-29 22:48:58', '2025-07-29 22:49:10', '', NULL),
(89, 121, 'parent@gmail.com', '2025-07-30 03:01:27', '2025-07-30 03:01:27', '72.74.55.8', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-29 22:49:28', '2025-07-29 23:01:27', '', NULL),
(90, 121, 'parent@gmail.com', '2025-08-02 03:41:37', '2025-08-02 03:41:37', '72.74.55.8', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-29 23:01:34', '2025-08-01 23:41:37', '', NULL),
(91, 121, 'parent@gmail.com', '2025-08-02 03:41:37', '2025-08-02 03:41:37', '72.74.55.8', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-29 23:05:32', '2025-08-01 23:41:37', '', NULL),
(92, 1, 'administrator@gmail.com', '2025-08-02 06:47:25', '2025-08-02 06:47:25', '72.74.55.8', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-07-29 23:06:21', '2025-08-02 02:47:25', '', NULL),
(93, 121, 'parent@gmail.com', '2025-08-02 03:41:37', '2025-08-02 03:41:37', '72.74.55.8', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-30 01:26:28', '2025-08-01 23:41:37', '', NULL),
(94, 1, 'administrator@gmail.com', '2025-08-02 06:47:25', '2025-08-02 06:47:25', '71.192.32.250', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-08-01 16:32:53', '2025-08-02 02:47:25', '', NULL),
(95, 121, 'parent@gmail.com', '2025-08-02 03:41:37', '2025-08-02 03:41:37', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-01 22:34:29', '2025-08-01 23:41:37', '', NULL),
(96, 121, 'parent@gmail.com', '2025-08-02 03:41:37', '2025-08-02 03:41:37', '71.192.32.250', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-01 22:38:11', '2025-08-01 23:41:37', '', NULL),
(97, 1, 'administrator@gmail.com', '2025-08-02 06:47:25', '2025-08-02 06:47:25', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-01 22:40:25', '2025-08-02 02:47:25', '', NULL),
(98, 121, 'parent@gmail.com', '2025-08-02 03:41:37', '2025-08-02 03:41:37', '72.74.55.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', '2025-08-01 23:28:20', '2025-08-01 23:41:37', '', NULL),
(99, 1, 'administrator@gmail.com', '2025-08-02 06:47:25', '2025-08-02 06:47:25', '71.192.32.250', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-01 23:41:41', '2025-08-02 02:47:25', '', NULL),
(100, 121, 'parent@gmail.com', '2025-08-02 06:44:44', '2025-08-02 06:44:44', '72.74.55.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', '2025-08-02 01:32:34', '2025-08-02 02:44:44', '', NULL),
(101, 121, 'parent@gmail.com', '2025-08-02 06:44:44', '2025-08-02 06:44:44', '72.74.55.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', '2025-08-02 01:39:38', '2025-08-02 02:44:44', '', NULL),
(102, 121, 'parent@gmail.com', '2025-08-02 06:44:44', '2025-08-02 06:44:44', '72.74.55.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0', '2025-08-02 01:41:49', '2025-08-02 02:44:44', '', NULL),
(103, 121, 'parent@gmail.com', '2025-08-02 06:44:44', '2025-08-02 06:44:44', '71.192.32.250', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-08-02 02:39:00', '2025-08-02 02:44:44', '', NULL),
(104, 1, 'administrator@gmail.com', '2025-08-02 06:47:25', '2025-08-02 06:47:25', '71.192.32.250', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-08-02 02:44:51', '2025-08-02 02:47:25', '', NULL),
(105, 121, 'parent@gmail.com', '2025-08-08 09:08:48', '2025-08-08 09:08:48', '71.192.32.250', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-08-02 02:47:53', '2025-08-08 05:08:48', '', NULL),
(106, 121, 'parent@gmail.com', '2025-08-08 09:08:48', '2025-08-08 09:08:48', '72.74.55.8', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1', '2025-08-02 03:20:59', '2025-08-08 05:08:48', '', NULL),
(107, 1, 'administrator@gmail.com', '2025-08-11 03:19:14', '2025-08-11 07:19:14', '71.192.32.250', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-03 03:20:29', '2025-08-11 03:19:14', '', NULL),
(108, 1, 'administrator@gmail.com', '2025-08-11 03:19:14', '2025-08-11 07:19:14', '71.192.32.250', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-07 01:52:30', '2025-08-11 03:19:14', '', NULL),
(109, 121, 'parent@gmail.com', '2025-08-08 09:08:48', '2025-08-08 09:08:48', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-08 05:06:15', '2025-08-08 05:08:48', '', NULL),
(110, 1, 'administrator@gmail.com', '2025-08-11 03:19:14', '2025-08-11 07:19:14', '71.192.32.250', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-08 05:08:53', '2025-08-11 03:19:14', '', NULL),
(111, 121, 'parent@gmail.com', '2025-08-08 20:21:10', '2025-08-08 20:21:10', '71.192.32.250', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1', '2025-08-08 16:20:48', '2025-08-08 16:21:10', '', NULL),
(112, 121, 'parent@gmail.com', '2025-08-11 04:02:34', '2025-08-11 08:02:34', '71.192.32.250', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1', '2025-08-08 18:53:29', '2025-08-11 04:02:34', '', NULL),
(113, 1, 'administrator@gmail.com', '2025-08-11 03:19:14', '2025-08-11 07:19:14', '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-11 02:42:43', '2025-08-11 03:19:14', '', NULL),
(114, 1, 'administrator@gmail.com', '2025-08-12 23:11:18', '2025-08-13 03:11:18', '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-11 03:19:20', '2025-08-12 23:11:18', '', NULL),
(115, 121, 'parent@gmail.com', '2025-08-11 04:02:34', '2025-08-11 08:02:34', '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-11 04:02:16', '2025-08-11 04:02:34', '', NULL),
(116, 148, 'alrahma.isgl@gmail.com', '2025-08-11 04:05:24', '2025-08-11 08:05:24', '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-11 04:02:51', '2025-08-11 04:05:24', '', NULL),
(117, 148, 'alrahma.isgl@gmail.com', '2025-08-12 05:55:58', '2025-08-12 09:55:58', '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-11 04:05:30', '2025-08-12 05:55:58', '', NULL),
(118, 148, 'alrahma.isgl@gmail.com', '2025-08-12 05:55:58', '2025-08-12 09:55:58', '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-12 02:48:40', '2025-08-12 05:55:58', '', NULL),
(119, 1, 'administrator@gmail.com', '2025-08-12 23:11:18', '2025-08-13 03:11:18', '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-12 03:38:06', '2025-08-12 23:11:18', '', NULL),
(120, 148, 'alrahma.isgl@gmail.com', '2025-08-12 23:09:53', '2025-08-13 03:09:53', '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-12 23:09:48', '2025-08-12 23:09:53', '', NULL),
(121, 148, 'alrahma.isgl@gmail.com', '2025-08-13 03:09:57', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-12 23:09:57', '2025-08-12 23:09:57', '', NULL),
(122, 1, 'administrator@gmail.com', '2025-08-13 03:11:27', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-12 23:11:27', '2025-08-12 23:11:27', '', NULL),
(123, 1, 'administrator@gmail.com', '2025-08-15 07:23:58', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-15 03:23:58', '2025-08-15 03:23:58', '', NULL),
(124, 1, 'administrator@gmail.com', '2025-08-16 01:18:24', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-15 21:18:24', '2025-08-15 21:18:24', '', NULL),
(125, 1, 'administrator@gmail.com', '2025-08-19 06:10:39', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-19 02:10:39', '2025-08-19 02:10:39', '', NULL),
(126, 148, 'alrahma.isgl@gmail.com', '2025-08-19 07:17:41', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-19 03:17:41', '2025-08-19 03:17:41', '', NULL),
(127, 108, 'moulay.elabidi@gmail.com', '2025-08-24 17:51:55', '2025-08-24 21:51:55', '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-19 03:18:07', '2025-08-24 17:51:55', '', NULL),
(128, 1, 'administrator@gmail.com', '2025-08-20 00:52:07', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-19 20:52:07', '2025-08-19 20:52:07', '', NULL),
(129, 108, 'moulay.elabidi@gmail.com', '2025-08-24 17:51:55', '2025-08-24 21:51:55', '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0', '2025-08-22 02:12:58', '2025-08-24 17:51:55', '', NULL),
(130, 1, 'administrator@gmail.com', '2025-08-22 06:16:21', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-22 02:16:21', '2025-08-22 02:16:21', '', NULL),
(131, 1, 'administrator@gmail.com', '2025-08-24 21:32:41', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-24 17:32:41', '2025-08-24 17:32:41', '', NULL),
(132, 108, 'moulay.elabidi@gmail.com', '2025-08-24 17:51:55', '2025-08-24 21:51:55', '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0', '2025-08-24 17:34:00', '2025-08-24 17:51:55', '', NULL),
(133, 108, 'moulay.elabidi@gmail.com', '2025-08-24 21:51:58', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0', '2025-08-24 17:51:58', '2025-08-24 17:51:58', '', NULL);

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

--
-- Table structure for table `longanswerquestions`
--

CREATE TABLE `longanswerquestions` (
  `la_question_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `correct_answer` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `manual_payments`
--

CREATE TABLE `manual_payments` (
  `id` int(11) UNSIGNED NOT NULL,
  `invoice_number` varchar(100) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `payment_method` varchar(100) DEFAULT NULL,
  `reference` varchar(255) DEFAULT NULL,
  `discount_number` int(11) DEFAULT NULL,
  `proof_path` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` int(11) UNSIGNED NOT NULL,
  `sender_id` int(11) NOT NULL,
  `recipient_id` int(11) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `sent_datetime` datetime NOT NULL,
  `read_status` tinyint(1) NOT NULL DEFAULT 0,
  `read_datetime` datetime DEFAULT NULL,
  `message_number` varchar(20) NOT NULL,
  `priority` varchar(10) NOT NULL DEFAULT 'normal',
  `attachment` varchar(255) DEFAULT NULL,
  `status` varchar(10) NOT NULL DEFAULT 'sent',
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `midterm_exam`
--

CREATE TABLE `midterm_exam` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `class_section_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) NOT NULL,
  `score` float DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `semester` varchar(25) NOT NULL DEFAULT 'Fall',
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `midterm_exam`
--

INSERT INTO `midterm_exam` (`id`, `student_id`, `school_id`, `class_section_id`, `teacher_id`, `score`, `comment`, `semester`, `school_year`, `created_at`, `updated_at`) VALUES
(1, 123, '', 11, 109, 100, NULL, 'Fall', '2024-2025', '2025-07-07 00:28:27', '2025-07-07 00:28:27'),
(2, 123, '', 30, 120, 90, NULL, 'Fall', '2024-2025', '2025-07-25 05:24:32', '2025-07-25 05:24:32'),
(3, 118, '', 30, 120, 89, NULL, 'Fall', '2024-2025', '2025-07-25 05:24:32', '2025-07-25 05:24:32'),
(4, 112, '', 30, 120, 85, NULL, 'Fall', '2024-2025', '2025-07-25 05:24:32', '2025-07-25 05:24:32'),
(5, 107, '', 60, 109, 99, NULL, 'Fall', '2024-2025', '2025-07-25 05:36:03', '2025-07-25 05:36:03'),
(6, 110, '', 60, 109, 78, NULL, 'Fall', '2024-2025', '2025-07-25 05:36:03', '2025-07-25 05:36:03'),
(7, 111, '', 60, 109, 69, NULL, 'Fall', '2024-2025', '2025-07-25 05:36:03', '2025-07-25 05:36:03'),
(8, 136, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(9, 107, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(10, 110, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(11, 112, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(12, 114, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(13, 115, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(14, 116, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(15, 117, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(16, 118, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(17, 119, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(18, 120, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(19, 123, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(20, 124, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(21, 125, '', 120, 148, 100, NULL, 'Fall', '2025-2026', '2025-08-12 03:22:26', '2025-08-12 03:22:26'),
(22, 130, '', 23, 108, 99.6, NULL, 'Fall', '2025-2026', '2025-08-24 17:37:35', '2025-08-24 17:38:18'),
(23, 131, '', 23, 108, 95.3, NULL, 'Fall', '2025-2026', '2025-08-24 17:37:35', '2025-08-24 17:38:18'),
(24, 132, '', 23, 108, 99.9, NULL, 'Fall', '2025-2026', '2025-08-24 17:37:35', '2025-08-24 17:38:18'),
(25, 133, '', 23, 108, 96, NULL, 'Fall', '2025-2026', '2025-08-24 17:37:35', '2025-08-24 17:38:18');

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

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

CREATE TABLE `migrations` (
  `id` int(11) UNSIGNED NOT NULL,
  `version` varchar(255) NOT NULL,
  `class` varchar(255) NOT NULL,
  `group` varchar(255) NOT NULL,
  `namespace` varchar(255) NOT NULL,
  `time` int(11) NOT NULL,
  `batch` int(11) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

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

CREATE TABLE `notifications` (
  `id` int(11) UNSIGNED NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `message` text NOT NULL,
  `target_group` enum('student','parent','teacher','admin','everyone') NOT NULL,
  `delivery_channels` set('in_app','email','sms') NOT NULL,
  `priority` enum('low','normal','high') DEFAULT 'normal',
  `status` enum('pending','sent','failed') DEFAULT 'pending',
  `action_url` varchar(512) DEFAULT NULL,
  `attachment_path` varchar(512) DEFAULT NULL,
  `scheduled_at` datetime DEFAULT current_timestamp(),
  `sent_at` datetime DEFAULT NULL,
  `expires_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` datetime DEFAULT NULL,
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `notifications`
--

INSERT INTO `notifications` (`id`, `title`, `message`, `target_group`, `delivery_channels`, `priority`, `status`, `action_url`, `attachment_path`, `scheduled_at`, `sent_at`, `expires_at`, `created_at`, `updated_at`, `deleted_at`, `school_year`, `semester`) VALUES
(1, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-06-28 21:49:34', NULL, NULL, '2025-06-28 21:49:34', '2025-06-28 21:49:34', NULL, NULL, NULL),
(2, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-04 22:45:02', NULL, NULL, '2025-07-04 22:45:02', '2025-07-04 22:45:02', NULL, NULL, NULL),
(3, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-04 22:45:02', NULL, NULL, '2025-07-04 22:45:02', '2025-07-04 22:45:02', NULL, NULL, NULL),
(4, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-09 21:30:10', NULL, NULL, '2025-07-09 21:30:10', '2025-07-09 21:30:10', NULL, NULL, NULL),
(5, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-09 21:30:10', NULL, NULL, '2025-07-09 21:30:10', '2025-07-09 21:30:10', NULL, NULL, NULL),
(6, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 02:30:09', NULL, NULL, '2025-07-10 02:30:09', '2025-07-10 02:30:09', NULL, NULL, NULL),
(7, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 02:30:09', NULL, NULL, '2025-07-10 02:30:09', '2025-07-10 02:30:09', NULL, NULL, NULL),
(8, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 02:45:03', NULL, NULL, '2025-07-10 02:45:03', '2025-07-10 02:45:03', NULL, NULL, NULL),
(9, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 02:45:03', NULL, NULL, '2025-07-10 02:45:03', '2025-07-10 02:45:03', NULL, NULL, NULL),
(10, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 03:30:06', NULL, NULL, '2025-07-10 03:30:06', '2025-07-10 03:30:06', NULL, NULL, NULL),
(11, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 03:30:07', NULL, NULL, '2025-07-10 03:30:07', '2025-07-10 03:30:07', NULL, NULL, NULL),
(12, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 03:30:08', NULL, NULL, '2025-07-10 03:30:08', '2025-07-10 03:30:08', NULL, NULL, NULL),
(13, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 03:30:09', NULL, NULL, '2025-07-10 03:30:09', '2025-07-10 03:30:09', NULL, NULL, NULL),
(14, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 03:30:10', NULL, NULL, '2025-07-10 03:30:10', '2025-07-10 03:30:10', NULL, NULL, NULL),
(15, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 03:30:11', NULL, NULL, '2025-07-10 03:30:11', '2025-07-10 03:30:11', NULL, NULL, NULL),
(16, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 03:45:02', NULL, NULL, '2025-07-10 03:45:02', '2025-07-10 03:45:02', NULL, NULL, NULL),
(17, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-10 03:45:02', NULL, NULL, '2025-07-10 03:45:02', '2025-07-10 03:45:02', NULL, NULL, NULL),
(18, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-12 21:00:08', NULL, NULL, '2025-07-12 21:00:08', '2025-07-12 21:00:08', NULL, NULL, NULL),
(19, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-12 21:00:10', NULL, NULL, '2025-07-12 21:00:10', '2025-07-12 21:00:10', NULL, NULL, NULL),
(20, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-12 21:15:03', NULL, NULL, '2025-07-12 21:15:03', '2025-07-12 21:15:03', NULL, NULL, NULL),
(21, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-16 04:15:03', NULL, NULL, '2025-07-16 04:15:03', '2025-07-16 04:15:03', NULL, NULL, NULL),
(22, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-16 04:30:06', NULL, NULL, '2025-07-16 04:30:06', '2025-07-16 04:30:06', NULL, NULL, NULL),
(23, 'Account Deleted - Unverified', 'Your account was deleted because it was not verified within the time limit.', 'student', 'email', 'normal', 'pending', NULL, NULL, '2025-07-16 05:30:05', NULL, NULL, '2025-07-16 05:30:05', '2025-07-16 05:30:05', NULL, NULL, NULL),
(24, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-07-22 21:34:06', NULL, NULL, '2025-07-22 21:34:06', '2025-07-22 21:34:06', NULL, NULL, NULL),
(25, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-07-22 21:34:08', NULL, NULL, '2025-07-22 21:34:08', '2025-07-22 21:34:08', NULL, NULL, NULL),
(26, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-07-25 04:59:14', NULL, NULL, '2025-07-25 04:59:14', '2025-07-25 04:59:14', NULL, NULL, NULL),
(27, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-07-29 23:06:00', NULL, NULL, '2025-07-29 23:06:00', '2025-07-29 23:06:00', NULL, NULL, NULL),
(28, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-08-01 22:38:25', NULL, NULL, '2025-08-01 22:38:25', '2025-08-01 22:38:25', NULL, NULL, NULL),
(29, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-08-01 22:39:43', NULL, NULL, '2025-08-01 22:39:43', '2025-08-01 22:39:43', NULL, NULL, NULL),
(30, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-08-02 02:43:45', NULL, NULL, '2025-08-02 02:43:45', '2025-08-02 02:43:45', NULL, NULL, NULL),
(31, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-08-08 05:06:21', NULL, NULL, '2025-08-08 05:06:21', '2025-08-08 05:06:21', NULL, NULL, NULL),
(32, 'admission under review', 'Your admission application is under review. We will notify you once it is approved.', 'student', 'in_app,email', 'normal', 'pending', NULL, NULL, '2025-08-12 19:10:19', NULL, NULL, '2025-08-12 23:10:19', '2025-08-12 23:10:19', NULL, NULL, NULL);

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

--
-- Table structure for table `notification_recipients`
--

CREATE TABLE `notification_recipients` (
  `id` int(11) UNSIGNED NOT NULL,
  `notification_id` int(11) UNSIGNED NOT NULL,
  `user_id` int(11) UNSIGNED NOT NULL,
  `status` enum('unread','read','delivered','failed') DEFAULT 'unread',
  `delivered_at` datetime DEFAULT NULL,
  `read_at` datetime DEFAULT NULL,
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `parents`
--

CREATE TABLE `parents` (
  `id` int(11) NOT NULL,
  `secondparent_firstname` varchar(100) NOT NULL,
  `secondparent_lastname` varchar(100) NOT NULL,
  `secondparent_gender` enum('Male','Female') DEFAULT NULL,
  `secondparent_email` varchar(150) NOT NULL,
  `secondparent_phone` varchar(15) NOT NULL,
  `firstparent_id` int(11) NOT NULL,
  `secondparent_id` int(11) NOT NULL,
  `semester` varchar(10) DEFAULT NULL,
  `school_year` varchar(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `parents`
--

INSERT INTO `parents` (`id`, `secondparent_firstname`, `secondparent_lastname`, `secondparent_gender`, `secondparent_email`, `secondparent_phone`, `firstparent_id`, `secondparent_id`, `semester`, `school_year`, `created_at`, `updated_at`) VALUES
(1, 'Soukaina', 'Bouhachma', 'Female', 'bouhachma89@gmail.com', '(774)-266-2044', 131, 0, 'Fall', '2024-2025', '2025-07-12 05:35:57', '2025-07-12 05:35:57'),
(7, 'Soumaya', 'Tajeddine', 'Female', 'tsoumaya@gmail.com', '(617)-669-3076', 151, 0, 'Fall', '2024-2025', '2025-07-23 02:37:57', '2025-07-23 02:37:57');

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

--
-- Table structure for table `participation`
--

CREATE TABLE `participation` (
  `id` int(10) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `class_section_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) NOT NULL,
  `score` float DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `semester` varchar(25) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `participation`
--

INSERT INTO `participation` (`id`, `student_id`, `school_id`, `class_section_id`, `teacher_id`, `score`, `comment`, `semester`, `school_year`, `created_at`, `updated_at`) VALUES
(1, 130, '', 23, 108, 100, NULL, 'Fall', '2025-2026', '2025-08-24 17:37:08', '2025-08-24 17:37:15'),
(2, 131, '', 23, 108, 100, NULL, 'Fall', '2025-2026', '2025-08-24 17:37:08', '2025-08-24 17:37:15'),
(3, 132, '', 23, 108, 100, NULL, 'Fall', '2025-2026', '2025-08-24 17:37:08', '2025-08-24 17:37:15'),
(4, 133, '', 23, 108, 80, NULL, 'Fall', '2025-2026', '2025-08-24 17:37:08', '2025-08-24 17:37:15');

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

--
-- Table structure for table `participation_score`
--

CREATE TABLE `participation_score` (
  `id` int(10) UNSIGNED NOT NULL,
  `student_id` int(10) UNSIGNED NOT NULL,
  `school_id` char(100) NOT NULL,
  `class_section_id` int(10) UNSIGNED DEFAULT NULL,
  `teacher_id` int(10) UNSIGNED DEFAULT NULL,
  `score` float DEFAULT NULL,
  `semester` varchar(20) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `password_resets`
--

CREATE TABLE `password_resets` (
  `id` int(11) UNSIGNED NOT NULL,
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `expires_at` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `password_resets`
--

INSERT INTO `password_resets` (`id`, `email`, `token`, `created_at`, `expires_at`) VALUES
(2, 'alrahma.isgl@gmail.com', '3cfc76ab1e0b852bac86c0333036d7254278ab0284111651e6e9f83f5bd9d277c07b1543ade2b6a02b4f3e8740617d9a', '2025-07-18 19:13:40', '2025-07-18 20:13:40'),
(3, 'olemtiri@hotmail.com', 'e28fc0522ae99552479d269f044da52f28be46a33a37b2b3546e284fb15ef55635654783d1e164d4dae3fa7a1284802e', '2025-07-18 22:43:28', '2025-07-18 23:43:28'),
(4, 'rahmanek@gmail.com', 'b789def941fe2978c6e594f4defff1793f0eee5f345db843532193959da9900772f9579aacb1eba17c1731cca6d0c956', '2025-07-20 14:56:11', '2025-07-20 15:56:11'),
(6, 'alrahma.isgl@gmail.com', '60781559492fcc58b9e76ab806d00d2232d33c16481b3a3687203b9771f7a58326b14b1c53608954fc3df60c9d319820', '2025-07-21 04:24:34', '2025-07-21 05:24:34'),
(7, 'alrahma.isgl@gmail.com', 'feb080662eacdfddd8abe81375ee01cb06dcf990eeb28b463d1f4bb6a81ae4f27f7ef8510b78fd3424daa97e98841bad', '2025-07-21 04:24:48', '2025-07-21 05:24:48'),
(8, 'alrahma.isgl@gmail.com', 'b20f30baff387799aa05df9a692fe2caa06d16e4982d876d4e57c0fa67d2950af99b2b4f69e1d1be09d0081651eafc0f', '2025-07-21 04:24:59', '2025-07-21 05:24:59');

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

--
-- Table structure for table `password_reset_requests`
--

CREATE TABLE `password_reset_requests` (
  `id` int(10) UNSIGNED NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `requested_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `password_reset_requests`
--

INSERT INTO `password_reset_requests` (`id`, `ip_address`, `requested_at`) VALUES
(1, '71.192.32.250', '2025-07-21 04:24:34'),
(2, '71.192.32.250', '2025-07-21 04:24:48'),
(3, '71.192.32.250', '2025-07-21 04:24:59'),
(4, '203.189.153.34', '2025-07-21 18:07:19'),
(5, '203.189.153.34', '2025-07-21 18:07:23'),
(6, '203.189.152.141', '2025-07-21 23:10:39'),
(7, '203.189.152.141', '2025-07-21 23:10:43'),
(8, '124.41.196.50', '2025-07-22 03:33:57'),
(9, '124.41.196.50', '2025-07-22 03:34:00'),
(10, '85.132.110.180', '2025-07-22 10:13:02'),
(11, '85.132.110.180', '2025-07-22 10:13:05'),
(12, '2601:18f:802:4af0:9ca6:cc47:1dfd:235f', '2025-07-22 21:18:58'),
(13, '91.187.113.100', '2025-07-23 07:18:45'),
(14, '91.187.113.100', '2025-07-23 07:18:49'),
(15, '104.139.74.25', '2025-07-23 14:17:47'),
(16, '175.29.187.26', '2025-07-23 19:40:34'),
(17, '175.29.187.26', '2025-07-23 19:40:39'),
(18, '78.100.105.250', '2025-07-24 01:01:07'),
(19, '78.100.105.250', '2025-07-24 01:01:11'),
(20, '95.107.228.159', '2025-07-24 04:24:28'),
(21, '95.107.228.159', '2025-07-24 04:24:31'),
(22, '103.165.12.82', '2025-07-24 07:14:09'),
(23, '103.165.12.82', '2025-07-24 07:14:11'),
(24, '181.205.221.130', '2025-07-25 08:53:33'),
(25, '181.205.221.130', '2025-07-25 08:53:35'),
(26, '125.19.15.98', '2025-07-26 02:20:22'),
(27, '125.19.15.98', '2025-07-26 02:20:25'),
(28, '77.46.134.124', '2025-07-26 06:27:06'),
(29, '77.46.134.124', '2025-07-26 06:27:09'),
(30, '95.86.27.253', '2025-07-27 06:52:44'),
(31, '95.86.27.253', '2025-07-27 06:52:47'),
(32, '113.177.27.220', '2025-07-27 11:30:14'),
(33, '113.177.27.220', '2025-07-27 11:30:19'),
(34, '102.36.229.133', '2025-07-28 05:33:13'),
(35, '102.36.229.133', '2025-07-28 05:33:14'),
(36, '94.154.17.29', '2025-07-30 05:58:49'),
(37, '94.154.17.29', '2025-07-30 05:58:51'),
(38, '36.88.181.133', '2025-07-30 19:47:06'),
(39, '36.88.181.133', '2025-07-30 19:47:10'),
(40, '177.152.107.214', '2025-08-06 07:07:21'),
(41, '177.152.107.214', '2025-08-06 07:07:26'),
(42, '182.253.40.54', '2025-08-06 07:33:25'),
(43, '182.253.40.54', '2025-08-06 07:33:30'),
(44, '102.218.14.114', '2025-08-06 09:04:04'),
(45, '203.202.255.246', '2025-08-06 21:52:09'),
(46, '203.202.255.246', '2025-08-06 21:52:17');

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

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` int(11) UNSIGNED NOT NULL,
  `parent_id` int(11) UNSIGNED NOT NULL,
  `invoice_id` int(11) UNSIGNED NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `paid_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `balance` decimal(10,2) NOT NULL,
  `number_of_installments` int(11) NOT NULL,
  `transaction_id` varchar(100) DEFAULT NULL,
  `check_file` varchar(255) DEFAULT NULL,
  `payment_method` varchar(50) NOT NULL DEFAULT 'Unknown',
  `payment_date` date NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'Pending',
  `updated_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `payment_error`
--

CREATE TABLE `payment_error` (
  `id` int(11) UNSIGNED NOT NULL,
  `payment_id` int(11) NOT NULL,
  `invoice_id` int(11) NOT NULL,
  `parent_id` int(11) NOT NULL,
  `wrong_paid_amount` decimal(10,2) NOT NULL,
  `wrong_payment_method` varchar(50) NOT NULL,
  `wrong_check_file` varchar(255) DEFAULT NULL,
  `error_note` varchar(255) DEFAULT NULL,
  `logged_at` datetime NOT NULL,
  `logged_by` int(11) DEFAULT NULL,
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `payment_transactions`
--

CREATE TABLE `payment_transactions` (
  `id` int(11) UNSIGNED NOT NULL,
  `transaction_id` varchar(100) NOT NULL,
  `payment_id` int(11) NOT NULL,
  `transaction_date` datetime DEFAULT current_timestamp(),
  `amount` decimal(10,2) NOT NULL,
  `payment_method` varchar(50) NOT NULL,
  `payment_status` varchar(50) NOT NULL DEFAULT 'Pending',
  `transaction_fee` decimal(10,2) DEFAULT 0.00,
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `paypal_payments`
--

CREATE TABLE `paypal_payments` (
  `id` int(11) UNSIGNED NOT NULL,
  `webhook_id` varchar(64) DEFAULT NULL,
  `parent_school_id` varchar(64) DEFAULT NULL,
  `order_id` varchar(64) DEFAULT NULL,
  `transaction_id` varchar(64) DEFAULT NULL,
  `status` varchar(32) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `currency` varchar(10) DEFAULT NULL,
  `paypal_fee` decimal(10,2) DEFAULT NULL,
  `net_amount` decimal(10,2) DEFAULT NULL,
  `payer_email` varchar(128) DEFAULT NULL,
  `merchant_id` varchar(64) DEFAULT NULL,
  `event_type` varchar(64) DEFAULT NULL,
  `summary` text DEFAULT NULL,
  `raw_payload` longtext DEFAULT NULL,
  `synced` tinyint(1) NOT NULL DEFAULT 0,
  `sync_attempts` int(11) NOT NULL DEFAULT 0,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `paypal_transactions`
--

CREATE TABLE `paypal_transactions` (
  `id` int(11) NOT NULL,
  `transaction_id` varchar(100) NOT NULL,
  `payment_id` int(11) DEFAULT NULL,
  `firstname` varchar(100) DEFAULT NULL,
  `lastname` varchar(100) DEFAULT NULL,
  `event_type` varchar(100) NOT NULL,
  `payer_email` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `currency` varchar(10) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'Pending',
  `payment_method` varchar(50) NOT NULL,
  `transaction_fee` decimal(10,2) NOT NULL DEFAULT 0.00,
  `raw_data` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` int(11) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'view_dashboard', 'Permission to view the admin dashboard', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(2, 'access_admin_panel', 'Permission to access the administration panel', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(3, 'manage_users', 'Permission to manage users (create, update, delete)', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(4, 'create_user', 'Permission to create new users', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(5, 'edit_user', 'Permission to edit existing users', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(6, 'delete_user', 'Permission to delete users', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(7, 'view_user_list', 'Permission to view the list of users', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(8, 'view_user_profile', 'Permission to view individual user profiles', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(9, 'edit_user_profile', 'Permission to edit user profiles', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(10, 'deactivate_user', 'Permission to deactivate a user account', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(11, 'activate_user', 'Permission to reactivate a deactivated user account', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(12, 'reset_user_password', 'Permission to reset user passwords', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(13, 'manage_roles', 'Permission to manage roles (create, edit, delete)', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(14, 'create_role', 'Permission to create a new role', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(15, 'edit_role', 'Permission to edit an existing role', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(16, 'delete_role', 'Permission to delete a role', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(17, 'view_roles', 'Permission to view the list of roles', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(18, 'assign_role', 'Permission to assign roles to users', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(19, 'edit_role_permissions', 'Permission to edit permissions assigned to roles', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(20, 'manage_content', 'Permission to manage all types of content', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(21, 'create_content', 'Permission to create new content', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(22, 'edit_content', 'Permission to edit existing content', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(23, 'delete_content', 'Permission to delete content', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(24, 'publish_content', 'Permission to publish content', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(25, 'unpublish_content', 'Permission to unpublish content', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(26, 'view_content_list', 'Permission to view all content', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(27, 'archive_content', 'Permission to archive old content', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(28, 'upload_files', 'Permission to upload files and media', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(29, 'delete_files', 'Permission to delete uploaded files', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(30, 'view_files', 'Permission to view and access uploaded files', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(31, 'manage_file_storage', 'Permission to manage file storage settings', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(32, 'manage_security_settings', 'Permission to manage security settings', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(33, 'view_security_logs', 'Permission to view security and audit logs', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(34, 'access_sensitive_data', 'Permission to access sensitive or personally identifiable information (PII)', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(35, 'manage_password_policy', 'Permission to configure and enforce password policies', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(36, 'view_login_activity', 'Permission to view login activities of users', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(37, 'view_failed_login_attempts', 'Permission to view failed login attempts for the system', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(38, 'manage_system_settings', 'Permission to manage system-wide settings', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(39, 'edit_system_settings', 'Permission to edit system configuration (e.g., database, APIs)', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(40, 'view_system_settings', 'Permission to view current system settings', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(41, 'manage_api_keys', 'Permission to manage API keys', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(42, 'view_system_logs', 'Permission to view system activity and error logs', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(43, 'configure_email_settings', 'Permission to configure the email server settings', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(44, 'view_reports', 'Permission to view system reports', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(45, 'generate_reports', 'Permission to generate and download reports', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(46, 'export_data', 'Permission to export data in various formats', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(47, 'view_analytics_dashboard', 'Permission to view the analytics dashboard', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(48, 'manage_billing', 'Permission to manage billing, payments, and subscriptions', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(49, 'view_billing_history', 'Permission to view past transactions and billing history', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(50, 'issue_refunds', 'Permission to issue refunds to users', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(51, 'view_invoice_list', 'Permission to view all invoices', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(52, 'view_audit_logs', 'Permission to view audit logs for system actions', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(53, 'perform_compliance_checks', 'Permission to perform and manage compliance checks', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(54, 'view_data_privacy_logs', 'Permission to view logs related to GDPR and data privacy activities', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(55, 'manage_notifications', 'Permission to configure and send notifications (email, SMS, etc.)', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(56, 'view_notification_history', 'Permission to view the notification history sent by the system', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(57, 'send_system_alerts', 'Permission to send system-wide alerts', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(58, 'manage_backups', 'Permission to configure and manage system backups', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(59, 'perform_backup', 'Permission to manually initiate a backup of the system', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(60, 'restore_backup', 'Permission to restore a backup', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(61, 'manage_tasks', 'Permission to manage tasks and workflow configurations', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(62, 'assign_tasks', 'Permission to assign tasks to users or teams', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(63, 'view_task_list', 'Permission to view the list of tasks', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(64, 'mark_task_complete', 'Permission to mark a task as completed', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(65, 'view_api_logs', 'Permission to view API usage logs', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(66, 'manage_integrations', 'Permission to manage system integrations (third-party tools, webhooks, etc.)', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(67, 'manage_api_access', '', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(68, 'manage_teams', 'Permission to create, edit, and delete teams', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(69, 'assign_team_roles', 'Permission to assign team roles and permissions', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(70, 'view_team_members', 'Permission to view team member information', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(71, 'manage_projects', 'Permission to create and manage projects', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(72, 'assign_project_tasks', 'Permission to assign tasks within projects', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(73, 'impersonate_user', 'Permission to impersonate other users for troubleshooting', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(74, 'access_admin_as_other_role', 'Permission to access the admin panel as a different role', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(75, 'shutdown_system', 'Permission to shut down the system in case of emergencies', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(76, 'manage_database', 'Permission to manage (backup, restore, optimize) the database', '2024-09-21 15:57:22', '2024-09-21 15:57:22'),
(77, 'view_dashboard', 'Permission to view the admin dashboard', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(78, 'access_admin_panel', 'Permission to access the administration panel', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(79, 'view_own_grades', 'Permission for students to view their own grades', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(80, 'view_own_assignments', 'Permission for students to view their own assignments', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(81, 'submit_assignments', 'Permission for students to submit assignments', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(82, 'view_course_materials', 'Permission for students to view course materials', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(83, 'view_timetable', 'Permission for students to view their own timetable or schedule', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(84, 'view_own_attendance', 'Permission for students to view their attendance records', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(85, 'manage_students', 'Permission to manage (add, edit, remove) students in their class', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(86, 'grade_assignments', 'Permission to grade student assignments', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(87, 'view_all_students', 'Permission to view all students in their class', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(88, 'view_class_attendance', 'Permission to view class attendance', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(89, 'manage_course_materials', 'Permission to upload and manage course materials', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(90, 'create_assignments', 'Permission to create new assignments', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(91, 'edit_assignments', 'Permission to edit existing assignments', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(92, 'view_teacher_reports', 'Permission to view reports related to the teachers class or subjects', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(93, 'view_class_timetable', 'Permission to view the class timetable', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(94, 'view_child_grades', 'Permission for parents to view their childs grades', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(95, 'view_child_attendance', 'Permission for parents to view their childs attendance records', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(96, 'view_child_assignments', 'Permission for parents to view assignments assigned to their child', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(97, 'communicate_with_teachers', 'Permission for parents to communicate with teachers', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(98, 'view_child_timetable', 'Permission for parents to view their childs timetable', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(99, 'view_school_announcements', 'Permission for parents to view school announcements or notices', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(100, 'manage_school_events', 'Permission to manage school events and announcements', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(101, 'manage_class_schedules', 'Permission to manage class schedules', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(102, 'manage_student_enrollment', 'Permission to manage student enrollment and records', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(103, 'view_all_reports', 'Permission to view all school-wide reports', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(104, 'manage_facilities', 'Permission to manage school facilities (library, labs, etc.)', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(105, 'view_school_timetable', 'Permission to view the overall school timetable', '2024-09-21 15:58:00', '2024-09-21 15:58:00'),
(326, 'parent_dashboard', 'Permission to view the parent dashboard', '2024-09-21 17:23:01', '2024-09-21 17:23:01'),
(327, 'teacher_dashboard', 'Permission to view teacher dashboard', '2024-09-21 15:57:22', '2024-09-21 15:57:22');

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

--
-- Table structure for table `preferences`
--

CREATE TABLE `preferences` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `receive_email_notifications` tinyint(1) DEFAULT 1,
  `receive_sms_notifications` tinyint(1) DEFAULT 0,
  `theme` varchar(50) DEFAULT 'light',
  `language` varchar(10) DEFAULT 'en',
  `timezone` varchar(50) DEFAULT 'UTC',
  `receive_push_notifications` tinyint(1) DEFAULT 0,
  `daily_summary_email` tinyint(1) DEFAULT 1,
  `privacy_mode` tinyint(1) DEFAULT 0,
  `marketing_emails` tinyint(1) DEFAULT 1,
  `account_activity_alerts` tinyint(1) DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `school_year` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `project`
--

CREATE TABLE `project` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `class_section_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) NOT NULL,
  `project_index` tinyint(4) DEFAULT NULL,
  `score` float DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `semester` varchar(25) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `project`
--

INSERT INTO `project` (`id`, `student_id`, `school_id`, `class_section_id`, `teacher_id`, `project_index`, `score`, `comment`, `semester`, `school_year`, `created_at`, `updated_at`) VALUES
(1, 118, '2500017', 30, 120, 1, 100, NULL, 'Fall', '2024-2025', '2025-07-25 05:23:28', '2025-07-25 05:23:28'),
(2, 118, '2500017', 30, 120, 2, 67, NULL, 'Fall', '2024-2025', '2025-07-25 05:23:28', '2025-07-25 05:23:28'),
(3, 118, '2500017', 30, 120, 3, 84, NULL, 'Fall', '2024-2025', '2025-07-25 05:23:28', '2025-07-25 05:23:28'),
(4, 112, '2500014', 30, 120, 1, 95, NULL, 'Fall', '2024-2025', '2025-07-25 05:23:28', '2025-07-25 05:23:28'),
(5, 112, '2500014', 30, 120, 2, 50, NULL, 'Fall', '2024-2025', '2025-07-25 05:23:28', '2025-07-25 05:23:28'),
(6, 112, '2500014', 30, 120, 3, 96, NULL, 'Fall', '2024-2025', '2025-07-25 05:23:28', '2025-07-25 05:23:28'),
(7, 123, '2500022', 30, 120, 1, 78, NULL, 'Fall', '2024-2025', '2025-07-25 05:23:28', '2025-07-25 05:23:28'),
(8, 123, '2500022', 30, 120, 2, 89, NULL, 'Fall', '2024-2025', '2025-07-25 05:23:28', '2025-07-25 05:23:28'),
(9, 123, '2500022', 30, 120, 3, 69, NULL, 'Fall', '2024-2025', '2025-07-25 05:23:28', '2025-07-25 05:23:28'),
(10, 107, '2500009', 60, 109, 1, 56, NULL, 'Fall', '2024-2025', '2025-07-25 05:35:32', '2025-07-25 05:35:32'),
(11, 107, '2500009', 60, 109, 2, 95, NULL, 'Fall', '2024-2025', '2025-07-25 05:35:32', '2025-07-25 05:35:32'),
(12, 110, '2500012', 60, 109, 1, 100, NULL, 'Fall', '2024-2025', '2025-07-25 05:35:32', '2025-07-25 05:35:32'),
(13, 110, '2500012', 60, 109, 2, 80, NULL, 'Fall', '2024-2025', '2025-07-25 05:35:32', '2025-07-25 05:35:32'),
(14, 111, '2500013', 60, 109, 1, 78, NULL, 'Fall', '2024-2025', '2025-07-25 05:35:32', '2025-07-25 05:35:32'),
(15, 111, '2500013', 60, 109, 2, 83, NULL, 'Fall', '2024-2025', '2025-07-25 05:35:32', '2025-07-25 05:35:32');

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

--
-- Table structure for table `qcmquestions`
--

CREATE TABLE `qcmquestions` (
  `qcm_question_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `answer_a` text NOT NULL,
  `answer_b` text NOT NULL,
  `answer_c` text DEFAULT NULL,
  `answer_d` text DEFAULT NULL,
  `answer_e` text DEFAULT NULL,
  `correct_answer` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `questions`
--

CREATE TABLE `questions` (
  `question_id` int(11) NOT NULL,
  `chapter_id` int(11) NOT NULL,
  `question_type_id` int(11) NOT NULL,
  `question_text` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `questionstruefalse`
--

CREATE TABLE `questionstruefalse` (
  `tf_question_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `correct_answer` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `questiontypes`
--

CREATE TABLE `questiontypes` (
  `question_type_id` int(11) NOT NULL,
  `question_type_name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `quiz`
--

CREATE TABLE `quiz` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `class_section_id` int(11) NOT NULL,
  `teacher_id` int(11) NOT NULL,
  `quiz_index` tinyint(11) NOT NULL,
  `score` float DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `semester` varchar(25) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `quiz`
--

INSERT INTO `quiz` (`id`, `student_id`, `school_id`, `class_section_id`, `teacher_id`, `quiz_index`, `score`, `comment`, `semester`, `school_year`, `created_at`, `updated_at`) VALUES
(1, 118, '', 30, 120, 1, 45, NULL, 'Fall', '2024-2025', '2025-07-25 05:22:13', '2025-07-25 05:22:13'),
(2, 118, '', 30, 120, 2, 67, NULL, 'Fall', '2024-2025', '2025-07-25 05:22:13', '2025-07-25 05:22:13'),
(3, 118, '', 30, 120, 3, 82, NULL, 'Fall', '2024-2025', '2025-07-25 05:22:13', '2025-07-25 05:22:13'),
(4, 112, '', 30, 120, 1, 90, NULL, 'Fall', '2024-2025', '2025-07-25 05:22:13', '2025-07-25 05:22:13'),
(5, 112, '', 30, 120, 2, 89, NULL, 'Fall', '2024-2025', '2025-07-25 05:22:13', '2025-07-25 05:22:13'),
(6, 112, '', 30, 120, 3, 77, NULL, 'Fall', '2024-2025', '2025-07-25 05:22:13', '2025-07-25 05:22:13'),
(7, 123, '', 30, 120, 1, 74, NULL, 'Fall', '2024-2025', '2025-07-25 05:22:13', '2025-07-25 05:22:13'),
(8, 123, '', 30, 120, 2, 99, NULL, 'Fall', '2024-2025', '2025-07-25 05:22:13', '2025-07-25 05:22:13'),
(9, 123, '', 30, 120, 3, 80, NULL, 'Fall', '2024-2025', '2025-07-25 05:22:13', '2025-07-25 05:22:13'),
(10, 107, '', 60, 109, 1, 93, NULL, 'Fall', '2024-2025', '2025-07-25 05:34:43', '2025-07-25 05:34:43'),
(11, 107, '', 60, 109, 2, 91, NULL, 'Fall', '2024-2025', '2025-07-25 05:34:43', '2025-07-25 05:34:43'),
(12, 107, '', 60, 109, 3, 83, NULL, 'Fall', '2024-2025', '2025-07-25 05:34:43', '2025-07-25 05:34:43'),
(13, 110, '', 60, 109, 1, 67, NULL, 'Fall', '2024-2025', '2025-07-25 05:34:43', '2025-07-25 05:34:43'),
(14, 110, '', 60, 109, 2, 80, NULL, 'Fall', '2024-2025', '2025-07-25 05:34:43', '2025-07-25 05:34:43'),
(15, 110, '', 60, 109, 3, 99, NULL, 'Fall', '2024-2025', '2025-07-25 05:34:43', '2025-07-25 05:34:43'),
(16, 111, '', 60, 109, 1, 89, NULL, 'Fall', '2024-2025', '2025-07-25 05:34:43', '2025-07-25 05:34:43'),
(17, 111, '', 60, 109, 2, 59, NULL, 'Fall', '2024-2025', '2025-07-25 05:34:43', '2025-07-25 05:34:43'),
(18, 111, '', 60, 109, 3, 100, NULL, 'Fall', '2024-2025', '2025-07-25 05:34:43', '2025-07-25 05:34:43'),
(19, 131, '', 23, 108, 1, 98.6, NULL, 'Fall', '2025-2026', '2025-08-24 17:41:13', '2025-08-24 17:41:13'),
(20, 130, '', 23, 108, 1, 66, NULL, 'Fall', '2025-2026', '2025-08-24 17:41:13', '2025-08-24 17:41:13'),
(21, 132, '', 23, 108, 1, 65.3, NULL, 'Fall', '2025-2026', '2025-08-24 17:41:13', '2025-08-24 17:41:13'),
(22, 133, '', 23, 108, 1, 55.1, NULL, 'Fall', '2025-2026', '2025-08-24 17:41:13', '2025-08-24 17:41:13');

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

--
-- Table structure for table `refunds`
--

CREATE TABLE `refunds` (
  `id` int(11) UNSIGNED NOT NULL,
  `parent_id` int(11) UNSIGNED NOT NULL,
  `school_year` varchar(20) NOT NULL,
  `invoice_id` int(11) UNSIGNED DEFAULT NULL,
  `refund_amount` decimal(10,2) NOT NULL,
  `requested_at` datetime NOT NULL DEFAULT current_timestamp(),
  `approved_at` datetime DEFAULT NULL,
  `refunded_at` datetime DEFAULT NULL,
  `status` enum('Pending','Partial','Approved','Rejected','Paid') NOT NULL DEFAULT 'Pending',
  `reason` varchar(255) DEFAULT NULL,
  `refund_paid_amount` decimal(10,2) NOT NULL,
  `request` varchar(25) DEFAULT NULL,
  `note` text DEFAULT NULL,
  `approved_by` int(11) UNSIGNED DEFAULT NULL,
  `updated_by` int(11) UNSIGNED DEFAULT NULL,
  `refund_method` enum('Check','Online','Cash') DEFAULT NULL,
  `check_nbr` varchar(100) DEFAULT NULL,
  `check_file` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `reimbursements`
--

CREATE TABLE `reimbursements` (
  `id` int(11) UNSIGNED NOT NULL,
  `expense_id` int(11) UNSIGNED DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `reimbursed_to` int(11) UNSIGNED NOT NULL,
  `approved_by` int(11) UNSIGNED DEFAULT NULL,
  `receipt_path` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` enum('Pending','Approved','Rejected','Paid') DEFAULT 'Pending',
  `added_by` int(11) UNSIGNED NOT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL,
  `check_number` varchar(100) DEFAULT NULL,
  `reimbursement_method` enum('Cash','Check') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int(11) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'administrator', 'Oversees all administrative functions of the school', '2024-07-10 22:11:23', '2024-08-02 03:30:42'),
(2, 'principal', 'Responsible for overall school management and operations', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(3, 'vice_principal', 'Assists the principal in administrative duties', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(4, 'teacher', 'Delivers classroom instruction', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(5, 'teacher_assistant', 'Supports the lead teacher in instructional duties', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(6, 'student', 'Attends classes and participates in school activities', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(7, 'parent', 'Engages with teachers and school administration about their child', '2024-07-10 22:11:23', '2024-08-02 22:26:11'),
(8, 'admin', 'Handles administrative tasks and supports school operations', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(9, 'head of department (communication)', 'Oversees the Communication department', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(10, 'head of department (information technology)', 'Oversees the Information Tehcnology department', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(11, 'head of department (education)', 'Oversees the Education department', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(12, 'head of department (finance)', 'Oversees the Financial department', '2024-07-10 22:11:23', '2024-08-02 03:36:31'),
(13, 'guest', 'Oversees all guest functions of the school', '2024-07-12 16:05:03', '2024-08-02 03:36:31'),
(14, 'authorized_user', 'Second user of the parent account that can view the overall parent information', '2024-07-10 22:11:23', '2024-08-02 03:30:42');

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

--
-- Table structure for table `role_permissions`
--

CREATE TABLE `role_permissions` (
  `id` int(11) UNSIGNED NOT NULL,
  `role_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  `can_create` tinyint(1) DEFAULT 0,
  `can_read` tinyint(1) DEFAULT 0,
  `can_update` tinyint(1) DEFAULT 0,
  `can_delete` tinyint(1) DEFAULT 0,
  `can_manage` tinyint(1) DEFAULT 0,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `role_permissions`
--

INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `can_create`, `can_read`, `can_update`, `can_delete`, `can_manage`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-07-19 17:27:01'),
(2, 1, 2, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(3, 1, 3, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(4, 1, 4, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(5, 1, 5, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(6, 1, 6, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(7, 1, 7, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(8, 1, 8, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(9, 1, 9, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(10, 1, 10, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(11, 1, 11, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(12, 1, 12, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(13, 1, 13, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(14, 1, 14, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(15, 1, 15, 1, 1, 1, 1, 0, '2024-07-19 17:27:01', '2024-08-11 04:22:34'),
(16, 2, 1, 1, 1, 1, 1, 0, '2024-08-31 04:34:16', '2024-08-31 05:01:31'),
(17, 2, 3, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(18, 2, 4, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(19, 2, 6, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(20, 2, 9, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(21, 2, 2, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(22, 2, 7, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(23, 2, 8, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(24, 2, 10, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(25, 2, 11, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(26, 2, 12, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(27, 2, 13, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(28, 2, 14, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(29, 2, 15, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31'),
(683, 7, 326, 1, 1, 1, 1, 0, '2024-09-21 16:23:42', '2024-09-21 16:23:42'),
(685, 14, 326, 0, 1, 0, 0, 0, '2024-09-28 05:20:31', '2024-09-28 05:20:31'),
(32, 5, 1, 1, 1, 1, 1, 0, '2024-08-31 05:02:50', '2024-08-31 05:02:50'),
(33, 6, 5, 1, 1, 1, 1, 0, '2024-08-31 05:03:02', '2024-08-31 05:03:02'),
(684, 4, 327, 1, 1, 1, 1, 0, '2024-09-23 15:20:04', '2024-09-23 15:20:04'),
(36, 8, 6, 1, 1, 1, 1, 0, '2024-08-31 15:36:52', '2024-08-31 15:36:52'),
(37, 11, 3, 1, 1, 1, 1, 0, '2024-09-04 14:24:19', '2024-09-04 14:24:19'),
(30, 2, 5, 1, 1, 1, 1, 0, '2024-08-31 05:01:31', '2024-08-31 05:01:31');

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

--
-- Table structure for table `scan_log`
--

CREATE TABLE `scan_log` (
  `id` int(11) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `card_id` varchar(255) DEFAULT NULL,
  `scan_time` datetime DEFAULT current_timestamp(),
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `score_comments`
--

CREATE TABLE `score_comments` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) UNSIGNED NOT NULL,
  `subject_id` int(11) NOT NULL,
  `score_type` varchar(50) NOT NULL,
  `semester` varchar(20) NOT NULL,
  `school_year` varchar(20) NOT NULL,
  `comment` text NOT NULL,
  `commented_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `score_comments`
--

INSERT INTO `score_comments` (`id`, `student_id`, `subject_id`, `score_type`, `semester`, `school_year`, `comment`, `commented_by`, `created_at`) VALUES
(1, 118, 0, 'ptap', 'Fall', '2024-2025', 'fkjsfjisgijgioj;oisj;ij;ffjv;Lxkskflkv;lzklja', 120, '2025-07-25 09:25:13'),
(2, 118, 0, 'midterm', 'Fall', '2024-2025', 'fiugihduiaoijf', 120, '2025-07-25 09:25:13'),
(3, 112, 0, 'ptap', 'Fall', '2024-2025', 'kdjwiouthojbkgjrtiohjiofwudjxioScjfkvmzck;aekreotibjkx;ovjaio', 120, '2025-07-25 09:25:13'),
(4, 112, 0, 'midterm', 'Fall', '2024-2025', 'quwioqwruptiouergfhvzci', 120, '2025-07-25 09:25:13'),
(5, 123, 0, 'ptap', 'Fall', '2024-2025', 'aefuigijoidewjioodfvjaiodjvnjkbnrtihe', 120, '2025-07-25 09:25:13'),
(6, 123, 0, 'midterm', 'Fall', '2024-2025', 'weuwtijisjpasodiqrkodkzoc', 120, '2025-07-25 09:25:13'),
(7, 107, 0, 'ptap', 'Fall', '2024-2025', 'afkosvojvfiogjbxfnvisogiegsjvioadiofjsvmcoidiaef', 109, '2025-07-25 09:37:56'),
(8, 107, 0, 'midterm', 'Fall', '2024-2025', 'jupoopknbcsqjwryrcbvgjfdsirtuynnxnzanajdjghuuiibb', 109, '2025-07-25 09:37:56'),
(9, 110, 0, 'ptap', 'Fall', '2024-2025', 'saioduqeiorutiofhbhxch OIjvnvnbxbsdfoibosieiduisiovaoefuigofvisdovjfoijgdigobjvisdjsiojrig', 109, '2025-07-25 09:37:56'),
(10, 110, 0, 'midterm', 'Fall', '2024-2025', 'dfiytuiwuweicdhbxhbduigyeugisfvjhieufhhvusdhg', 109, '2025-07-25 09:37:56'),
(11, 111, 0, 'ptap', 'Fall', '2024-2025', 'wieifgyihbjcjcxjsrtiyhnkxaq', 109, '2025-07-25 09:37:56'),
(12, 111, 0, 'midterm', 'Fall', '2024-2025', 'sdvisogureioxhizjefiowrgjsvjzxeiofwiowrouoidsuadiosgujsiojeijsksjiorterjigjsdviojfwrigjerisdvjdiwjr', 109, '2025-07-25 09:37:56');

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

--
-- Table structure for table `sections`
--

CREATE TABLE `sections` (
  `id` int(11) UNSIGNED NOT NULL,
  `section_name` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `sections`
--

INSERT INTO `sections` (`id`, `section_name`, `description`, `updated_at`, `updated_by`) VALUES
(1, '', 'No-Section', '2024-08-16 01:06:30', 1),
(2, 'A', 'Section A', '2024-08-16 01:06:30', 1),
(3, 'B', 'Section B', '2024-08-16 01:06:30', 1),
(4, 'C', 'Section C', '2024-08-16 01:06:30', 1),
(5, 'D', 'Section D', '2024-08-16 01:06:30', 1),
(6, 'E', 'Section E', '2024-08-16 01:06:30', 1);

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

--
-- Table structure for table `semester_scores`
--

CREATE TABLE `semester_scores` (
  `id` int(10) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` char(36) NOT NULL,
  `class_section_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `homework_avg` float DEFAULT NULL,
  `quiz_avg` float DEFAULT NULL,
  `project_avg` float DEFAULT NULL,
  `midterm_exam_score` float DEFAULT NULL,
  `final_exam_score` float DEFAULT NULL,
  `attendance_score` float DEFAULT NULL,
  `participation_score` float DEFAULT NULL,
  `ptap_score` float DEFAULT NULL,
  `test_avg` float DEFAULT NULL,
  `semester_score` float DEFAULT NULL,
  `semester` varchar(20) DEFAULT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `semester_scores`
--

INSERT INTO `semester_scores` (`id`, `student_id`, `school_id`, `class_section_id`, `teacher_id`, `homework_avg`, `quiz_avg`, `project_avg`, `midterm_exam_score`, `final_exam_score`, `attendance_score`, `participation_score`, `ptap_score`, `test_avg`, `semester_score`, `semester`, `school_year`, `created_at`, `updated_at`) VALUES
(1, 136, '2500047', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:48', '2025-08-11 23:30:12'),
(2, 107, '2500009', 120, 148, 99, 0, 0, 100, NULL, 92.86, 0, 24.75, NULL, 83.5, 'Fall', '2025-2026', '2025-08-11 23:20:48', '2025-08-11 23:30:12'),
(3, 110, '2500012', 120, 148, 99, 0, 0, 100, NULL, 92.86, 0, 24.75, NULL, 83.5, 'Fall', '2025-2026', '2025-08-11 23:20:48', '2025-08-11 23:30:12'),
(4, 112, '2500014', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:48', '2025-08-11 23:30:12'),
(5, 114, '2500015', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:48', '2025-08-11 23:30:12'),
(6, 115, '2500011', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:48', '2025-08-11 23:30:12'),
(7, 116, '2500010', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:48', '2025-08-11 23:30:12'),
(8, 117, '2500016', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:49', '2025-08-11 23:30:12'),
(9, 118, '2500017', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:49', '2025-08-11 23:30:12'),
(10, 119, '2500018', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:49', '2025-08-11 23:30:12'),
(11, 120, '2500019', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:49', '2025-08-11 23:30:12'),
(12, 123, '2500022', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:49', '2025-08-11 23:30:12'),
(13, 124, '2500035', 120, 148, 99, 0, 0, 100, NULL, 100, 0, 24.75, NULL, 85, 'Fall', '2025-2026', '2025-08-11 23:20:49', '2025-08-11 23:30:12'),
(14, 125, '2500038', 120, 148, 99, 0, 0, 100, NULL, 92.86, 0, 24.75, NULL, 83.5, 'Fall', '2025-2026', '2025-08-11 23:20:49', '2025-08-11 23:30:12'),
(15, 130, '2500043', 23, 108, 99.15, 66, 0, 99.6, NULL, 100, 100, 66.29, NULL, 93, 'Fall', '2025-2026', '2025-08-24 13:35:11', '2025-08-24 13:46:09'),
(16, 131, '2500044', 23, 108, 74.65, 98.6, 0, 95.3, NULL, 100, 100, 68.31, NULL, 90.8, 'Fall', '2025-2026', '2025-08-24 13:35:11', '2025-08-24 13:46:05'),
(17, 132, '2500045', 23, 108, 99.65, 65.3, 0, 99.9, NULL, 100, 100, 66.24, NULL, 93.2, 'Fall', '2025-2026', '2025-08-24 13:35:11', '2025-08-24 13:46:12'),
(18, 133, '2500046', 23, 108, 99.75, 55.1, 0, 96, NULL, 100, 80, 58.71, NULL, 89.3, 'Fall', '2025-2026', '2025-08-24 13:35:11', '2025-08-24 13:46:15');

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

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int(11) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `timezone` varchar(255) NOT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `shortanswerquestions`
--

CREATE TABLE `shortanswerquestions` (
  `sa_question_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `correct_answer` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `staff`
--

CREATE TABLE `staff` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(11) UNSIGNED NOT NULL,
  `firstname` varchar(100) NOT NULL,
  `lastname` varchar(100) NOT NULL,
  `email` varchar(150) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `role_name` varchar(100) NOT NULL,
  `active_role` varchar(100) DEFAULT '''Active''',
  `school_year` varchar(9) NOT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `staff`
--

INSERT INTO `staff` (`id`, `user_id`, `firstname`, `lastname`, `email`, `phone`, `role_name`, `active_role`, `school_year`, `created_at`, `updated_at`) VALUES
(1, 1, 'AdminFirstName', 'AdminLastName', 'aadminlastname@alrahmaisgl.org', '0001234569', 'administrator', 'administrator', '2024-2025', '2025-07-09 03:24:07', '2025-08-16 14:31:43'),
(29, 108, 'Lhaj', 'elabidi', 'lelabidi@alrahmaisgl.org', '(617)-309-6743', 'teacher', 'teacher', '2025-2026', '2025-08-16 14:44:10', '2025-08-16 18:44:10'),
(30, 109, 'Ahmed', 'Rachidi', 'arachidi@alrahmaisgl.org', '(123)-456-7890', 'parent', 'inactive', '2025-2026', '2025-08-16 14:44:16', '2025-08-16 18:44:16'),
(31, 110, 'Imran', 'Elma', 'ielma@alrahmaisgl.org', '(617)-309-6743', 'teacher_assistant, guest', 'teacher_assistant', '2025-2026', '2025-08-16 14:44:20', '2025-08-16 18:46:32'),
(32, 111, 'Jj', 'Cj', 'jcj@alrahmaisgl.org', '(617)-309-6743', 'admin', 'admin', '2025-2026', '2025-08-16 14:44:26', '2025-08-16 18:44:26');

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

--
-- Table structure for table `students`
--

CREATE TABLE `students` (
  `id` int(11) UNSIGNED NOT NULL,
  `school_id` char(100) NOT NULL,
  `firstname` varchar(255) NOT NULL,
  `lastname` varchar(255) NOT NULL,
  `dob` date DEFAULT NULL,
  `age` int(11) NOT NULL,
  `gender` varchar(10) NOT NULL,
  `registration_grade` varchar(50) DEFAULT NULL,
  `photo_consent` tinyint(1) NOT NULL,
  `parent_id` int(11) NOT NULL,
  `registration_date` datetime DEFAULT NULL,
  `tuition_paid` tinyint(1) NOT NULL DEFAULT 0,
  `year_of_registration` varchar(25) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `rfid_tag` varchar(100) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL,
  `is_new` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1 = new student, 0 = returning student'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `students`
--

INSERT INTO `students` (`id`, `school_id`, `firstname`, `lastname`, `dob`, `age`, `gender`, `registration_grade`, `photo_consent`, `parent_id`, `registration_date`, `tuition_paid`, `year_of_registration`, `school_year`, `rfid_tag`, `semester`, `is_new`) VALUES
(107, '2500009', 'Doha', 'Elabidi', '2012-10-23', 12, 'Female', '6', 1, 108, '2025-05-13 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(110, '2500012', 'Ffg', 'Ff', '2007-05-16', 18, 'Male', '6', 1, 110, '2025-05-14 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(112, '2500014', 'Fg', 'Ff', '2016-05-13', 9, 'Male', '5', 1, 110, '2025-05-14 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(114, '2500015', 'F', 'Vh', '2013-02-13', 12, 'male', '6', 1, 111, '2025-05-14 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(115, '2500011', 'Sd', 'Yjyj', '2013-05-13', 437, 'male', '2', 1, 111, '2025-05-14 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(116, '2500010', 'Hy', 'Gg', '2015-05-13', 89, 'female', '2', 1, 111, '2025-05-14 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(117, '2500016', 'Rr', 'Fr', '1577-05-13', 448, 'male', '8', 1, 111, '2025-05-14 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(118, '2500017', 'Imran Badr', 'Elmerzouki', '2015-01-17', 10, 'Male', '4', 0, 114, '2025-05-18 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(119, '2500018', 'Test', 'Elabidi', '1938-01-01', 87, 'Male', '3', 1, 114, '2025-05-18 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(120, '2500019', 'Harwood', 'Egan', '2013-12-31', 11, 'Female', '8', 0, 115, '2025-05-20 00:00:00', 0, '2025', '2024/2025', NULL, NULL, 1),
(123, '2500022', 'Rania', 'Rahman', '2020-04-24', 5, 'Female', 'K', 1, 119, '2025-06-28 00:00:00', 0, '2025', '2024-2025', NULL, NULL, 1),
(124, '2500035', 'Amirah', 'Abdalaoui', '2017-07-12', 8, 'Female', 'KG', 1, 150, '2025-07-22 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(125, '2500038', 'Salma', 'Elmalki', '2012-02-24', 13, 'Female', '8', 0, 152, '2025-07-23 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(126, '2500039', 'Leena', 'Elmalki', '2015-03-21', 10, 'Female', '5', 1, 152, '2025-07-23 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(127, '2500040', 'Adil', 'Fdsa', '2016-06-28', 9, 'Male', '4', 0, 148, '2025-07-25 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(128, '2500041', 'Rahima', 'Ghyt', '2012-01-14', 13, 'Female', '3', 0, 148, '2025-07-25 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(129, '2500042', 'Fifi', 'Azf', '2018-06-07', 7, 'Female', '5', 1, 148, '2025-07-25 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(130, '2500043', 'Dodo', 'Lsf', '2014-09-18', 11, 'Female', '6', 0, 148, '2025-07-25 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(131, '2500044', 'Sara', 'Chak', '2016-05-09', 9, 'Female', '4', 1, 148, '2025-07-25 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(132, '2500045', 'Med', 'Lsf', '2019-10-15', 5, 'Male', '3', 0, 148, '2025-07-25 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(133, '2500046', 'Abd', 'Tem', '2019-02-25', 6, 'Male', '1', 1, 148, '2025-07-25 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 1),
(136, '2500047', 'A-V Ddd', 'Asd-Hdf Fdgg', '2007-12-31', 18, 'Male', '12', 1, 121, '2025-08-02 00:00:00', 0, '2025', '2024-2025', NULL, 'Fall', 0);

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

--
-- Table structure for table `student_allergies`
--

CREATE TABLE `student_allergies` (
  `id` int(11) NOT NULL,
  `student_id` int(10) UNSIGNED NOT NULL,
  `allergy` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `student_allergies`
--

INSERT INTO `student_allergies` (`id`, `student_id`, `allergy`) VALUES
(1, 124, 'None'),
(3, 125, 'None'),
(4, 126, 'None'),
(5, 127, 'Cleaning Products'),
(6, 128, 'Animal Dander Allergy'),
(7, 129, 'Aspirin Allergy'),
(8, 130, 'Aspirin Allergy'),
(9, 131, 'Chlorine Allergy'),
(10, 131, 'Pollen'),
(11, 132, 'Soy Allergy'),
(12, 133, 'Celery Allergy'),
(15, 136, 'Animal Dander');

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

--
-- Table structure for table `student_class`
--

CREATE TABLE `student_class` (
  `id` int(11) UNSIGNED NOT NULL,
  `student_id` int(11) NOT NULL,
  `class_section_id` int(11) DEFAULT NULL,
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(25) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_class`
--

INSERT INTO `student_class` (`id`, `student_id`, `class_section_id`, `semester`, `school_year`, `description`, `created_at`, `updated_at`, `updated_by`) VALUES
(1, 136, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(2, 107, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(3, 110, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(4, 112, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(5, 114, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(6, 115, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(7, 116, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(8, 117, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(9, 118, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(10, 119, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(11, 120, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(12, 123, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(13, 124, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(14, 125, 120, 'Fall', '2025-2026', NULL, '2025-08-02 02:46:34', '2025-08-08 05:09:19', 1),
(17, 127, 11, 'Fall', '2025-2026', NULL, '2025-08-12 23:12:18', '2025-08-12 23:12:18', 1),
(18, 128, 11, 'Fall', '2025-2026', NULL, '2025-08-12 23:12:24', '2025-08-12 23:12:24', 1),
(19, 129, 11, 'Fall', '2025-2026', NULL, '2025-08-12 23:12:30', '2025-08-12 23:12:30', 1),
(20, 130, 23, 'Fall', '2025-2026', NULL, '2025-08-19 03:18:42', '2025-08-19 03:18:42', 1),
(21, 131, 23, 'Fall', '2025-2026', NULL, '2025-08-19 03:18:49', '2025-08-19 03:18:49', 1),
(22, 132, 23, 'Fall', '2025-2026', NULL, '2025-08-19 03:18:55', '2025-08-19 03:18:55', 1),
(23, 133, 23, 'Fall', '2025-2026', NULL, '2025-08-19 03:19:03', '2025-08-19 03:19:03', 1);

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

--
-- Table structure for table `student_medical_conditions`
--

CREATE TABLE `student_medical_conditions` (
  `id` int(11) NOT NULL,
  `student_id` int(10) UNSIGNED NOT NULL,
  `condition_name` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `student_medical_conditions`
--

INSERT INTO `student_medical_conditions` (`id`, `student_id`, `condition_name`) VALUES
(1, 124, 'None'),
(3, 125, 'None'),
(4, 126, 'None'),
(5, 127, 'Asthma'),
(6, 128, 'Adhd'),
(7, 129, 'Autism Spectrum Disorder (asd)'),
(8, 130, 'Asthma'),
(9, 131, 'Anxiety Disorders'),
(10, 132, 'Physical Disabilities'),
(11, 133, 'Vision Impairments'),
(14, 136, 'ADHD');

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

--
-- Table structure for table `support_requests`
--

CREATE TABLE `support_requests` (
  `id` int(11) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `status` varchar(25) NOT NULL DEFAULT 'open',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Table structure for table `teacher_class`
--

CREATE TABLE `teacher_class` (
  `id` int(11) UNSIGNED NOT NULL,
  `class_section_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `first_ta_id` int(11) DEFAULT NULL,
  `second_ta_id` int(11) DEFAULT NULL,
  `semester` varchar(25) NOT NULL,
  `school_year` varchar(25) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `teacher_class`
--

INSERT INTO `teacher_class` (`id`, `class_section_id`, `teacher_id`, `first_ta_id`, `second_ta_id`, `semester`, `school_year`, `description`, `created_at`, `updated_at`, `updated_by`) VALUES
(19, 23, 108, 110, NULL, 'Fall', '2025-2026', NULL, '2025-08-16 19:11:06', '2025-08-16 20:13:56', 1);

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

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

CREATE TABLE `users` (
  `id` int(11) UNSIGNED NOT NULL,
  `school_id` int(11) UNSIGNED DEFAULT NULL,
  `firstname` varchar(255) NOT NULL,
  `lastname` varchar(255) NOT NULL,
  `gender` enum('Male','Female') DEFAULT NULL,
  `cellphone` varchar(25) NOT NULL,
  `email` varchar(255) NOT NULL,
  `address_street` varchar(255) NOT NULL,
  `apt` varchar(25) DEFAULT NULL,
  `city` varchar(255) NOT NULL,
  `state` varchar(25) NOT NULL,
  `zip` varchar(25) NOT NULL,
  `accept_school_policy` tinyint(1) NOT NULL,
  `is_verified` tinyint(1) NOT NULL DEFAULT 0,
  `status` varchar(10) NOT NULL DEFAULT 'Inactive',
  `is_suspended` tinyint(1) NOT NULL DEFAULT 0,
  `failed_attempts` int(11) DEFAULT 0,
  `password` varchar(255) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `token` varchar(255) DEFAULT NULL,
  `account_id` varchar(255) DEFAULT NULL,
  `user_type` enum('primary','secondary','tertiary') DEFAULT 'primary',
  `semester` varchar(255) NOT NULL,
  `school_year` varchar(9) DEFAULT NULL,
  `rfid_tag` varchar(100) DEFAULT NULL,
  `last_failed_at` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `school_id`, `firstname`, `lastname`, `gender`, `cellphone`, `email`, `address_street`, `apt`, `city`, `state`, `zip`, `accept_school_policy`, `is_verified`, `status`, `is_suspended`, `failed_attempts`, `password`, `created_at`, `updated_at`, `token`, `account_id`, `user_type`, `semester`, `school_year`, `rfid_tag`, `last_failed_at`) VALUES
(1, 2500001, 'AdminFirstName', 'AdminLastName', 'Male', '0001234569', 'administrator@gmail.com', '2 bfbg', '', 'lowell', 'ma', '0000', 1, 1, 'Active', 0, 0, 'sha256$100000$c754c0c1d5926b6961c8d1eb3e5453b0$b1da71cea3e52b1669f15434136242e3a73019174a503d5fe1744ea57c1a0d4f65b566c198fd9389b4c6f6b702597644e2509f921df36083b058bed92493c583', '2024-08-02 00:24:41', '2025-08-24 17:32:41', NULL, 'ACC00000066', 'primary', '', '2024-2025', '000000001', NULL),
(109, 2500002, 'Ahmed', 'Rachidi', 'Female', '(123)-456-7890', 'alrahma.isgl1@gmail.com', '5 courthouse', '', 'Checlmsford', 'MA', '01824', 1, 1, 'Active', 0, 0, 'sha256$100000$09beb0cfd26f321135ee1f7db3550851$879e93f04235de6502cc476c6184aee0937fe5d632aa9ea6a30b32c74483d51499aa436064adc7f7180d49b24ba309f51fe6a12666f3a5fc3faf08cbe931d093', '2025-05-13 22:43:03', '2025-07-28 00:58:34', NULL, 'ACC00000109', 'primary', '', '2024-2025', NULL, NULL),
(108, 2500003, 'Lhaj', 'elabidi', 'Male', '(617)-309-6743', 'moulay.elabidi@gmail.com', '90 swan st', '', 'lowell', 'MA', '01852', 1, 1, 'Active', 0, 0, 'sha256$100000$51373caaf8c1fc2f86f195c5203ae3c7$47e7eb5e74e1ae8a654393ca5d97e9f1e0af3494ae6daf932d8f0ae45a685da745f44a05496f00b2c2ce2f443ecd20c24fad4e2869a8f63330126d9dc72e1b65', '2025-05-13 22:22:11', '2025-08-24 17:51:58', NULL, 'ACC00000108', 'primary', '', '2024-2025', NULL, NULL),
(110, 2500004, 'Imran', 'Elma', 'Male', '(617)-309-6743', 'badrimranelma@gmail.com', '90swan st', '201', 'Lowell', 'OK', '01852', 1, 1, 'Active', 0, 0, 'sha256$100000$14b097396501bd9dc009ccdbd7d40013$42e930820ad62eeb043d6300053aa5ce77dee86c1c63253daad41dbf3d225699cb3a2181c233f7770e85b9b09b9fa0fd4b2c869aab8afa0dc09cd9818caa2a51', '2025-05-14 00:50:25', '2025-05-14 00:52:49', NULL, 'ACC00000110', 'primary', '', '2024-2025', NULL, NULL),
(111, 2500005, 'Jj', 'Cj', 'Male', '(617)-309-6743', 'jesscharles504@gmail.com', '90swan st', '201', 'Lowell', 'MA', '01852', 1, 1, 'Active', 0, 1, 'sha256$100000$d04af3943fc88aa51311bb6c3fd15245$6981676908173ba86ddb06efc190bb37beff5bc63bdbc5b8beda4466ab6e888a4de831c2933219a8572453ec88330e71c8e731bec2bd16d65c42b123f2eae50b', '2025-05-14 01:36:06', '2025-07-24 19:46:01', NULL, 'ACC00000111', 'primary', '', '2024-2025', NULL, '2025-07-24 19:46:01'),
(118, 2500020, 'Abdessamad ', 'Koukou', 'Male', '(617)-953-7463', 'kousami@gmail.com', '797 Varnum Ave', '', 'Lowell', 'MA', '01854', 1, 1, 'Active', 0, 0, 'sha256$100000$2f93a6c0fbb43725c8e1727808cf70f1$a3d10cd418ef82322f8f5d087941daf078b38a69b6d3c5209a04987cc8ceb4977c6e01456b667c089d73d689d211bd1497889f910280ea6d534691caedbbb6bc', '2025-06-28 04:42:00', '2025-06-28 04:43:44', NULL, 'ACC00000118', 'primary', 'Fall', '2024-2025', NULL, NULL),
(114, 2500007, 'Moulay', 'Elabidi', 'Male', '(617)-309-6743', 'larbi.elabidi@gmail.com', '90 swan st', 'WE3', 'Lowell', 'MA', '01852', 1, 1, 'Active', 0, 1, 'sha256$100000$35bf3b6177d4b43c7703fe76a29f0893$de5d2a25629e018d3276d8d5148a03dc1e2bd47c7870bbec505f20748f02fb9d94c1db79a3041776adc6cd2ae0011876f58027422ee1cfed566d88e8c2a7a362', '2025-05-18 03:44:46', '2025-05-24 03:36:51', NULL, 'ACC00000114', 'primary', '', '2024-2025', NULL, '2025-05-24 03:36:51'),
(115, 2500008, 'Doah', 'Imran', 'Male', '(876)-892-7893', 'doahimran@gmail.com', '90 swan st ', '201', 'Lowell', 'MA', '09239', 1, 1, 'Active', 0, 0, 'sha256$100000$924f4d507059284b682a48d766a61c53$5c77369cfaf3a4f4fd17ce7232b1acd66630325429f422c18c93caca812727206c71de1856e9de69ba699b8c5dfedab3377ac62e2f6ab5b93cd7a8364fc6d8e6', '2025-05-20 00:32:21', '2025-05-20 01:20:30', NULL, 'ACC00000115', 'primary', '', '2024-2025', NULL, NULL),
(119, 2500021, 'Ebad', 'Rahman', 'Male', '(603)-860-2854', 'rahmanek@gmail.com', '74 Park St', '1', 'Woburn', 'MA', '01801', 1, 1, 'Active', 0, 0, 'sha256$100000$d1ca5c509d419a1899898ae72c0bb01b$aa86c422d033756aae241ec7b7723eb1103ac123b2e64e16435999e2ec80eec27491a9b5f1b4fa5002ed53286e2b9cbe04a306b44e3e68cda766cf9485818811', '2025-06-28 21:46:13', '2025-07-20 15:08:53', NULL, 'ACC00000119', 'primary', 'Fall', '2024-2025', NULL, NULL),
(120, 2500023, 'Hicham', 'Youssuf', 'Female', '(123)-456-7890', 'teacher@gmail.com', '5 courthouse', '', 'Checlmsford', 'MA', '01824', 1, 1, 'Active', 0, 0, 'sha256$100000$c754c0c1d5926b6961c8d1eb3e5453b0$b1da71cea3e52b1669f15434136242e3a73019174a503d5fe1744ea57c1a0d4f65b566c198fd9389b4c6f6b702597644e2509f921df36083b058bed92493c583', '2025-05-13 22:43:03', '2025-07-25 05:04:40', NULL, 'ACC00000122', 'primary', '', '2024-2025', NULL, NULL),
(121, 2500024, 'Nawal', 'Mahmoud', 'Female', '(123)-456-7890', 'parent@gmail.com', '5 courthouse', '', 'Checlmsford', 'MA', '01824', 1, 1, 'Active', 0, 0, 'sha256$100000$09beb0cfd26f321135ee1f7db3550851$879e93f04235de6502cc476c6184aee0937fe5d632aa9ea6a30b32c74483d51499aa436064adc7f7180d49b24ba309f51fe6a12666f3a5fc3faf08cbe931d093', '2025-05-13 22:43:03', '2025-08-11 04:02:16', NULL, 'ACC00000123', 'primary', '', '2024-2025', NULL, NULL),
(131, 2500026, 'Myhfid', 'Benouallad', 'Male', '(781)-267-3118', 'benouallad@gmail.com', '147 Rangeway Rd', '1412', 'North Billerica', 'MA', '01862', 1, 1, 'Active', 0, 0, 'sha256$100000$c651b79606a38cdc170735fe6670ea2d$0bc51bb9a61497e406dc3cb884446329067f6d9c65413315347b5c6da099dc09f54ee4c73cdbeb79a37e68681d79faea57c08eafd06bf7c8b0c224f89cf4c57a', '2025-07-12 01:35:57', '2025-07-12 01:38:32', NULL, 'ACC00000131', 'primary', 'Fall', '2024-2025', NULL, NULL),
(145, 2500030, 'Iman', 'Imimi', 'Female', '2468875432', 'imane.lassfar@gmail.com', '90 Swan', '234', 'Lowell', 'MA', '19528', 1, 1, 'Active', 0, 0, 'sha256$100000$338c772010cc6d48d40cac5e3d88b1c8$0486250b1770cda56cace00795c4457fd5c66c49e465b6710aaba564ee22b13046d708225388850c8355cc05ef9e5c5893f9e3057fd99098fc573062a09cb13c', '2025-07-17 04:05:04', '2025-07-17 04:08:34', NULL, 'ACC00000145', 'primary', 'Fall', '2024-2025', NULL, NULL),
(142, 2500029, 'Outmane', 'Lemtiri Chlieh', 'Male', '4049998888', 'olemtiri@hotmail.com', '255 Main Street', '6', 'Lowell', 'MA', '01854', 1, 1, 'Active', 0, 0, 'sha256$100000$0b8d825805da1011fcff00e2f3b7772b$fa407cc600285747951b8cf0912dba9d14da15cfcfd6362b5245d66340766ad10ae0b47ab4d4719f763d70c70371064abf93022b1f3dae74cbff1738172dcdc3', '2025-07-17 03:15:27', '2025-07-19 01:44:25', NULL, 'ACC00000142', 'primary', 'Fall', '2024-2025', NULL, NULL),
(149, 2500033, 'Dad', 'Parents', 'Male', '(014)-563-4889', 'moltadalti@necub.com', 'Gf 45', '5', 'Lowell', 'MA', '07526', 1, 1, 'Active', 0, 0, 'sha256$100000$74db12e96583912f3702d7355ef461a3$4cab0e4f5cfebc44cfcf2dde52def440eb9374bf176d547230ddd6aaeda26de8a4acd0b74e502b95c6f79a16c5ee8d716765c9eda71712a11cb2ddd196e3575a', '2025-07-21 23:42:45', '2025-07-21 23:49:04', NULL, 'ACC00000149', 'primary', 'Fall', '2024-2025', NULL, NULL),
(148, 2500032, 'Testname', 'Testlast', 'Male', '(012)-365-4789', 'malrahma.isgl@gmail.com', '123 Test Address', '', 'Boston', 'MA', '01236', 1, 1, 'Active', 0, 0, 'sha256$100000$4af5f8bdd469c54b1a0d8a74ca40c31a$d6b0aface87a8ddb87c8386d78f3333ca4ed373971322f953bb0daacc8a910e0e215c0315b59bc236c2edfc273e40e7e1edd08d4e695d72674eab883544554e4', '2025-07-21 22:47:54', '2025-08-19 03:17:41', NULL, 'ACC00000148', 'primary', 'Fall', '2024-2025', NULL, NULL),
(150, 2500034, 'Amjad', 'Abdalaoui', 'Male', '(617)-415-3666', 'ahmedabdalaoui@gmail.com', '1260 Westford St', '5', 'Lowell', 'MA', '01851', 1, 1, 'Active', 0, 0, 'sha256$100000$ae3680ad62af17833bf51092bc62fd5b$75f7f74fa1e2c37428d50fed6fade3ef0b9c3eee7233d6f569d70390f4817512d5308f61b6cf4545bc0d5ccbb575554cecbc500566dd9cc4ed76764ee01c3852', '2025-07-22 21:22:30', '2025-07-22 21:27:07', NULL, 'ACC00000150', 'primary', 'Fall', '2024-2025', NULL, NULL),
(151, 2500036, 'Faisal', 'Qabba', 'Male', '(617)-669-3076', 'fqabba242@gmail.com', '29 Pratt Avenue', 'APRT 5', 'Lowell', 'MA', '08151', 1, 1, 'Active', 0, 0, 'sha256$100000$471d7e865cd34c543fcd01d308582e9c$85f6a669a3e2c9b991e7b61dcd1511c3b3288671362d2e58f32bde168872c9ce2df379e997ed446a9af6febc26d5c5bdb6259f393a04dcea9f19dce55d1f93e4', '2025-07-22 22:37:57', '2025-07-22 22:39:46', NULL, 'ACC00000151', 'primary', 'Fall', '2024-2025', NULL, NULL),
(152, 2500037, 'Abdelhak', 'Elmalki', 'Male', '(351)-220-3163', 'abdelhaklmlk@gmail.com', '1 Tech Valley Dr', '2321', 'Westford', 'MA', '01886', 1, 1, 'Active', 0, 0, 'sha256$100000$24117a56ebd7cca0f7350a4b820193e2$8412607a8b5a0ac5fd77bd2d8f9c6c4e6dd4b949e0b31db48c8584b45ad1fdc8e5b483dee45f494d9afb0bb1dfd1b2be30274d1107b6b72010858218672c6881', '2025-07-23 11:26:40', '2025-07-23 11:32:11', NULL, 'ACC00000152', 'primary', 'Fall', '2024-2025', NULL, NULL),
(153, 2500038, 'Test', 'Emailsending', 'Male', '(123)-654-7895', 'alrahma.isgl@gmail.com', '15 Sdnjsnhfs', '14', 'Lowell', 'MA', '01236', 1, 1, 'Active', 0, 0, 'sha256$100000$8d187e0a413011b4117ebd401ee50d92$db3532f1c72d0fc03181e1e3b0858cd30fc6b130242c55c2ad6f086be6878e01abe9e28e6bee04517a2c2271ae2cd3af266d00e9b23ab699afd98647d5fc52de', '2025-08-20 03:00:34', '2025-08-20 03:03:38', NULL, 'ACC00000153', 'primary', 'Fall', '2025-2026', NULL, NULL);

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

--
-- Table structure for table `user_notifications`
--

CREATE TABLE `user_notifications` (
  `id` int(11) UNSIGNED NOT NULL,
  `notification_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `is_read` tinyint(1) DEFAULT 0,
  `delivered` tinyint(1) DEFAULT 0,
  `delivered_at` datetime DEFAULT NULL,
  `school_year` varchar(20) DEFAULT NULL,
  `semester` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_notifications`
--

INSERT INTO `user_notifications` (`id`, `notification_id`, `user_id`, `is_read`, `delivered`, `delivered_at`, `school_year`, `semester`) VALUES
(1, 1, 119, 0, 0, NULL, NULL, NULL),
(2, 2, 122, 0, 0, NULL, NULL, NULL),
(3, 3, 122, 0, 0, NULL, NULL, NULL),
(4, 4, 123, 0, 0, NULL, NULL, NULL),
(5, 5, 123, 0, 0, NULL, NULL, NULL),
(6, 6, 124, 0, 0, NULL, NULL, NULL),
(7, 7, 124, 0, 0, NULL, NULL, NULL),
(8, 8, 125, 0, 0, NULL, NULL, NULL),
(9, 9, 125, 0, 0, NULL, NULL, NULL),
(10, 10, 127, 0, 0, NULL, NULL, NULL),
(11, 11, 127, 0, 0, NULL, NULL, NULL),
(12, 12, 126, 0, 0, NULL, NULL, NULL),
(13, 13, 126, 0, 0, NULL, NULL, NULL),
(14, 14, 128, 0, 0, NULL, NULL, NULL),
(15, 15, 128, 0, 0, NULL, NULL, NULL),
(16, 16, 129, 0, 0, NULL, NULL, NULL),
(17, 17, 129, 0, 0, NULL, NULL, NULL),
(18, 18, 133, 0, 0, NULL, NULL, NULL),
(19, 19, 132, 0, 0, NULL, NULL, NULL),
(20, 20, 134, 0, 0, NULL, NULL, NULL),
(21, 21, 136, 0, 0, NULL, NULL, NULL),
(22, 22, 137, 0, 0, NULL, NULL, NULL),
(23, 23, 139, 0, 0, NULL, NULL, NULL),
(24, 24, 150, 0, 0, NULL, NULL, NULL),
(25, 25, 150, 0, 0, NULL, NULL, NULL),
(26, 26, 148, 0, 0, NULL, NULL, NULL),
(27, 27, 121, 0, 0, NULL, NULL, NULL),
(28, 28, 121, 0, 0, NULL, NULL, NULL),
(29, 29, 121, 0, 0, NULL, NULL, NULL),
(30, 30, 121, 0, 0, NULL, NULL, NULL),
(31, 31, 121, 0, 0, NULL, NULL, NULL),
(32, 32, 148, 0, 0, NULL, NULL, NULL);

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

--
-- Table structure for table `user_preferences`
--

CREATE TABLE `user_preferences` (
  `id` int(11) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `notification_email` tinyint(1) DEFAULT 1,
  `notification_sms` tinyint(1) DEFAULT 1,
  `theme` varchar(50) DEFAULT 'light',
  `language` varchar(50) DEFAULT 'en',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `user_roles`
--

CREATE TABLE `user_roles` (
  `id` int(11) UNSIGNED NOT NULL,
  `user_id` int(11) UNSIGNED NOT NULL,
  `role_id` int(11) UNSIGNED NOT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_roles`
--

INSERT INTO `user_roles` (`id`, `user_id`, `role_id`, `created_at`, `updated_at`, `deleted_at`, `updated_by`) VALUES
(1, 1, 1, '2025-07-19 01:36:34', '2025-08-16 14:42:22', NULL, 1),
(144, 153, 7, '2025-08-20 03:00:34', '2025-08-20 03:00:34', NULL, NULL),
(141, 111, 8, '2025-08-16 18:44:26', '2025-08-16 18:44:26', NULL, 1),
(143, 110, 5, '2025-08-16 18:46:32', '2025-08-16 18:46:32', NULL, 1),
(139, 109, 7, '2025-08-16 18:44:16', '2025-08-16 18:44:16', NULL, 1),
(138, 108, 4, '2025-08-16 18:44:10', '2025-08-16 18:44:10', NULL, 1);

--
-- Indexes for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `enrollments`
--
ALTER TABLE `enrollments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_id` (`student_id`),
  ADD KEY `class_section_id` (`class_section_id`),
  ADD KEY `parent_id` (`parent_id`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `participation_score`
--
ALTER TABLE `participation_score`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_student_id` (`student_id`),
  ADD KEY `idx_class_section_id` (`class_section_id`),
  ADD KEY `idx_teacher_id` (`teacher_id`);

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `reimbursements`
--
ALTER TABLE `reimbursements`
  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`);

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

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

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

--
-- Indexes for table `semester_scores`
--
ALTER TABLE `semester_scores`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_student_id` (`student_id`),
  ADD KEY `idx_semester_school_year` (`semester`,`school_year`);

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

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

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

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

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

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

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

--
-- Indexes for table `teacher_class`
--
ALTER TABLE `teacher_class`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_teacher_assignment` (`teacher_id`,`class_section_id`,`semester`,`school_year`),
  ADD UNIQUE KEY `unique_first_ta_assignment` (`first_ta_id`,`class_section_id`,`semester`,`school_year`),
  ADD UNIQUE KEY `unique_second_ta_assignment` (`second_ta_id`,`class_section_id`,`semester`,`school_year`);

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `attendance_data`
--
ALTER TABLE `attendance_data`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;

--
-- AUTO_INCREMENT for table `attendance_record`
--
ALTER TABLE `attendance_record`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `attendance_tracking`
--
ALTER TABLE `attendance_tracking`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

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

--
-- AUTO_INCREMENT for table `calendar_events`
--
ALTER TABLE `calendar_events`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

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

--
-- AUTO_INCREMENT for table `classes`
--
ALTER TABLE `classes`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

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

--
-- AUTO_INCREMENT for table `configuration`
--
ALTER TABLE `configuration`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;

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

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

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

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

--
-- AUTO_INCREMENT for table `emergency_contacts`
--
ALTER TABLE `emergency_contacts`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `final_score`
--
ALTER TABLE `final_score`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

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

--
-- AUTO_INCREMENT for table `homework`
--
ALTER TABLE `homework`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44;

--
-- AUTO_INCREMENT for table `invoices`
--
ALTER TABLE `invoices`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

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

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

--
-- AUTO_INCREMENT for table `ip_attempts`
--
ALTER TABLE `ip_attempts`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `login_activity`
--
ALTER TABLE `login_activity`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=134;

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

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

--
-- AUTO_INCREMENT for table `midterm_exam`
--
ALTER TABLE `midterm_exam`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

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

--
-- AUTO_INCREMENT for table `notifications`
--
ALTER TABLE `notifications`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

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

--
-- AUTO_INCREMENT for table `parents`
--
ALTER TABLE `parents`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

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

--
-- AUTO_INCREMENT for table `password_resets`
--
ALTER TABLE `password_resets`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=328;

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

--
-- AUTO_INCREMENT for table `project`
--
ALTER TABLE `project`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `quiz`
--
ALTER TABLE `quiz`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

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

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

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `role_permissions`
--
ALTER TABLE `role_permissions`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=686;

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

--
-- AUTO_INCREMENT for table `score_comments`
--
ALTER TABLE `score_comments`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `sections`
--
ALTER TABLE `sections`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

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

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

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

--
-- AUTO_INCREMENT for table `students`
--
ALTER TABLE `students`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=137;

--
-- AUTO_INCREMENT for table `student_allergies`
--
ALTER TABLE `student_allergies`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `student_class`
--
ALTER TABLE `student_class`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `student_medical_conditions`
--
ALTER TABLE `student_medical_conditions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

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

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

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=154;

--
-- AUTO_INCREMENT for table `user_notifications`
--
ALTER TABLE `user_notifications`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

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

--
-- AUTO_INCREMENT for table `user_roles`
--
ALTER TABLE `user_roles`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=145;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `attendance_tracking`
--
ALTER TABLE `attendance_tracking`
  ADD CONSTRAINT `attendance_tracking_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `student_allergies`
--
ALTER TABLE `student_allergies`
  ADD CONSTRAINT `student_allergies_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `student_medical_conditions`
--
ALTER TABLE `student_medical_conditions`
  ADD CONSTRAINT `student_medical_conditions_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`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 */;
