-- phpMyAdmin SQL Dump
-- version 5.2.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 17, 2026 at 01:15 AM
-- Server version: 8.4.7
-- PHP Version: 8.3.28

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `eduverse_db`
--

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

--
-- Table structure for table `achievements`
--

DROP TABLE IF EXISTS `achievements`;
CREATE TABLE IF NOT EXISTS `achievements` (
  `achievement_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `achievement_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `achievement_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `achievement_type` enum('score','streak','completion','participation','speed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `criteria` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `reward_points` int DEFAULT '0',
  `reward_badge_id` int UNSIGNED DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`achievement_id`),
  UNIQUE KEY `achievement_name` (`achievement_name`),
  KEY `reward_badge_id` (`reward_badge_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `achievements`
--

INSERT INTO `achievements` (`achievement_id`, `achievement_name`, `achievement_description`, `achievement_type`, `criteria`, `reward_points`, `reward_badge_id`, `is_active`, `created_at`) VALUES
(1, 'First Assignment', 'Submit your first assignment', 'completion', '{\"type\": \"assignment_count\", \"value\": 1}', 10, 1, 1, '2025-11-20 13:43:00'),
(2, 'Quiz Champion', 'Score 100% on any quiz', 'score', '{\"type\": \"quiz_score\", \"value\": 100}', 50, 2, 1, '2025-11-20 13:43:00'),
(3, 'Week Perfect', 'Perfect attendance for one week', 'participation', '{\"type\": \"attendance_streak\", \"value\": 5}', 25, 3, 1, '2025-11-20 13:43:00'),
(4, 'Speed Demon', 'Submit assignment 3 days early', 'speed', '{\"type\": \"early_days\", \"value\": 3}', 30, NULL, 1, '2025-11-20 13:43:00');

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

--
-- Table structure for table `activity_logs`
--

DROP TABLE IF EXISTS `activity_logs`;
CREATE TABLE IF NOT EXISTS `activity_logs` (
  `log_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `activity_type` enum('login','logout','view','submit','download','upload','chat','quiz','other') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `entity_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entity_id` bigint UNSIGNED DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `session_duration_minutes` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`log_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_type` (`activity_type`),
  KEY `idx_date` (`created_at`),
  KEY `idx_user_type_date` (`user_id`,`activity_type`,`created_at`),
  KEY `idx_entity` (`entity_type`,`entity_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `activity_logs`
--

INSERT INTO `activity_logs` (`log_id`, `user_id`, `activity_type`, `entity_type`, `entity_id`, `description`, `ip_address`, `user_agent`, `session_duration_minutes`, `created_at`) VALUES
(1, 7, 'login', NULL, NULL, 'User logged in', '192.168.1.100', NULL, NULL, '2025-11-20 13:43:00'),
(2, 7, 'view', 'course_material', 1, 'Viewed course syllabus', '192.168.1.100', NULL, NULL, '2025-11-20 13:43:00'),
(3, 7, 'submit', 'assignment', 1, 'Submitted Assignment 1', '192.168.1.100', NULL, 45, '2025-11-20 13:43:00'),
(4, 7, 'quiz', 'quiz', 1, 'Completed Quiz 1', '192.168.1.100', NULL, 25, '2025-11-20 13:43:00'),
(5, 8, 'login', NULL, NULL, 'User logged in', '192.168.1.101', NULL, NULL, '2025-11-20 13:43:00'),
(6, 8, 'view', 'course_material', 2, 'Viewed Lecture 1', '192.168.1.101', NULL, NULL, '2025-11-20 13:43:00'),
(7, 8, 'submit', 'assignment', 1, 'Submitted Assignment 1', '192.168.1.101', NULL, 38, '2025-11-20 13:43:00'),
(8, 9, 'login', NULL, NULL, 'User logged in', '192.168.1.102', NULL, NULL, '2025-11-20 13:43:00'),
(9, 57, 'login', NULL, NULL, 'User logged in', '192.168.1.100', NULL, NULL, '2026-03-11 18:12:04'),
(10, 57, 'view', 'course', 1, 'Viewed course materials', '192.168.1.100', NULL, 45, '2026-03-11 18:12:04'),
(11, 57, 'submit', 'assignment', 1, 'Submitted Assignment 1', '192.168.1.100', NULL, NULL, '2026-03-11 18:12:04'),
(12, 57, 'quiz', 'quiz', 1, 'Completed Quiz 1', '192.168.1.100', NULL, 30, '2026-03-11 18:12:04'),
(13, 57, 'download', 'material', 1, 'Downloaded lecture slides', '192.168.1.100', NULL, NULL, '2026-03-11 18:12:04'),
(14, 57, 'view', 'course', 2, 'Viewed course page', '192.168.1.100', NULL, 20, '2026-03-11 18:12:04');

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

--
-- Table structure for table `ai_attendance_processing`
--

DROP TABLE IF EXISTS `ai_attendance_processing`;
CREATE TABLE IF NOT EXISTS `ai_attendance_processing` (
  `processing_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `session_id` bigint UNSIGNED NOT NULL,
  `photo_id` bigint UNSIGNED NOT NULL,
  `status` enum('pending','processing','completed','failed','manual_review') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `detected_faces_count` int DEFAULT '0',
  `matched_students_count` int DEFAULT '0',
  `unmatched_faces_count` int DEFAULT '0',
  `unmatched_faces_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `confidence_scores` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `processing_time_ms` int DEFAULT NULL,
  `error_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `manual_review_required` tinyint(1) DEFAULT '0',
  `reviewed_by` bigint UNSIGNED DEFAULT NULL,
  `reviewed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `completed_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`processing_id`),
  KEY `reviewed_by` (`reviewed_by`),
  KEY `idx_session` (`session_id`),
  KEY `idx_photo` (`photo_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ai_feedback`
--

DROP TABLE IF EXISTS `ai_feedback`;
CREATE TABLE IF NOT EXISTS `ai_feedback` (
  `feedback_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED NOT NULL,
  `feedback_type` enum('performance','improvement','strength','recommendation') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `feedback_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `priority` enum('low','medium','high') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `is_read` tinyint(1) DEFAULT '0',
  `read_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`feedback_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_read` (`is_read`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ai_flashcards`
--

DROP TABLE IF EXISTS `ai_flashcards`;
CREATE TABLE IF NOT EXISTS `ai_flashcards` (
  `flashcard_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `material_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `front_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `back_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `category` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `difficulty` enum('easy','medium','hard') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order_index` int DEFAULT '0',
  `times_reviewed` int DEFAULT '0',
  `last_reviewed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`flashcard_id`),
  KEY `idx_material` (`material_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ai_grading_results`
--

DROP TABLE IF EXISTS `ai_grading_results`;
CREATE TABLE IF NOT EXISTS `ai_grading_results` (
  `grading_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `submission_id` bigint UNSIGNED DEFAULT NULL,
  `quiz_attempt_id` bigint UNSIGNED DEFAULT NULL,
  `ai_score` decimal(5,2) DEFAULT NULL,
  `max_score` decimal(5,2) DEFAULT NULL,
  `ai_feedback` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `confidence_score` decimal(3,2) DEFAULT NULL,
  `grading_criteria` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `requires_human_review` tinyint(1) DEFAULT '0',
  `human_override_score` decimal(5,2) DEFAULT NULL,
  `processing_time_ms` int DEFAULT NULL,
  `ai_model` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reviewed_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`grading_id`),
  KEY `idx_submission` (`submission_id`),
  KEY `idx_quiz_attempt` (`quiz_attempt_id`),
  KEY `idx_review` (`requires_human_review`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ai_quizzes`
--

DROP TABLE IF EXISTS `ai_quizzes`;
CREATE TABLE IF NOT EXISTS `ai_quizzes` (
  `ai_quiz_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `material_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `difficulty_id` int UNSIGNED DEFAULT NULL,
  `quiz_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `question_count` int DEFAULT '10',
  `language` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'en',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ai_quiz_id`),
  KEY `difficulty_id` (`difficulty_id`),
  KEY `idx_material` (`material_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ai_recommendations`
--

DROP TABLE IF EXISTS `ai_recommendations`;
CREATE TABLE IF NOT EXISTS `ai_recommendations` (
  `recommendation_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED NOT NULL,
  `material_id` bigint UNSIGNED DEFAULT NULL,
  `recommendation_type` enum('topic','material','practice','review') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `priority` enum('low','medium','high') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `is_viewed` tinyint(1) DEFAULT '0',
  `is_completed` tinyint(1) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `viewed_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`recommendation_id`),
  KEY `material_id` (`material_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_viewed` (`is_viewed`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ai_recommendations`
--

INSERT INTO `ai_recommendations` (`recommendation_id`, `user_id`, `course_id`, `material_id`, `recommendation_type`, `title`, `description`, `reason`, `priority`, `is_viewed`, `is_completed`, `created_at`, `viewed_at`, `completed_at`) VALUES
(4, 9, 2, NULL, 'review', 'Linked List Fundamentals', 'Revisit this topic before the midterm', 'Important for upcoming exam', 'high', 0, 0, '2025-11-20 13:43:00', NULL, NULL);

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

--
-- Table structure for table `ai_study_plans`
--

DROP TABLE IF EXISTS `ai_study_plans`;
CREATE TABLE IF NOT EXISTS `ai_study_plans` (
  `plan_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED NOT NULL,
  `plan_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `plan_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `total_hours` int DEFAULT NULL,
  `status` enum('active','completed','abandoned') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `progress_percentage` decimal(5,2) DEFAULT '0.00',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`plan_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ai_study_plans`
--

INSERT INTO `ai_study_plans` (`plan_id`, `user_id`, `course_id`, `plan_name`, `plan_data`, `start_date`, `end_date`, `total_hours`, `status`, `progress_percentage`, `created_at`, `updated_at`) VALUES
(3, 12, 2, 'Data Structures Mastery', '{\"weeks\": [{\"week\": 1, \"topics\": [\"Arrays\", \"Linked Lists\"], \"hours\": 7}, {\"week\": 2, \"topics\": [\"Stacks\", \"Queues\"], \"hours\": 7}]}', '2025-02-18', '2025-04-01', 28, 'active', 20.00, '2025-11-20 13:43:00', '2025-11-20 13:43:00');

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

--
-- Table structure for table `ai_summaries`
--

DROP TABLE IF EXISTS `ai_summaries`;
CREATE TABLE IF NOT EXISTS `ai_summaries` (
  `summary_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `material_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `summary_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `summary_type` enum('short','medium','detailed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `language` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'en',
  `word_count` int DEFAULT NULL,
  `processing_time_ms` int DEFAULT NULL,
  `ai_model` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`summary_id`),
  KEY `idx_material` (`material_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ai_usage_statistics`
--

DROP TABLE IF EXISTS `ai_usage_statistics`;
CREATE TABLE IF NOT EXISTS `ai_usage_statistics` (
  `stat_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `feature_type` enum('summary','flashcard','quiz','feedback','chatbot','grading','recommendation','study_plan','voice','ocr','attendance') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `feature_id` bigint UNSIGNED DEFAULT NULL,
  `usage_count` int DEFAULT '1',
  `tokens_used` int DEFAULT NULL,
  `processing_time_ms` int DEFAULT NULL,
  `cost_estimate` decimal(10,6) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`stat_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_feature` (`feature_type`),
  KEY `idx_date` (`created_at`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ai_usage_statistics`
--

INSERT INTO `ai_usage_statistics` (`stat_id`, `user_id`, `feature_type`, `feature_id`, `usage_count`, `tokens_used`, `processing_time_ms`, `cost_estimate`, `created_at`) VALUES
(1, 7, 'summary', 1, 1, 450, 1250, 0.000225, '2025-11-20 13:43:00'),
(2, 7, 'flashcard', 2, 1, 380, 890, 0.000190, '2025-11-20 13:43:00'),
(3, 7, 'quiz', 1, 1, 520, 1450, 0.000260, '2025-11-20 13:43:00'),
(4, 8, 'summary', 3, 1, 290, 650, 0.000145, '2025-11-20 13:43:00'),
(5, 8, 'chatbot', 1, 4, 1850, 5200, 0.000925, '2025-11-20 13:43:00'),
(6, 9, 'recommendation', 1, 1, 180, 420, 0.000090, '2025-11-20 13:43:00'),
(7, 10, 'grading', 1, 1, 680, 1850, 0.000340, '2025-11-20 13:43:00'),
(8, 11, 'attendance', 2, 1, 920, 2100, 0.000460, '2025-11-20 13:43:00'),
(9, 12, 'study_plan', 1, 1, 1200, 3400, 0.000600, '2025-11-20 13:43:00');

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

--
-- Table structure for table `announcements`
--

DROP TABLE IF EXISTS `announcements`;
CREATE TABLE IF NOT EXISTS `announcements` (
  `announcement_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED DEFAULT NULL,
  `created_by` bigint UNSIGNED NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `announcement_type` enum('course','department','campus','system') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'course',
  `priority` enum('low','medium','high','urgent') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `target_audience` enum('all','students','instructors','tas','custom') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'all',
  `is_published` tinyint(1) DEFAULT '0',
  `published_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `attachment_file_id` bigint UNSIGNED DEFAULT NULL,
  `view_count` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`announcement_id`),
  KEY `attachment_file_id` (`attachment_file_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_creator` (`created_by`),
  KEY `idx_published` (`is_published`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `announcements`
--

INSERT INTO `announcements` (`announcement_id`, `course_id`, `created_by`, `title`, `content`, `announcement_type`, `priority`, `target_audience`, `is_published`, `published_at`, `expires_at`, `attachment_file_id`, `view_count`, `created_at`, `updated_at`) VALUES
(1, 1, 8, 'Updated: Welcome to CS101!', 'Updated announcement content.', 'course', 'medium', 'all', 1, '2026-03-17 00:57:09', NULL, NULL, 134, '2025-01-15 08:00:00', '2026-03-17 00:57:08'),
(2, 1, 8, 'Assignment 1 Released', 'The first assignment is now available in the course materials section. Due date: February 1st.', 'course', 'high', 'students', 1, '2025-01-20 09:00:00', NULL, NULL, 38, '2025-01-20 09:00:00', '2025-01-20 09:00:00'),
(3, NULL, 1, 'Campus WiFi Maintenance', 'Network maintenance scheduled for this weekend. Expect brief outages.', 'campus', 'medium', 'all', 1, '2025-02-10 06:00:00', NULL, NULL, 0, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 2, 3, 'Midterm Exam Schedule', 'The midterm exam will be held on March 15, 2025 from 2:00 PM to 4:00 PM.', 'course', 'high', 'students', 1, '2025-02-12 10:00:00', NULL, NULL, 0, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(5, 1, 8, 'Office Hours Extended', 'Extended office hours this week: Monday 2-4 PM, Wednesday 1-3 PM. Location: Room 301A.', 'course', 'medium', 'students', 1, '2025-02-13 08:00:00', NULL, NULL, 23, '2025-02-13 08:00:00', '2025-02-13 08:00:00'),
(7, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-11 17:20:02', '2026-03-11 17:20:02'),
(8, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-11 17:37:48', '2026-03-11 17:37:48'),
(9, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-14 15:17:44', '2026-03-14 15:17:44'),
(10, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-14 15:36:01', '2026-03-14 15:36:01'),
(11, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-14 15:40:41', '2026-03-14 15:40:41'),
(12, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-14 16:06:04', '2026-03-14 16:06:04'),
(13, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-16 20:19:02', '2026-03-16 20:19:02'),
(14, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-16 20:20:08', '2026-03-16 20:20:08'),
(15, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-16 20:32:49', '2026-03-16 20:32:49'),
(16, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-16 20:45:15', '2026-03-16 20:45:15'),
(17, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-16 20:53:51', '2026-03-16 20:53:51'),
(18, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-16 22:31:27', '2026-03-16 22:31:27'),
(19, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-16 22:35:14', '2026-03-16 22:35:14'),
(20, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-16 23:59:03', '2026-03-16 23:59:03'),
(21, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-17 00:01:43', '2026-03-17 00:01:43'),
(22, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-17 00:21:44', '2026-03-17 00:21:44'),
(23, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-17 00:34:37', '2026-03-17 00:34:37'),
(24, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-17 00:50:23', '2026-03-17 00:50:23'),
(25, 1, 59, 'API Dog Test Announcement', 'This is a test announcement from API Dog.', 'course', 'medium', 'all', 0, NULL, NULL, NULL, 0, '2026-03-17 00:57:08', '2026-03-17 00:57:08');

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

--
-- Table structure for table `api_integrations`
--

DROP TABLE IF EXISTS `api_integrations`;
CREATE TABLE IF NOT EXISTS `api_integrations` (
  `integration_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `campus_id` bigint UNSIGNED NOT NULL,
  `integration_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `integration_type` enum('lms','sso','payment','email','sms','ai','storage','other') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `api_endpoint` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `api_key_encrypted` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `[REDACTED] varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `configuration` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `is_active` tinyint(1) DEFAULT '1',
  `health_status` enum('healthy','degraded','down') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'healthy',
  `last_sync_at` timestamp NULL DEFAULT NULL,
  `created_by` bigint UNSIGNED DEFAULT NULL,
  `updated_by` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`integration_id`),
  KEY `idx_campus` (`campus_id`),
  KEY `idx_type` (`integration_type`),
  KEY `[REDACTED] (`created_by`),
  KEY `[REDACTED] (`updated_by`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `api_integrations`
--

INSERT INTO `api_integrations` (`integration_id`, `campus_id`, `integration_name`, `integration_type`, `api_endpoint`, `api_key_encrypted`, `[REDACTED], `configuration`, `is_active`, `health_status`, `last_sync_at`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(2, 1, 'SendGrid Email', 'email', 'https://api.sendgrid.com/v3/mail/send', NULL, NULL, NULL, 1, 'healthy', '2026-03-16 21:00:29', NULL, NULL, '2025-11-20 13:43:00', '2026-03-16 21:00:29'),
(3, 1, 'AWS S3 Storage', 'storage', 'https://s3.amazonaws.com', NULL, NULL, NULL, 1, 'healthy', '2025-02-15 05:30:00', NULL, NULL, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 1, 'OpenAI API', 'ai', 'https://api.openai.com/v1', NULL, NULL, NULL, 1, 'healthy', '2025-02-15 07:00:00', NULL, NULL, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(5, 2, 'Stripe Payment', 'payment', 'https://api.stripe.com/v1', NULL, NULL, NULL, 1, 'healthy', '2025-02-14 13:00:00', NULL, NULL, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(6, 1, 'Canvas LMS', 'lms', 'https://canvas.example.com', 's3cr3t', 's3cr3t2', '{}', 1, 'healthy', NULL, 67, 67, '2026-03-16 20:59:23', '2026-03-16 20:59:23'),
(7, 1, 'Canvas LMS', 'lms', 'https://canvas.example.com', 's3cr3t', 's3cr3t2', '{}', 1, 'healthy', NULL, 61, 61, '2026-03-16 22:35:33', '2026-03-16 22:35:33'),
(8, 1, 'Canvas LMS', 'lms', 'https://canvas.example.com', 's3cr3t', 's3cr3t2', '{}', 1, 'healthy', NULL, 61, 61, '2026-03-16 23:59:23', '2026-03-16 23:59:23'),
(9, 1, 'Canvas LMS', 'lms', 'https://canvas.example.com', 's3cr3t', 's3cr3t2', '{}', 1, 'healthy', NULL, 61, 61, '2026-03-17 00:02:03', '2026-03-17 00:02:03'),
(10, 1, 'Canvas LMS', 'lms', 'https://canvas.example.com', 's3cr3t', 's3cr3t2', '{}', 1, 'healthy', NULL, 61, 61, '2026-03-17 00:22:04', '2026-03-17 00:22:04'),
(11, 1, 'Canvas LMS', 'lms', 'https://canvas.example.com', 's3cr3t', 's3cr3t2', '{}', 1, 'healthy', NULL, 61, 61, '2026-03-17 00:34:57', '2026-03-17 00:34:57'),
(12, 1, 'Canvas LMS', 'lms', 'https://canvas.example.com', 's3cr3t', 's3cr3t2', '{}', 1, 'healthy', NULL, 61, 61, '2026-03-17 00:50:42', '2026-03-17 00:50:42'),
(13, 1, 'Canvas LMS', 'lms', 'https://canvas.example.com', 's3cr3t', 's3cr3t2', '{}', 1, 'healthy', NULL, 61, 61, '2026-03-17 00:57:28', '2026-03-17 00:57:28');

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

--
-- Table structure for table `api_rate_limits`
--

DROP TABLE IF EXISTS `api_rate_limits`;
CREATE TABLE IF NOT EXISTS `api_rate_limits` (
  `limit_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `api_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `endpoint` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `request_count` int DEFAULT '0',
  `window_start` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `window_end` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `max_requests` int DEFAULT '1000',
  `window_seconds` int DEFAULT '60',
  `is_blocked` tinyint(1) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`limit_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_api_key` (`api_key`),
  KEY `idx_endpoint` (`endpoint`),
  KEY `idx_window` (`window_start`,`window_end`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `api_rate_limits`
--

INSERT INTO `api_rate_limits` (`limit_id`, `user_id`, `api_key`, `endpoint`, `request_count`, `window_start`, `window_end`, `max_requests`, `window_seconds`, `is_blocked`, `created_at`, `updated_at`) VALUES
(1, 7, NULL, '/api/v1/courses', 45, '2025-02-15 08:00:00', '2025-02-15 09:00:00', 1000, 60, 0, '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(2, 8, NULL, '/api/v1/assignments', 23, '2025-02-15 08:00:00', '2025-02-15 09:00:00', 1000, 60, 0, '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(3, NULL, 'api_key_external_123', '/api/v1/users', 850, '2025-02-15 08:00:00', '2025-02-15 09:00:00', 1000, 60, 0, '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(4, NULL, '[REDACTED]', '/api/v1/grades', 1005, '2025-02-15 07:00:00', '2025-02-15 08:00:00', 1000, 60, 1, '2025-11-20 13:43:01', '2025-11-20 13:43:01');

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

--
-- Table structure for table `assignments`
--

DROP TABLE IF EXISTS `assignments`;
CREATE TABLE IF NOT EXISTS `assignments` (
  `assignment_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `instructions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `max_score` decimal(5,2) DEFAULT '100.00',
  `weight` decimal(5,2) DEFAULT '0.00',
  `due_date` timestamp NULL DEFAULT NULL,
  `available_from` timestamp NULL DEFAULT NULL,
  `late_submission_allowed` tinyint(1) DEFAULT '0',
  `late_penalty_percent` decimal(5,2) DEFAULT '0.00',
  `submission_type` enum('file','text','link','multiple') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'file',
  `max_file_size_mb` int DEFAULT '10',
  `allowed_file_types` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `status` enum('draft','published','closed','archived') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'draft',
  `created_by` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`assignment_id`),
  KEY `created_by` (`created_by`),
  KEY `idx_course` (`course_id`),
  KEY `idx_due_date` (`due_date`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `assignments`
--

INSERT INTO `assignments` (`assignment_id`, `course_id`, `title`, `description`, `instructions`, `max_score`, `weight`, `due_date`, `available_from`, `late_submission_allowed`, `late_penalty_percent`, `submission_type`, `max_file_size_mb`, `allowed_file_types`, `status`, `created_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'Updated Assignment Title', 'Write a program that demonstrates basic programming concepts', 'Create a complete program with proper comments and documentation', 100.00, 0.00, '2025-02-01 23:59:59', '2025-01-20 08:00:00', 1, 0.00, 'file', 10, NULL, 'draft', 8, '2025-01-20 08:00:00', '2026-03-11 17:20:03', NULL),
(2, 1, 'Assignment 2: Functions and Modules', 'Implement functions and modules for a simple application', 'Submit your code with test cases', 100.00, 0.00, '2025-02-15 23:59:59', '2025-01-27 08:00:00', 1, 0.00, 'file', 10, NULL, 'draft', 8, '2025-01-27 08:00:00', '2025-01-27 08:00:00', NULL),
(3, 1, 'Updated Assignment Title', 'string', 'string', 150.00, 100.00, '2026-03-01 21:08:59', '2026-02-01 21:08:59', 0, 0.00, 'file', 10, '[\"pdf\",\"docx\",\"zip\"]', 'published', 3, '2025-11-20 13:42:59', '2026-03-05 19:16:23', NULL),
(4, 3, 'Assignment 1: SQL Queries', 'Database query practice', 'Write SQL queries for the given scenarios', 100.00, 15.00, '2025-03-05 21:59:59', '2025-02-14 22:00:00', 0, 0.00, 'text', 10, NULL, 'draft', 3, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(5, 3, 'Midterm Quiz', 'Comprehensive quiz covering weeks 1-6', 'Answer all questions to the best of your ability', 50.00, 0.00, '2025-03-01 23:59:59', '2025-02-01 08:00:00', 0, 0.00, 'text', 10, NULL, 'draft', 10, '2025-02-01 08:00:00', '2025-02-01 08:00:00', NULL),
(6, 5, 'Lab Assignment 1: OOP Design', 'Design and implement OOP concepts in a project', 'Implement the provided specification', 120.00, 0.00, '2025-02-10 23:59:59', '2025-01-25 08:00:00', 1, 0.00, 'file', 10, NULL, 'draft', 12, '2025-01-25 08:00:00', '2025-01-25 08:00:00', NULL),
(7, 6, 'Assignment 1: SQL Queries', 'Write SQL queries to retrieve and manipulate data', 'Write queries following best practices', 100.00, 0.00, '2025-02-05 23:59:59', '2025-01-28 08:00:00', 1, 0.00, 'file', 10, NULL, 'draft', 14, '2025-01-28 08:00:00', '2025-01-28 08:00:00', NULL),
(8, 7, 'Project: Web Application', 'Build a complete web application using modern frameworks', 'Follow the project specification document', 200.00, 0.00, '2025-03-15 23:59:59', '2025-02-01 08:00:00', 1, 0.00, 'file', 10, NULL, 'draft', 15, '2025-02-01 08:00:00', '2025-02-01 08:00:00', NULL),
(9, 9, 'Problem Set 1: Statistical Analysis', 'Solve statistical problems using real datasets', 'Show all work and calculations', 100.00, 0.00, '2025-02-08 23:59:59', '2025-01-30 08:00:00', 1, 0.00, 'file', 10, NULL, 'draft', 16, '2025-01-30 08:00:00', '2025-01-30 08:00:00', NULL),
(10, 10, 'Essay: Literary Analysis', 'Write a comprehensive literary analysis essay', 'Submit as PDF with proper formatting', 100.00, 0.00, '2025-02-12 23:59:59', '2025-01-31 08:00:00', 1, 0.00, 'file', 10, NULL, 'draft', 17, '2025-01-31 08:00:00', '2025-01-31 08:00:00', NULL),
(11, 1, 'Homework 1', 'string', 'string', 100.00, 100.00, '2026-03-01 21:08:59', '2026-03-02 21:08:59', 0, 0.00, 'file', 10, '[\"pdf\",\"docx\",\"zip\"]', 'draft', 56, '2026-03-01 21:09:28', '2026-03-01 21:09:28', NULL),
(12, 1, 'Test Assignment', 'A test', 'Do this', 100.00, 10.00, '2026-06-01 23:59:59', NULL, 0, 0.00, 'file', 10, NULL, 'draft', 58, '2026-03-02 13:31:32', '2026-03-02 13:31:32', NULL),
(13, 1, 'AutoAssign', 'Test', 'Do', 100.00, 10.00, '2026-12-01 23:59:59', NULL, 0, 0.00, 'file', 10, NULL, 'draft', 58, '2026-03-02 13:50:32', '2026-03-02 13:50:32', NULL),
(14, 1, 'Bad', 'x', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 57, '2026-03-02 13:50:33', '2026-03-02 13:50:33', NULL),
(15, 1, 'Postman Test Assignment', 'An assignment created from Postman', 'Complete the tasks listed below', 100.00, 15.00, '2026-06-15 23:59:59', '2026-06-01 00:00:00', 1, 10.00, 'file', 10, '[\"pdf\",\"docx\",\"zip\"]', 'published', 58, '2026-03-02 23:31:42', '2026-03-02 23:31:42', NULL),
(16, 1, 'Postman Test Assignment', 'An assignment created from Postman', 'Complete the tasks listed below', 100.00, 15.00, '2026-06-15 23:59:59', '2026-06-01 00:00:00', 1, 10.00, 'file', 10, '[\"pdf\",\"docx\",\"zip\"]', 'published', 58, '2026-03-02 23:51:56', '2026-03-02 23:51:56', NULL),
(17, 1, 'Postman Test Assignment', 'An assignment created from Postman', 'Complete the tasks listed below', 100.00, 15.00, '2026-06-15 23:59:59', '2026-06-01 00:00:00', 1, 10.00, 'file', 10, '[\"pdf\",\"docx\",\"zip\"]', 'published', 58, '2026-03-03 00:23:17', '2026-03-03 00:23:17', NULL),
(18, 1, 'Postman Test Assignment', 'An assignment created from Postman', 'Complete the tasks listed below', 100.00, 15.00, '2026-06-15 23:59:59', '2026-06-01 00:00:00', 1, 10.00, 'file', 10, '[\"pdf\",\"docx\",\"zip\"]', 'published', 58, '2026-03-03 18:34:02', '2026-03-03 18:34:02', NULL),
(19, 1, 'Postman Test Assignment', 'An assignment created from Postman', 'Complete the tasks listed below', 100.00, 15.00, '2026-06-15 23:59:59', '2026-06-01 00:00:00', 1, 10.00, 'file', 10, '[\"pdf\",\"docx\",\"zip\"]', 'published', 58, '2026-03-05 19:16:23', '2026-03-05 19:16:23', NULL),
(20, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-11 17:37:49', '2026-03-11 17:37:49', NULL),
(21, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-14 15:36:02', '2026-03-14 15:36:02', NULL),
(22, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-14 15:40:42', '2026-03-14 15:40:42', NULL),
(23, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-14 16:06:04', '2026-03-14 16:06:04', NULL),
(24, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-16 20:19:03', '2026-03-16 20:19:03', NULL),
(25, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-16 20:20:08', '2026-03-16 20:20:08', NULL),
(26, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-16 20:32:50', '2026-03-16 20:32:50', NULL),
(27, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-16 20:45:15', '2026-03-16 20:45:15', NULL),
(28, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-16 20:53:51', '2026-03-16 20:53:51', NULL),
(29, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-16 22:31:28', '2026-03-16 22:31:28', NULL),
(30, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-16 22:35:15', '2026-03-16 22:35:15', NULL),
(31, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-16 23:59:04', '2026-03-16 23:59:04', NULL),
(32, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-17 00:01:44', '2026-03-17 00:01:44', NULL),
(33, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-17 00:21:45', '2026-03-17 00:21:45', NULL),
(34, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-17 00:34:38', '2026-03-17 00:34:38', NULL),
(35, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-17 00:50:23', '2026-03-17 00:50:23', NULL),
(36, 1, 'API Dog Test Assignment', 'Test assignment from API Dog', NULL, 100.00, 0.00, NULL, NULL, 0, 0.00, 'file', 10, NULL, 'draft', 59, '2026-03-17 00:57:09', '2026-03-17 00:57:09', NULL);

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

--
-- Table structure for table `assignment_submissions`
--

DROP TABLE IF EXISTS `assignment_submissions`;
CREATE TABLE IF NOT EXISTS `assignment_submissions` (
  `submission_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `assignment_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `file_id` bigint UNSIGNED DEFAULT NULL,
  `submission_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `submission_link` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `submitted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `is_late` tinyint(1) DEFAULT '0',
  `attempt_number` int DEFAULT '1',
  `status` enum('submitted','graded','returned','resubmit') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'submitted',
  PRIMARY KEY (`submission_id`),
  KEY `file_id` (`file_id`),
  KEY `idx_assignment` (`assignment_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`status`),
  KEY `idx_user_assignment` (`user_id`,`assignment_id`),
  KEY `idx_assignment_status` (`assignment_id`,`status`),
  KEY `idx_submitted_date` (`submitted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `assignment_submissions`
--

INSERT INTO `assignment_submissions` (`submission_id`, `assignment_id`, `user_id`, `file_id`, `submission_text`, `submission_link`, `submitted_at`, `is_late`, `attempt_number`, `status`) VALUES
(16, 1, 21, NULL, 'Submitted assignment 1 - programming basics', NULL, '2025-01-31 15:30:00', 0, 1, 'graded'),
(17, 1, 22, NULL, 'Submitted assignment 1 - programming basics', NULL, '2025-01-31 16:00:00', 0, 1, 'graded'),
(18, 1, 23, NULL, 'Submitted assignment 1 - programming basics', NULL, '2025-01-29 12:00:00', 0, 1, 'graded'),
(19, 1, 24, NULL, 'Submitted assignment 1 - programming basics', NULL, '2025-02-01 23:50:00', 0, 1, 'graded'),
(20, 1, 25, NULL, 'Submitted assignment 1 - programming basics', NULL, '2025-01-30 18:00:00', 0, 1, 'graded'),
(21, 2, 23, NULL, 'Submitted assignment 2 - functions and modules', NULL, '2025-02-14 10:30:00', 0, 1, 'submitted'),
(22, 2, 25, NULL, 'Submitted assignment 2 - functions and modules', NULL, '2025-02-13 14:00:00', 0, 1, 'submitted'),
(23, 4, 21, NULL, 'Submitted project 1 - data structures implementation', NULL, '2025-02-18 17:00:00', 0, 1, 'submitted'),
(24, 4, 23, NULL, 'Submitted project 1 - data structures implementation', NULL, '2025-02-19 12:00:00', 0, 1, 'submitted'),
(25, 4, 25, NULL, 'Submitted project 1 - data structures implementation', NULL, '2025-02-17 09:00:00', 0, 1, 'submitted');

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

--
-- Table structure for table `attendance_photos`
--

DROP TABLE IF EXISTS `attendance_photos`;
CREATE TABLE IF NOT EXISTS `attendance_photos` (
  `photo_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `session_id` bigint UNSIGNED NOT NULL,
  `file_id` bigint UNSIGNED NOT NULL,
  `uploaded_by` bigint UNSIGNED NOT NULL,
  `photo_type` enum('class_photo','individual','video_frame') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'class_photo',
  `capture_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `processing_status` enum('pending','processing','completed','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  PRIMARY KEY (`photo_id`),
  KEY `file_id` (`file_id`),
  KEY `uploaded_by` (`uploaded_by`),
  KEY `idx_session` (`session_id`),
  KEY `idx_status` (`processing_status`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `attendance_records`
--

DROP TABLE IF EXISTS `attendance_records`;
CREATE TABLE IF NOT EXISTS `attendance_records` (
  `record_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `session_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `attendance_status` enum('present','absent','late','excused') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'absent',
  `check_in_time` timestamp NULL DEFAULT NULL,
  `marked_by` enum('manual','ai','self') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'manual',
  `confidence_score` decimal(5,4) DEFAULT NULL,
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`record_id`),
  UNIQUE KEY `unique_session_user` (`session_id`,`user_id`),
  KEY `idx_session` (`session_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`attendance_status`),
  KEY `idx_session_status` (`session_id`,`attendance_status`),
  KEY `idx_user_date` (`user_id`,`check_in_time`)
) ENGINE=InnoDB AUTO_INCREMENT=502 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attendance_records`
--

INSERT INTO `attendance_records` (`record_id`, `session_id`, `user_id`, `attendance_status`, `check_in_time`, `marked_by`, `confidence_score`, `notes`, `updated_at`) VALUES
(1, 1, 21, 'present', '2025-02-03 08:58:00', 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(2, 1, 22, 'present', '2025-02-03 09:02:00', 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(3, 1, 23, 'present', '2025-02-03 09:00:00', 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(4, 1, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(5, 1, 25, 'present', '2025-02-03 09:05:00', 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(6, 2, 21, 'present', '2025-02-05 09:00:00', 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(7, 2, 22, 'present', '2025-02-05 09:03:00', 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(8, 2, 23, 'present', '2025-02-05 09:00:00', 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(9, 2, 24, 'late', '2025-02-05 09:15:00', 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(10, 2, 25, 'present', '2025-02-05 08:58:00', 'manual', NULL, NULL, '2026-03-01 14:55:40'),
(17, 11, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(18, 11, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(19, 11, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(20, 11, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(21, 11, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(22, 11, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(23, 11, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(24, 11, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(25, 11, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(26, 11, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(27, 11, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(28, 11, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(29, 11, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(30, 11, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(31, 11, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(32, 11, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(33, 11, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(34, 11, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(35, 11, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(36, 11, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:05:42'),
(37, 12, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(38, 12, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(39, 12, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(40, 12, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(41, 12, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(42, 12, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(43, 12, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(44, 12, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(45, 12, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(46, 12, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(47, 12, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(48, 12, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(49, 12, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(50, 12, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(51, 12, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(52, 12, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(53, 12, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(54, 12, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(55, 12, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(56, 12, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:47'),
(57, 13, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(58, 13, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(59, 13, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(60, 13, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(61, 13, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(62, 13, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(63, 13, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(64, 13, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(65, 13, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(66, 13, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(67, 13, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(68, 13, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(69, 13, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(70, 13, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(71, 13, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(72, 13, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(73, 13, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(74, 13, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(75, 13, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(76, 13, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:06:53'),
(77, 14, 7, 'late', NULL, 'manual', NULL, 'Came in late', '2026-03-02 14:08:07'),
(78, 14, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(79, 14, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(80, 14, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(81, 14, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(82, 14, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(83, 14, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(84, 14, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(85, 14, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(86, 14, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(87, 14, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(88, 14, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(89, 14, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(90, 14, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(91, 14, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(92, 14, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(93, 14, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(94, 14, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(95, 14, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(96, 14, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-02 14:07:07'),
(97, 14, 57, 'present', NULL, 'manual', NULL, NULL, '2026-03-02 14:08:05'),
(118, 17, 57, 'late', NULL, 'manual', NULL, 'Arrived 10 min late', '2026-03-02 23:42:38'),
(119, 17, 58, 'present', NULL, 'manual', NULL, NULL, '2026-03-02 23:42:38'),
(120, 17, 59, 'absent', NULL, 'manual', NULL, 'No show', '2026-03-02 23:42:38'),
(121, 18, 57, 'late', NULL, 'manual', NULL, 'Arrived 10 min late', '2026-03-02 23:47:21'),
(122, 18, 58, 'present', NULL, 'manual', NULL, NULL, '2026-03-02 23:47:21'),
(123, 18, 59, 'absent', NULL, 'manual', NULL, 'No show', '2026-03-02 23:47:21'),
(124, 23, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(125, 23, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(126, 23, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(127, 23, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(128, 23, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(129, 23, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(130, 23, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(131, 23, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(132, 23, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(133, 23, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(134, 23, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(135, 23, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(136, 23, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(137, 23, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(138, 23, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(139, 23, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(140, 23, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(141, 23, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(142, 23, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(143, 23, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(144, 23, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:20:09'),
(145, 24, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(146, 24, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(147, 24, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(148, 24, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(149, 24, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(150, 24, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(151, 24, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(152, 24, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(153, 24, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(154, 24, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(155, 24, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(156, 24, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(157, 24, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(158, 24, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(159, 24, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(160, 24, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(161, 24, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(162, 24, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(163, 24, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(164, 24, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(165, 24, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-11 17:37:55'),
(166, 26, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(167, 26, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(168, 26, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(169, 26, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(170, 26, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(171, 26, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(172, 26, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(173, 26, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(174, 26, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(175, 26, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(176, 26, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(177, 26, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(178, 26, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(179, 26, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(180, 26, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(181, 26, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(182, 26, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(183, 26, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(184, 26, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(185, 26, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(186, 26, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:36:08'),
(187, 27, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(188, 27, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(189, 27, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(190, 27, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(191, 27, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(192, 27, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(193, 27, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(194, 27, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(195, 27, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(196, 27, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(197, 27, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(198, 27, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(199, 27, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(200, 27, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(201, 27, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(202, 27, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(203, 27, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(204, 27, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(205, 27, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(206, 27, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(207, 27, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 15:40:48'),
(208, 28, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(209, 28, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(210, 28, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(211, 28, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(212, 28, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(213, 28, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(214, 28, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(215, 28, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(216, 28, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(217, 28, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(218, 28, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(219, 28, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(220, 28, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(221, 28, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(222, 28, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(223, 28, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(224, 28, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(225, 28, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(226, 28, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(227, 28, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(228, 28, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-14 16:06:10'),
(229, 29, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(230, 29, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(231, 29, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(232, 29, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(233, 29, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(234, 29, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(235, 29, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(236, 29, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(237, 29, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(238, 29, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(239, 29, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(240, 29, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(241, 29, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(242, 29, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(243, 29, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(244, 29, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(245, 29, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(246, 29, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(247, 29, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(248, 29, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(249, 29, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:19:09'),
(250, 30, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(251, 30, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(252, 30, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(253, 30, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(254, 30, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(255, 30, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(256, 30, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(257, 30, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(258, 30, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(259, 30, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(260, 30, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(261, 30, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(262, 30, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(263, 30, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(264, 30, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(265, 30, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(266, 30, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(267, 30, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(268, 30, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(269, 30, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(270, 30, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:20:14'),
(271, 31, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(272, 31, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(273, 31, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(274, 31, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(275, 31, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(276, 31, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(277, 31, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(278, 31, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(279, 31, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(280, 31, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(281, 31, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(282, 31, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(283, 31, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(284, 31, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(285, 31, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(286, 31, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(287, 31, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(288, 31, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(289, 31, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(290, 31, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(291, 31, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:32:56'),
(292, 32, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(293, 32, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(294, 32, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(295, 32, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(296, 32, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(297, 32, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(298, 32, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(299, 32, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(300, 32, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(301, 32, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(302, 32, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(303, 32, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(304, 32, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(305, 32, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(306, 32, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(307, 32, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(308, 32, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(309, 32, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(310, 32, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(311, 32, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(312, 32, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:45:22'),
(313, 33, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(314, 33, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(315, 33, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(316, 33, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(317, 33, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(318, 33, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(319, 33, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(320, 33, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(321, 33, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(322, 33, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(323, 33, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(324, 33, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(325, 33, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(326, 33, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(327, 33, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(328, 33, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(329, 33, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(330, 33, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(331, 33, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(332, 33, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(333, 33, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 20:53:58'),
(334, 34, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(335, 34, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(336, 34, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(337, 34, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(338, 34, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(339, 34, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(340, 34, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(341, 34, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(342, 34, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(343, 34, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(344, 34, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(345, 34, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(346, 34, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(347, 34, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(348, 34, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(349, 34, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(350, 34, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(351, 34, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(352, 34, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(353, 34, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(354, 34, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:31:34'),
(355, 35, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(356, 35, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(357, 35, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(358, 35, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(359, 35, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(360, 35, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(361, 35, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(362, 35, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(363, 35, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(364, 35, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(365, 35, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(366, 35, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(367, 35, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(368, 35, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(369, 35, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(370, 35, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(371, 35, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(372, 35, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(373, 35, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(374, 35, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(375, 35, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 22:35:21'),
(376, 36, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(377, 36, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(378, 36, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(379, 36, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(380, 36, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(381, 36, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(382, 36, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(383, 36, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(384, 36, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(385, 36, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(386, 36, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(387, 36, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(388, 36, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(389, 36, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(390, 36, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(391, 36, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(392, 36, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(393, 36, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(394, 36, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(395, 36, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(396, 36, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-16 23:59:11'),
(397, 37, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(398, 37, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(399, 37, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(400, 37, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(401, 37, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(402, 37, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(403, 37, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(404, 37, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(405, 37, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(406, 37, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(407, 37, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(408, 37, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(409, 37, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(410, 37, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(411, 37, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(412, 37, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(413, 37, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(414, 37, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(415, 37, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(416, 37, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(417, 37, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:01:50'),
(418, 38, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(419, 38, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(420, 38, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(421, 38, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(422, 38, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(423, 38, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(424, 38, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(425, 38, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(426, 38, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(427, 38, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(428, 38, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(429, 38, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(430, 38, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(431, 38, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(432, 38, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(433, 38, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(434, 38, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(435, 38, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(436, 38, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(437, 38, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(438, 38, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:21:51'),
(439, 39, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(440, 39, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(441, 39, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(442, 39, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(443, 39, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(444, 39, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(445, 39, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(446, 39, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(447, 39, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(448, 39, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(449, 39, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(450, 39, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(451, 39, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(452, 39, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(453, 39, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(454, 39, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(455, 39, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(456, 39, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(457, 39, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(458, 39, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(459, 39, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:34:44'),
(460, 40, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(461, 40, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(462, 40, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(463, 40, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(464, 40, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(465, 40, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(466, 40, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(467, 40, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(468, 40, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(469, 40, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(470, 40, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(471, 40, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(472, 40, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(473, 40, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(474, 40, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(475, 40, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(476, 40, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(477, 40, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(478, 40, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(479, 40, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(480, 40, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:50:30'),
(481, 41, 7, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(482, 41, 8, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(483, 41, 9, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(484, 41, 10, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(485, 41, 11, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(486, 41, 25, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(487, 41, 30, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(488, 41, 34, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(489, 41, 13, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(490, 41, 14, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(491, 41, 15, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(492, 41, 16, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(493, 41, 21, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(494, 41, 22, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(495, 41, 23, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(496, 41, 24, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(497, 41, 26, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(498, 41, 27, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(499, 41, 28, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(500, 41, 29, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16'),
(501, 41, 57, 'absent', NULL, 'manual', NULL, NULL, '2026-03-17 00:57:16');

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

--
-- Table structure for table `attendance_sessions`
--

DROP TABLE IF EXISTS `attendance_sessions`;
CREATE TABLE IF NOT EXISTS `attendance_sessions` (
  `session_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `section_id` bigint UNSIGNED NOT NULL,
  `session_date` date NOT NULL,
  `session_type` enum('lecture','lab','tutorial','exam') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'lecture',
  `instructor_id` bigint UNSIGNED NOT NULL,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_students` int DEFAULT '0',
  `present_count` int DEFAULT '0',
  `absent_count` int DEFAULT '0',
  `status` enum('scheduled','in_progress','completed','cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'scheduled',
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`session_id`),
  KEY `idx_section` (`section_id`),
  KEY `idx_date` (`session_date`),
  KEY `idx_instructor` (`instructor_id`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attendance_sessions`
--

INSERT INTO `attendance_sessions` (`session_id`, `section_id`, `session_date`, `session_type`, `instructor_id`, `start_time`, `end_time`, `location`, `total_students`, `present_count`, `absent_count`, `status`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, '2025-02-03', 'lecture', 8, '09:00:00', '10:30:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-03 08:00:00', '2026-03-01 14:55:40'),
(2, 1, '2025-02-05', 'lecture', 8, '09:00:00', '10:30:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-05 08:00:00', '2026-03-01 14:55:40'),
(3, 1, '2025-02-10', 'lecture', 8, '09:00:00', '10:30:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-10 08:00:00', '2026-03-01 14:55:40'),
(4, 2, '2025-02-04', 'lecture', 9, '11:00:00', '12:30:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-04 08:00:00', '2026-03-01 14:55:40'),
(5, 2, '2025-02-06', 'lecture', 9, '11:00:00', '12:30:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-06 08:00:00', '2026-03-01 14:55:40'),
(6, 3, '2025-02-03', 'lecture', 10, '13:00:00', '14:30:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-03 08:00:00', '2026-03-01 14:55:40'),
(7, 3, '2025-02-05', 'lecture', 10, '13:00:00', '14:30:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-05 08:00:00', '2026-03-01 14:55:40'),
(8, 5, '2025-02-03', 'lab', 12, '15:00:00', '16:30:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-03 08:00:00', '2026-03-01 14:55:40'),
(9, 9, '2025-02-04', 'lecture', 16, '14:00:00', '15:00:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-04 08:00:00', '2026-03-01 14:55:40'),
(10, 10, '2025-02-05', 'lecture', 17, '13:00:00', '14:00:00', NULL, 0, 0, 0, 'completed', NULL, '2025-02-05 08:00:00', '2026-03-01 14:55:40'),
(11, 1, '2026-03-02', 'lecture', 58, '09:00:00', '10:30:00', NULL, 20, 0, 20, 'scheduled', 'Test session', '2026-03-02 14:05:42', '2026-03-02 14:05:42'),
(12, 1, '2026-03-15', 'lecture', 58, '09:00:00', '10:30:00', NULL, 20, 0, 20, 'scheduled', 'Retest session', '2026-03-02 14:06:47', '2026-03-02 14:06:47'),
(13, 1, '2026-03-16', 'lab', 58, NULL, NULL, NULL, 20, 0, 20, 'scheduled', NULL, '2026-03-02 14:06:53', '2026-03-02 14:06:53'),
(14, 1, '2026-03-20', 'lecture', 58, '09:00:00', '10:30:00', NULL, 20, 2, 19, 'completed', 'Updated retest', '2026-03-02 14:07:07', '2026-03-02 14:08:14'),
(16, 11, '2026-03-02', 'lecture', 58, '09:00:00', '10:30:00', 'Room A101', 0, 0, 0, 'scheduled', 'Week 1 intro lecture', '2026-03-02 23:33:32', '2026-03-02 23:33:32'),
(17, 11, '2026-03-02', 'lecture', 58, '09:00:00', '10:30:00', 'Room B202', 0, 2, 1, 'completed', 'Updated notes', '2026-03-02 23:42:38', '2026-03-02 23:42:39'),
(18, 11, '2026-03-02', 'lecture', 58, '09:00:00', '10:30:00', 'Room B202', 0, 2, 1, 'completed', 'Updated notes', '2026-03-02 23:47:21', '2026-03-02 23:47:22'),
(19, 11, '2026-03-02', 'lecture', 58, '09:00:00', '10:30:00', 'Room A101', 0, 0, 0, 'scheduled', 'Week 1 intro lecture', '2026-03-02 23:51:58', '2026-03-02 23:51:58'),
(20, 11, '2026-03-02', 'lecture', 58, '09:00:00', '10:30:00', 'Room A101', 0, 0, 0, 'scheduled', 'Week 1 intro lecture', '2026-03-03 00:23:19', '2026-03-03 00:23:19'),
(21, 11, '2026-03-02', 'lecture', 58, '09:00:00', '10:30:00', 'Room A101', 0, 0, 0, 'scheduled', 'Week 1 intro lecture', '2026-03-03 18:34:04', '2026-03-03 18:34:04'),
(22, 11, '2026-03-02', 'lecture', 58, '09:00:00', '10:30:00', 'Room A101', 0, 0, 0, 'scheduled', 'Week 1 intro lecture', '2026-03-05 19:16:25', '2026-03-05 19:16:25'),
(23, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-11 17:20:09', '2026-03-11 17:20:09'),
(24, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-11 17:37:55', '2026-03-11 17:37:55'),
(25, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 0, 0, 0, 'scheduled', NULL, '2026-03-14 15:17:51', '2026-03-14 15:17:51'),
(26, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-14 15:36:08', '2026-03-14 15:36:08'),
(27, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-14 15:40:48', '2026-03-14 15:40:48'),
(28, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-14 16:06:10', '2026-03-14 16:06:10'),
(29, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-16 20:19:09', '2026-03-16 20:19:09'),
(30, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-16 20:20:14', '2026-03-16 20:20:14'),
(31, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-16 20:32:56', '2026-03-16 20:32:56'),
(32, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-16 20:45:22', '2026-03-16 20:45:22'),
(33, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-16 20:53:58', '2026-03-16 20:53:58'),
(34, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-16 22:31:34', '2026-03-16 22:31:34'),
(35, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-16 22:35:21', '2026-03-16 22:35:21'),
(36, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-16 23:59:10', '2026-03-16 23:59:11'),
(37, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-17 00:01:50', '2026-03-17 00:01:50'),
(38, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-17 00:21:51', '2026-03-17 00:21:51'),
(39, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-17 00:34:44', '2026-03-17 00:34:44'),
(40, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-17 00:50:30', '2026-03-17 00:50:30'),
(41, 1, '2026-03-15', 'lecture', 59, '09:00:00', '10:30:00', NULL, 21, 0, 21, 'scheduled', NULL, '2026-03-17 00:57:15', '2026-03-17 00:57:16');

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

--
-- Table structure for table `audit_logs`
--

DROP TABLE IF EXISTS `audit_logs`;
CREATE TABLE IF NOT EXISTS `audit_logs` (
  `log_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `action_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `entity_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entity_id` bigint UNSIGNED DEFAULT NULL,
  `old_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `new_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`log_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_action` (`action_type`),
  KEY `idx_entity` (`entity_type`,`entity_id`),
  KEY `idx_date` (`created_at`)
) ENGINE=InnoDB AUTO_INCREMENT=1111 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `audit_logs`
--

INSERT INTO `audit_logs` (`log_id`, `user_id`, `action_type`, `entity_type`, `entity_id`, `old_values`, `new_values`, `ip_address`, `user_agent`, `description`, `created_at`) VALUES
(1, 1, 'CREATE', 'user', 7, NULL, '{\"email\": \"alice.student@campus.edu\", \"role\": \"student\"}', '192.168.1.1', NULL, 'Created new student account', '2025-11-20 13:43:00'),
(2, 2, 'UPDATE', 'grade', 1, '{\"score\": 0}', '{\"score\": 95}', '192.168.1.50', NULL, 'Graded assignment submission', '2025-11-20 13:43:00'),
(3, 1, 'UPDATE', 'system_settings', 8, '{\"value\": \"false\"}', '{\"value\": \"true\"}', '192.168.1.1', NULL, 'Enabled AI features', '2025-11-20 13:43:00'),
(4, 2, 'CREATE', 'assignment', 1, NULL, '{\"title\": \"Assignment 1: Hello World\"}', '192.168.1.50', NULL, 'Created new assignment', '2025-11-20 13:43:00'),
(5, 1, 'DELETE', 'user', 99, '{\"email\": \"test@campus.edu\"}', NULL, '192.168.1.1', NULL, 'Deleted test account', '2025-11-20 13:43:00'),
(6, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 19:52:44'),
(7, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 19:52:56'),
(8, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 19:53:09'),
(9, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 19:53:37'),
(10, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 19:55:53'),
(11, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 19:58:34'),
(12, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 19:58:54'),
(13, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 19:59:45'),
(14, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_admin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:06:47'),
(15, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_itadmin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:07:55'),
(16, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:18:21'),
(17, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:18:21'),
(18, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:18:21'),
(19, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:18:22'),
(20, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:18:22'),
(21, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-16 20:18:53'),
(22, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-16 20:18:54'),
(23, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-16 20:18:54'),
(24, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-16 20:18:54'),
(25, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-16 20:18:55'),
(26, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-16 20:18:56'),
(27, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-16 20:18:56'),
(28, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-16 20:18:56'),
(29, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"702\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 20:18:57'),
(30, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-16 20:18:59'),
(31, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-16 20:18:59'),
(32, 59, 'UPDATE', 'courses', 43, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/43', '2026-03-16 20:18:59'),
(33, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-16 20:18:59'),
(34, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-16 20:19:00'),
(35, 59, 'DELETE', 'courses', 43, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/43', '2026-03-16 20:19:00'),
(36, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-16 20:19:00'),
(37, 59, 'UPDATE', 'courses', 19, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/19', '2026-03-16 20:19:00'),
(38, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-16 20:19:00'),
(39, 59, 'DELETE', 'courses', 19, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/19', '2026-03-16 20:19:00'),
(40, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-16 20:19:02'),
(41, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-16 20:19:02'),
(42, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-16 20:19:02'),
(43, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-16 20:19:02'),
(44, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-16 20:19:03'),
(45, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-16 20:19:03'),
(46, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-16 20:19:03'),
(47, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-16 20:19:03'),
(48, 59, 'CREATE', 'discussions', 3, NULL, '{\"messageText\":\"Test reply from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions/3/reply', '2026-03-16 20:19:03'),
(49, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-16 20:19:03'),
(50, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-16 20:19:04'),
(51, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-16 20:19:04'),
(52, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-16 20:19:04'),
(53, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-16 20:19:05'),
(54, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-16 20:19:05'),
(55, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-16 20:19:06'),
(56, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/21', '2026-03-16 20:19:06'),
(57, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/21', '2026-03-16 20:19:06'),
(58, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-16 20:19:07'),
(59, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-16 20:19:07'),
(60, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-16 20:19:09'),
(61, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-16 20:19:09'),
(62, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-16 20:19:10'),
(63, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-16 20:19:10'),
(64, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-16 20:19:10'),
(65, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-16 20:19:10'),
(66, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-16 20:19:11'),
(67, 59, 'DELETE', 'calendar', 12, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/12', '2026-03-16 20:19:11'),
(68, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-16 20:19:12'),
(69, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-16 20:19:12'),
(70, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-16 20:19:12'),
(71, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-16 20:19:13'),
(72, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-16 20:19:14'),
(73, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-16 20:19:16'),
(74, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-16 20:19:17'),
(75, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:19:59'),
(76, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:19:59'),
(77, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:20:00'),
(78, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:20:00'),
(79, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:20:00'),
(80, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-16 20:20:00'),
(81, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-16 20:20:00'),
(82, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-16 20:20:00'),
(83, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-16 20:20:01'),
(84, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-16 20:20:01'),
(85, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-16 20:20:02'),
(86, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-16 20:20:02'),
(87, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-16 20:20:03'),
(88, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"312\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 20:20:04'),
(89, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-16 20:20:05'),
(90, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-16 20:20:05'),
(91, 59, 'UPDATE', 'courses', 46, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/46', '2026-03-16 20:20:06'),
(92, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-16 20:20:06'),
(93, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-16 20:20:06'),
(94, 59, 'DELETE', 'courses', 46, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/46', '2026-03-16 20:20:06'),
(95, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-16 20:20:06'),
(96, 59, 'UPDATE', 'courses', 20, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/20', '2026-03-16 20:20:07'),
(97, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-16 20:20:07'),
(98, 59, 'DELETE', 'courses', 20, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/20', '2026-03-16 20:20:07'),
(99, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-16 20:20:08'),
(100, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-16 20:20:08'),
(101, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-16 20:20:08'),
(102, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-16 20:20:08'),
(103, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-16 20:20:08'),
(104, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-16 20:20:09'),
(105, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-16 20:20:09'),
(106, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-16 20:20:09'),
(107, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-16 20:20:09'),
(108, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-16 20:20:09'),
(109, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-16 20:20:10'),
(110, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-16 20:20:10'),
(111, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-16 20:20:10'),
(112, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-16 20:20:11'),
(113, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-16 20:20:12'),
(114, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/22', '2026-03-16 20:20:12'),
(115, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/22', '2026-03-16 20:20:12'),
(116, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-16 20:20:13'),
(117, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-16 20:20:13'),
(118, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-16 20:20:14'),
(119, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-16 20:20:15'),
(120, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-16 20:20:15'),
(121, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-16 20:20:15'),
(122, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-16 20:20:15'),
(123, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-16 20:20:16'),
(124, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-16 20:20:17'),
(125, 59, 'DELETE', 'calendar', 13, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/13', '2026-03-16 20:20:17'),
(126, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-16 20:20:17'),
(127, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-16 20:20:18'),
(128, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-16 20:20:18'),
(129, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-16 20:20:19'),
(130, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-16 20:20:20'),
(131, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-16 20:20:21'),
(132, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-16 20:20:22'),
(133, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_admin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:29:01'),
(134, 66, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-16 20:29:14'),
(135, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"Course_Materials_2\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE google-drive via POST /google-drive/folders', '2026-03-16 20:29:51'),
(136, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"folderId\":\"1G0IX197-VAZ7KpiRe6YZHk0mwy1cd-8j\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE google-drive via POST /google-drive/files/upload', '2026-03-16 20:30:11'),
(137, 66, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 1 Lecture Notes: Introduction to Data Structures\",\"description\":\"Comprehensive lecture notes covering the basics.\",\"materialType\":\"lecture\",\"weekNumber\":\"1\",\"orderIndex\":\"0\",\"isPublished\":\"false\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE courses via POST /api/courses/1/materials/document', '2026-03-16 20:31:41'),
(138, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:32:40'),
(139, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:32:40'),
(140, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:32:40'),
(141, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:32:40'),
(142, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:32:41'),
(143, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-16 20:32:41'),
(144, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-16 20:32:41'),
(145, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-16 20:32:41'),
(146, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-16 20:32:41'),
(147, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-16 20:32:42'),
(148, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-16 20:32:43'),
(149, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-16 20:32:43'),
(150, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-16 20:32:44'),
(151, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"913\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 20:32:45'),
(152, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-16 20:32:46'),
(153, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-16 20:32:46'),
(154, 59, 'UPDATE', 'courses', 50, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/50', '2026-03-16 20:32:46'),
(155, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-16 20:32:47'),
(156, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-16 20:32:47'),
(157, 59, 'DELETE', 'courses', 50, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/50', '2026-03-16 20:32:47'),
(158, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-16 20:32:47'),
(159, 59, 'UPDATE', 'courses', 21, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/21', '2026-03-16 20:32:47'),
(160, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-16 20:32:47'),
(161, 59, 'DELETE', 'courses', 21, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/21', '2026-03-16 20:32:48'),
(162, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-16 20:32:49'),
(163, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-16 20:32:49'),
(164, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-16 20:32:49'),
(165, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-16 20:32:49'),
(166, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-16 20:32:50'),
(167, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-16 20:32:50'),
(168, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-16 20:32:50'),
(169, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-16 20:32:50'),
(170, 59, 'CREATE', 'discussions', 3, NULL, '{\"messageText\":\"Test reply from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions/3/reply', '2026-03-16 20:32:50'),
(171, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-16 20:32:50'),
(172, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-16 20:32:51'),
(173, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-16 20:32:51'),
(174, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-16 20:32:51'),
(175, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-16 20:32:52'),
(176, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-16 20:32:52'),
(177, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-16 20:32:53'),
(178, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/23', '2026-03-16 20:32:53'),
(179, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/23', '2026-03-16 20:32:53'),
(180, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-16 20:32:54'),
(181, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-16 20:32:54'),
(182, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-16 20:32:56'),
(183, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-16 20:32:56'),
(184, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-16 20:32:57'),
(185, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-16 20:32:57'),
(186, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-16 20:32:57'),
(187, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-16 20:32:57'),
(188, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-16 20:32:58'),
(189, 59, 'DELETE', 'calendar', 14, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/14', '2026-03-16 20:32:58'),
(190, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-16 20:32:59'),
(191, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-16 20:32:59'),
(192, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-16 20:33:00'),
(193, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-16 20:33:00'),
(194, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-16 20:33:02'),
(195, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-16 20:33:03'),
(196, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-16 20:33:03'),
(197, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-16 20:33:04'),
(198, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-16 20:33:05'),
(199, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-16 20:33:15'),
(200, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-16 20:33:18'),
(201, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-16 20:34:07'),
(202, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-16 20:34:08'),
(203, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-16 20:34:08'),
(204, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-16 20:34:08'),
(205, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"888\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 20:34:09'),
(206, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_admin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:34:32'),
(207, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_itadmin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:34:43'),
(208, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:44:46'),
(209, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:44:47'),
(210, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:44:47'),
(211, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:44:47'),
(212, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:44:47'),
(213, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-16 20:44:47'),
(214, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:45:05'),
(215, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:45:06');
INSERT INTO `audit_logs` (`log_id`, `user_id`, `action_type`, `entity_type`, `entity_id`, `old_values`, `new_values`, `ip_address`, `user_agent`, `description`, `created_at`) VALUES
(216, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:45:06'),
(217, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:45:06'),
(218, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:45:06'),
(219, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-16 20:45:06'),
(220, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-16 20:45:07'),
(221, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-16 20:45:07'),
(222, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-16 20:45:07'),
(223, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-16 20:45:08'),
(224, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-16 20:45:09'),
(225, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-16 20:45:09'),
(226, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-16 20:45:09'),
(227, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"902\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 20:45:10'),
(228, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-16 20:45:12'),
(229, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-16 20:45:12'),
(230, 59, 'UPDATE', 'courses', 53, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/53', '2026-03-16 20:45:12'),
(231, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-16 20:45:12'),
(232, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-16 20:45:12'),
(233, 59, 'DELETE', 'courses', 53, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/53', '2026-03-16 20:45:13'),
(234, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-16 20:45:13'),
(235, 59, 'UPDATE', 'courses', 22, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/22', '2026-03-16 20:45:13'),
(236, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-16 20:45:13'),
(237, 59, 'DELETE', 'courses', 22, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/22', '2026-03-16 20:45:13'),
(238, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-16 20:45:15'),
(239, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-16 20:45:15'),
(240, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-16 20:45:15'),
(241, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-16 20:45:15'),
(242, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-16 20:45:15'),
(243, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-16 20:45:15'),
(244, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-16 20:45:16'),
(245, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-16 20:45:16'),
(246, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-16 20:45:16'),
(247, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-16 20:45:16'),
(248, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-16 20:45:17'),
(249, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-16 20:45:17'),
(250, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-16 20:45:17'),
(251, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-16 20:45:18'),
(252, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-16 20:45:19'),
(253, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/24', '2026-03-16 20:45:19'),
(254, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/24', '2026-03-16 20:45:19'),
(255, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-16 20:45:20'),
(256, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-16 20:45:20'),
(257, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-16 20:45:22'),
(258, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-16 20:45:22'),
(259, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-16 20:45:23'),
(260, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-16 20:45:23'),
(261, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-16 20:45:23'),
(262, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-16 20:45:23'),
(263, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-16 20:45:24'),
(264, 59, 'DELETE', 'calendar', 15, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/15', '2026-03-16 20:45:24'),
(265, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-16 20:45:25'),
(266, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-16 20:45:25'),
(267, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-16 20:45:25'),
(268, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-16 20:45:26'),
(269, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-16 20:45:28'),
(270, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-16 20:45:29'),
(271, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-16 20:45:30'),
(272, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-16 20:45:31'),
(273, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-16 20:45:31'),
(274, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-16 20:45:31'),
(275, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-16 20:45:31'),
(276, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:53:42'),
(277, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:53:42'),
(278, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:53:42'),
(279, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:53:42'),
(280, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:53:42'),
(281, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-16 20:53:43'),
(282, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-16 20:53:43'),
(283, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-16 20:53:43'),
(284, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-16 20:53:43'),
(285, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-16 20:53:44'),
(286, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-16 20:53:45'),
(287, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-16 20:53:45'),
(288, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-16 20:53:45'),
(289, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"113\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 20:53:46'),
(290, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-16 20:53:48'),
(291, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-16 20:53:48'),
(292, 59, 'UPDATE', 'courses', 56, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/56', '2026-03-16 20:53:48'),
(293, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-16 20:53:48'),
(294, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-16 20:53:48'),
(295, 59, 'DELETE', 'courses', 56, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/56', '2026-03-16 20:53:49'),
(296, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-16 20:53:49'),
(297, 59, 'UPDATE', 'courses', 23, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/23', '2026-03-16 20:53:49'),
(298, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-16 20:53:49'),
(299, 59, 'DELETE', 'courses', 23, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/23', '2026-03-16 20:53:49'),
(300, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-16 20:53:51'),
(301, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-16 20:53:51'),
(302, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-16 20:53:51'),
(303, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-16 20:53:51'),
(304, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-16 20:53:51'),
(305, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-16 20:53:52'),
(306, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-16 20:53:52'),
(307, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-16 20:53:52'),
(308, 59, 'CREATE', 'discussions', 3, NULL, '{\"messageText\":\"Test reply from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions/3/reply', '2026-03-16 20:53:52'),
(309, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-16 20:53:52'),
(310, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-16 20:53:52'),
(311, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-16 20:53:53'),
(312, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-16 20:53:53'),
(313, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-16 20:53:54'),
(314, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-16 20:53:54'),
(315, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-16 20:53:55'),
(316, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/25', '2026-03-16 20:53:55'),
(317, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/25', '2026-03-16 20:53:55'),
(318, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-16 20:53:56'),
(319, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-16 20:53:56'),
(320, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-16 20:53:57'),
(321, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-16 20:53:58'),
(322, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-16 20:53:58'),
(323, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-16 20:53:58'),
(324, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-16 20:53:59'),
(325, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-16 20:53:59'),
(326, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-16 20:54:00'),
(327, 59, 'DELETE', 'calendar', 16, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/16', '2026-03-16 20:54:00'),
(328, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-16 20:54:01'),
(329, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-16 20:54:01'),
(330, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-16 20:54:01'),
(331, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-16 20:54:02'),
(332, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-16 20:54:03'),
(333, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-16 20:54:05'),
(334, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-16 20:54:05'),
(335, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-16 20:54:07'),
(336, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-16 20:54:07'),
(337, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-16 20:54:07'),
(338, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-16 20:54:07'),
(339, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:55:53'),
(340, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:55:53'),
(341, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:55:53'),
(342, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:55:53'),
(343, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:55:53'),
(344, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:56:24'),
(345, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:56:24'),
(346, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:56:24'),
(347, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:56:24'),
(348, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":false}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:56:24'),
(349, NULL, 'UPDATE', 'courses', 1, NULL, '{\"name\":\"Updated Course Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1', '2026-03-16 20:56:27'),
(350, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":1,\"maxCapacity\":30,\"location\":\"Room A101\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 20:56:28'),
(351, NULL, 'UPDATE', 'sections', 11, NULL, '{\"maxCapacity\":35,\"location\":\"Room B202\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE sections via PATCH /api/sections/11', '2026-03-16 20:56:28'),
(352, NULL, 'UPDATE', 'sections', 11, NULL, '{\"action\":\"increment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE sections via PATCH /api/sections/11/enrollment', '2026-03-16 20:56:28'),
(353, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_admin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:56:45'),
(354, 66, 'DELETE', 'security', 10, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/sessions/user/10', '2026-03-16 20:57:26'),
(355, 66, 'UPDATE', 'settings', NULL, NULL, '{\"settings\":{\"platform_name\":\"EduVerse updated\"}}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings', '2026-03-16 20:57:27'),
(356, 66, 'UPDATE', 'settings', NULL, NULL, '{\"value\":\"EduVerse Pro\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/platform_name', '2026-03-16 20:57:27'),
(357, 66, 'UPDATE', 'settings', NULL, NULL, '{\"primaryColor\":\"#ff0000\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/branding/1', '2026-03-16 20:57:27'),
(358, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_itadmin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-16 20:58:10'),
(359, 67, 'CREATE', 'security', NULL, NULL, '{\"format\":\"json\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/logs/export', '2026-03-16 20:59:21'),
(360, 66, 'DELETE', 'security', 10, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/sessions/user/10', '2026-03-16 20:59:21'),
(361, 67, 'CREATE', 'security', NULL, NULL, '{\"ipAddress\":\"192.168.1.50\",\"reason\":\"Repeated failed logins\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/block-ip', '2026-03-16 20:59:21'),
(362, 67, 'DELETE', 'security', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/blocked-ips/1', '2026-03-16 20:59:21'),
(363, 67, 'CREATE', 'audit', NULL, NULL, '{\"format\":\"csv\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE audit via POST /api/audit/logs/export', '2026-03-16 20:59:22'),
(364, 66, 'UPDATE', 'settings', NULL, NULL, '{\"settings\":{\"platform_name\":\"EduVerse updated\"}}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings', '2026-03-16 20:59:22'),
(365, 66, 'UPDATE', 'settings', NULL, NULL, '{\"value\":\"EduVerse Pro\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/platform_name', '2026-03-16 20:59:22'),
(366, 66, 'UPDATE', 'settings', NULL, NULL, '{\"primaryColor\":\"#ff0000\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/branding/1', '2026-03-16 20:59:22'),
(367, 67, 'UPDATE', 'settings', 1, NULL, '{\"maxRequests\":1000,\"windowSeconds\":60}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/rate-limits/1', '2026-03-16 20:59:22'),
(368, 67, 'CREATE', 'integrations', NULL, NULL, '{\"integrationName\":\"Canvas LMS\",\"integrationType\":\"lms\",\"campusId\":1,\"apiEndpoint\":\"https://canvas.example.com\",\"apiKey\":\"s3cr3t\",\"apiSecret\":\"s3cr3t2\",\"configuration\":\"{}\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE integrations via POST /api/integrations', '2026-03-16 20:59:23'),
(369, 67, 'UPDATE', 'integrations', 1, NULL, '{\"isActive\":true,\"apiEndpoint\":\"https://canvas-new.example.com\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE integrations via PUT /api/integrations/1', '2026-03-16 20:59:23'),
(370, 67, 'DELETE', 'integrations', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE integrations via DELETE /api/integrations/1', '2026-03-16 20:59:23'),
(371, 67, 'CREATE', 'integrations', 2, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE integrations via POST /api/integrations/2/test', '2026-03-16 21:00:03'),
(372, 67, 'CREATE', 'integrations', 2, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE integrations via POST /api/integrations/2/sync', '2026-03-16 21:00:29'),
(373, 67, 'DELETE', 'security', 57, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'DELETE security via DELETE /api/security/sessions/57', '2026-03-16 21:01:50'),
(374, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:02:13'),
(375, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:03:43'),
(376, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:04:57'),
(377, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:04:57'),
(378, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:04:57'),
(379, 61, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"Test CPU Alert\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"description\":\"Test alert\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'CREATE alerts via POST /api/alerts', '2026-03-16 22:04:58'),
(380, 61, 'UPDATE', 'alerts', 1, NULL, '{\"name\":\"Updated CPU Alert\",\"threshold\":95}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'UPDATE alerts via PATCH /api/alerts/1', '2026-03-16 22:04:58'),
(381, 61, 'DELETE', 'alerts', 1, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'DELETE alerts via DELETE /api/alerts/1', '2026-03-16 22:04:58'),
(382, 61, 'CREATE', 'backups', NULL, NULL, '{}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'CREATE backups via POST /api/backups', '2026-03-16 22:05:00'),
(383, 61, 'CREATE', 'database', NULL, NULL, '{}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'CREATE database via POST /api/database/optimize', '2026-03-16 22:05:00'),
(384, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_admin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:16:02'),
(385, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_itadmin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:19:24'),
(386, 67, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"High CPU Alert\",\"description\":\"Triggers when CPU usage exceeds threshold\",\"conditionType\":\"cpu_usage\",\"threshold\":90}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE alerts via POST /api/alerts', '2026-03-16 22:20:56'),
(387, 67, 'UPDATE', 'alerts', 2, NULL, '{\"name\":\"High CPU Alert\",\"description\":\"Triggers when CPU usage exceeds threshold updated\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"isActive\":true}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'UPDATE alerts via PATCH /api/alerts/2', '2026-03-16 22:21:34'),
(388, 67, 'UPDATE', 'alerts', 2, NULL, '{\"name\":\"High CPU Alert\",\"description\":\"Triggers when CPU usage exceeds threshold updated\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"isActive\":true}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'UPDATE alerts via PATCH /api/alerts/2', '2026-03-16 22:21:35'),
(389, 67, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"High GPU Alert\",\"description\":\"Triggers when GPU usage exceeds threshold\",\"conditionType\":\"gpu_usage\",\"threshold\":94}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE alerts via POST /api/alerts', '2026-03-16 22:22:05'),
(390, 67, 'DELETE', 'alerts', 3, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'DELETE alerts via DELETE /api/alerts/3', '2026-03-16 22:22:13'),
(391, 67, 'CREATE', 'backups', NULL, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE backups via POST /api/backups', '2026-03-16 22:22:56'),
(392, 67, 'DELETE', 'backups', 2, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'DELETE backups via DELETE /api/backups/2', '2026-03-16 22:24:07'),
(393, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:31:18'),
(394, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:31:18'),
(395, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:31:18'),
(396, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:31:18'),
(397, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:31:18'),
(398, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-16 22:31:19'),
(399, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-16 22:31:19'),
(400, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-16 22:31:19'),
(401, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-16 22:31:19'),
(402, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-16 22:31:20'),
(403, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-16 22:31:21'),
(404, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-16 22:31:21'),
(405, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-16 22:31:22'),
(406, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"197\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 22:31:23'),
(407, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-16 22:31:24'),
(408, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-16 22:31:24'),
(409, 59, 'UPDATE', 'courses', 59, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/59', '2026-03-16 22:31:24'),
(410, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-16 22:31:25'),
(411, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-16 22:31:25'),
(412, 59, 'DELETE', 'courses', 59, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/59', '2026-03-16 22:31:25'),
(413, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-16 22:31:25'),
(414, 59, 'UPDATE', 'courses', 24, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/24', '2026-03-16 22:31:25'),
(415, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-16 22:31:25'),
(416, 59, 'DELETE', 'courses', 24, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/24', '2026-03-16 22:31:26'),
(417, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-16 22:31:27'),
(418, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-16 22:31:27'),
(419, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-16 22:31:27'),
(420, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-16 22:31:27'),
(421, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-16 22:31:28'),
(422, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-16 22:31:28'),
(423, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-16 22:31:28'),
(424, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-16 22:31:28'),
(425, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-16 22:31:29'),
(426, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-16 22:31:29'),
(427, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-16 22:31:29'),
(428, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-16 22:31:29'),
(429, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-16 22:31:30'),
(430, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-16 22:31:30');
INSERT INTO `audit_logs` (`log_id`, `user_id`, `action_type`, `entity_type`, `entity_id`, `old_values`, `new_values`, `ip_address`, `user_agent`, `description`, `created_at`) VALUES
(431, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-16 22:31:31'),
(432, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/26', '2026-03-16 22:31:31'),
(433, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/26', '2026-03-16 22:31:31'),
(434, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-16 22:31:32'),
(435, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-16 22:31:33'),
(436, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-16 22:31:34'),
(437, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-16 22:31:34'),
(438, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-16 22:31:35'),
(439, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-16 22:31:35'),
(440, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-16 22:31:35'),
(441, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-16 22:31:35'),
(442, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-16 22:31:36'),
(443, 59, 'DELETE', 'calendar', 17, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/17', '2026-03-16 22:31:36'),
(444, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-16 22:31:37'),
(445, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-16 22:31:37'),
(446, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-16 22:31:38'),
(447, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-16 22:31:38'),
(448, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-16 22:31:40'),
(449, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-16 22:31:41'),
(450, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-16 22:31:42'),
(451, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-16 22:31:44'),
(452, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-16 22:31:44'),
(453, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-16 22:31:44'),
(454, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-16 22:31:44'),
(455, 67, 'CREATE', 'backups', NULL, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE backups via POST /api/backups', '2026-03-16 22:34:12'),
(456, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:35:06'),
(457, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:35:06'),
(458, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:35:06'),
(459, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:35:07'),
(460, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 22:35:07'),
(461, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-16 22:35:07'),
(462, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-16 22:35:07'),
(463, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-16 22:35:07'),
(464, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-16 22:35:08'),
(465, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-16 22:35:08'),
(466, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-16 22:35:09'),
(467, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-16 22:35:09'),
(468, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-16 22:35:10'),
(469, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"806\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 22:35:11'),
(470, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-16 22:35:12'),
(471, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-16 22:35:12'),
(472, 59, 'UPDATE', 'courses', 62, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/62', '2026-03-16 22:35:12'),
(473, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-16 22:35:13'),
(474, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-16 22:35:13'),
(475, 59, 'DELETE', 'courses', 62, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/62', '2026-03-16 22:35:13'),
(476, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-16 22:35:13'),
(477, 59, 'UPDATE', 'courses', 25, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/25', '2026-03-16 22:35:13'),
(478, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-16 22:35:13'),
(479, 59, 'DELETE', 'courses', 25, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/25', '2026-03-16 22:35:14'),
(480, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-16 22:35:14'),
(481, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-16 22:35:15'),
(482, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-16 22:35:15'),
(483, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-16 22:35:15'),
(484, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-16 22:35:15'),
(485, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-16 22:35:15'),
(486, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-16 22:35:16'),
(487, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-16 22:35:16'),
(488, 59, 'CREATE', 'discussions', 3, NULL, '{\"messageText\":\"Test reply from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions/3/reply', '2026-03-16 22:35:16'),
(489, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-16 22:35:16'),
(490, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-16 22:35:16'),
(491, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-16 22:35:17'),
(492, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-16 22:35:17'),
(493, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-16 22:35:17'),
(494, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-16 22:35:17'),
(495, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-16 22:35:19'),
(496, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/27', '2026-03-16 22:35:19'),
(497, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/27', '2026-03-16 22:35:19'),
(498, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-16 22:35:20'),
(499, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-16 22:35:20'),
(500, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-16 22:35:21'),
(501, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-16 22:35:21'),
(502, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-16 22:35:22'),
(503, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-16 22:35:22'),
(504, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-16 22:35:22'),
(505, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-16 22:35:22'),
(506, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-16 22:35:23'),
(507, 59, 'DELETE', 'calendar', 18, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/18', '2026-03-16 22:35:23'),
(508, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-16 22:35:24'),
(509, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-16 22:35:25'),
(510, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-16 22:35:25'),
(511, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-16 22:35:26'),
(512, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-16 22:35:27'),
(513, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-16 22:35:28'),
(514, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-16 22:35:28'),
(515, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-16 22:35:30'),
(516, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-16 22:35:30'),
(517, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-16 22:35:30'),
(518, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-16 22:35:30'),
(519, 61, 'CREATE', 'security', NULL, NULL, '{\"format\":\"json\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/logs/export', '2026-03-16 22:35:30'),
(520, 61, 'DELETE', 'security', 10, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/sessions/user/10', '2026-03-16 22:35:31'),
(521, 61, 'CREATE', 'security', NULL, NULL, '{\"ipAddress\":\"192.168.1.50\",\"reason\":\"Repeated failed logins\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/block-ip', '2026-03-16 22:35:31'),
(522, 61, 'DELETE', 'security', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/blocked-ips/1', '2026-03-16 22:35:31'),
(523, 61, 'CREATE', 'audit', NULL, NULL, '{\"format\":\"csv\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE audit via POST /api/audit/logs/export', '2026-03-16 22:35:32'),
(524, 61, 'UPDATE', 'settings', NULL, NULL, '{\"settings\":{\"platform_name\":\"EduVerse updated\"}}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings', '2026-03-16 22:35:32'),
(525, 61, 'UPDATE', 'settings', NULL, NULL, '{\"value\":\"EduVerse Pro\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/platform_name', '2026-03-16 22:35:32'),
(526, 61, 'UPDATE', 'settings', NULL, NULL, '{\"primaryColor\":\"#ff0000\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/branding/1', '2026-03-16 22:35:32'),
(527, 61, 'UPDATE', 'settings', 1, NULL, '{\"maxRequests\":1000,\"windowSeconds\":60}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/rate-limits/1', '2026-03-16 22:35:32'),
(528, 61, 'CREATE', 'integrations', NULL, NULL, '{\"integrationName\":\"Canvas LMS\",\"integrationType\":\"lms\",\"campusId\":1,\"apiEndpoint\":\"https://canvas.example.com\",\"apiKey\":\"s3cr3t\",\"apiSecret\":\"s3cr3t2\",\"configuration\":\"{}\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE integrations via POST /api/integrations', '2026-03-16 22:35:33'),
(529, 61, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"High CPU Alert\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"description\":\"Alert when CPU exceeds 90%\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE alerts via POST /api/alerts', '2026-03-16 22:35:35'),
(530, 61, 'CREATE', 'backups', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE backups via POST /api/backups', '2026-03-16 22:35:36'),
(531, 61, 'CREATE', 'database', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE database via POST /api/database/optimize', '2026-03-16 22:35:37'),
(532, NULL, 'CREATE', 'auth', NULL, NULL, '{\"password\":\"SecureP@ss123\",\"email\":\"student.tarek@example.com\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'CREATE auth via POST /api/auth/login', '2026-03-16 23:36:36'),
(533, NULL, 'CREATE', 'auth', NULL, NULL, '{\"password\":\"SecureP@ss123\",\"email\":\"instructor.tarek@example.com\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'CREATE auth via POST /api/auth/login', '2026-03-16 23:36:36'),
(534, NULL, 'CREATE', 'auth', NULL, NULL, '{\"password\":\"SecureP@ss123\",\"email\":\"admin.tarek@example.com\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'CREATE auth via POST /api/auth/login', '2026-03-16 23:36:36'),
(535, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:38:46'),
(536, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:38:46'),
(537, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:38:46'),
(538, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:38:46'),
(539, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', NULL, 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-16 23:38:46'),
(540, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:38:58'),
(541, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:38:58'),
(542, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:38:58'),
(543, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:38:59'),
(544, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', NULL, 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-16 23:38:59'),
(545, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:40:04'),
(546, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:40:04'),
(547, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:40:04'),
(548, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:40:04'),
(549, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', NULL, 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-16 23:40:04'),
(550, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:41:31'),
(551, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:41:31'),
(552, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:41:31'),
(553, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:41:31'),
(554, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', NULL, 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-16 23:41:31'),
(555, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:43:33'),
(556, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:43:33'),
(557, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:43:33'),
(558, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:43:33'),
(559, 57, 'CREATE', 'study-groups', NULL, NULL, '{\"courseId\":1,\"groupName\":\"Test Study Group\",\"description\":\"Testing\",\"maxMembers\":5,\"isPublic\":true}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups', '2026-03-16 23:43:33'),
(560, 58, 'CREATE', 'study-groups', 8, NULL, '{}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups/8/join', '2026-03-16 23:43:33'),
(561, 57, 'UPDATE', 'study-groups', 8, NULL, '{\"description\":\"Updated description\"}', '127.0.0.1', NULL, 'UPDATE study-groups via PUT /api/study-groups/8', '2026-03-16 23:43:33'),
(562, 58, 'DELETE', 'study-groups', 8, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/8/leave', '2026-03-16 23:43:33'),
(563, 57, 'DELETE', 'study-groups', 8, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/8', '2026-03-16 23:43:33'),
(564, 58, 'CREATE', 'office-hours', NULL, NULL, '{\"dayOfWeek\":\"monday\",\"startTime\":\"10:00:00\",\"endTime\":\"12:00:00\",\"location\":\"Room 301\",\"mode\":\"in_person\",\"maxAppointments\":4}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/slots', '2026-03-16 23:43:33'),
(565, 58, 'UPDATE', 'office-hours', 5, NULL, '{\"location\":\"Room 400\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PUT /api/office-hours/slots/5', '2026-03-16 23:43:33'),
(566, 57, 'CREATE', 'office-hours', NULL, NULL, '{\"slotId\":5,\"appointmentDate\":\"2026-04-20\",\"topic\":\"Help with HW3\",\"notes\":\"Algorithm questions\"}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/appointments', '2026-03-16 23:43:33'),
(567, 58, 'UPDATE', 'office-hours', 1, NULL, '{\"status\":\"confirmed\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PATCH /api/office-hours/appointments/1', '2026-03-16 23:43:33'),
(568, 57, 'DELETE', 'office-hours', 1, NULL, NULL, '127.0.0.1', NULL, 'DELETE office-hours via DELETE /api/office-hours/appointments/1', '2026-03-16 23:43:33'),
(569, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', NULL, 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-16 23:43:33'),
(570, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:43:55'),
(571, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:43:55'),
(572, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:43:55'),
(573, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:43:55'),
(574, 57, 'CREATE', 'study-groups', NULL, NULL, '{\"courseId\":1,\"groupName\":\"Test Study Group\",\"description\":\"Testing\",\"maxMembers\":5,\"isPublic\":true}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups', '2026-03-16 23:43:55'),
(575, 58, 'CREATE', 'study-groups', 9, NULL, '{}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups/9/join', '2026-03-16 23:43:55'),
(576, 57, 'UPDATE', 'study-groups', 9, NULL, '{\"description\":\"Updated description\"}', '127.0.0.1', NULL, 'UPDATE study-groups via PUT /api/study-groups/9', '2026-03-16 23:43:55'),
(577, 58, 'DELETE', 'study-groups', 9, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/9/leave', '2026-03-16 23:43:55'),
(578, 57, 'DELETE', 'study-groups', 9, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/9', '2026-03-16 23:43:55'),
(579, 58, 'CREATE', 'office-hours', NULL, NULL, '{\"dayOfWeek\":\"monday\",\"startTime\":\"10:00:00\",\"endTime\":\"12:00:00\",\"location\":\"Room 301\",\"mode\":\"in_person\",\"maxAppointments\":4}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/slots', '2026-03-16 23:43:55'),
(580, 58, 'UPDATE', 'office-hours', 6, NULL, '{\"location\":\"Room 400\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PUT /api/office-hours/slots/6', '2026-03-16 23:43:55'),
(581, 57, 'CREATE', 'office-hours', NULL, NULL, '{\"slotId\":6,\"appointmentDate\":\"2026-04-20\",\"topic\":\"Help with HW3\",\"notes\":\"Algorithm questions\"}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/appointments', '2026-03-16 23:43:55'),
(582, 58, 'UPDATE', 'office-hours', 2, NULL, '{\"status\":\"confirmed\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PATCH /api/office-hours/appointments/2', '2026-03-16 23:43:55'),
(583, 57, 'DELETE', 'office-hours', 2, NULL, NULL, '127.0.0.1', NULL, 'DELETE office-hours via DELETE /api/office-hours/appointments/2', '2026-03-16 23:43:55'),
(584, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', NULL, 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-16 23:43:55'),
(585, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:45:36'),
(586, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:45:36'),
(587, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:45:37'),
(588, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:45:37'),
(589, 57, 'CREATE', 'study-groups', NULL, NULL, '{\"courseId\":1,\"groupName\":\"Test Study Group\",\"description\":\"Testing\",\"maxMembers\":5,\"isPublic\":true}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups', '2026-03-16 23:45:37'),
(590, 58, 'CREATE', 'study-groups', 10, NULL, '{}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups/10/join', '2026-03-16 23:45:37'),
(591, 57, 'UPDATE', 'study-groups', 10, NULL, '{\"description\":\"Updated description\"}', '127.0.0.1', NULL, 'UPDATE study-groups via PUT /api/study-groups/10', '2026-03-16 23:45:37'),
(592, 58, 'DELETE', 'study-groups', 10, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/10/leave', '2026-03-16 23:45:37'),
(593, 57, 'DELETE', 'study-groups', 10, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/10', '2026-03-16 23:45:37'),
(594, 58, 'CREATE', 'office-hours', NULL, NULL, '{\"dayOfWeek\":\"monday\",\"startTime\":\"10:00:00\",\"endTime\":\"12:00:00\",\"location\":\"Room 301\",\"mode\":\"in_person\",\"maxAppointments\":4}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/slots', '2026-03-16 23:45:37'),
(595, 58, 'UPDATE', 'office-hours', 7, NULL, '{\"location\":\"Room 400\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PUT /api/office-hours/slots/7', '2026-03-16 23:45:37'),
(596, 57, 'CREATE', 'office-hours', NULL, NULL, '{\"slotId\":7,\"appointmentDate\":\"2026-04-20\",\"topic\":\"Help with HW3\",\"notes\":\"Algorithm questions\"}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/appointments', '2026-03-16 23:45:37'),
(597, 58, 'UPDATE', 'office-hours', 3, NULL, '{\"status\":\"confirmed\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PATCH /api/office-hours/appointments/3', '2026-03-16 23:45:37'),
(598, 57, 'DELETE', 'office-hours', 3, NULL, NULL, '127.0.0.1', NULL, 'DELETE office-hours via DELETE /api/office-hours/appointments/3', '2026-03-16 23:45:37'),
(599, 58, 'DELETE', 'office-hours', 7, NULL, NULL, '127.0.0.1', NULL, 'DELETE office-hours via DELETE /api/office-hours/slots/7', '2026-03-16 23:45:37'),
(600, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', NULL, 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-16 23:45:37'),
(601, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:52:50'),
(602, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:52:50'),
(603, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:52:50'),
(604, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:52:50'),
(605, 57, 'CREATE', 'study-groups', NULL, NULL, '{\"courseId\":1,\"groupName\":\"Test Study Group\",\"description\":\"Testing\",\"maxMembers\":5,\"isPublic\":true}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups', '2026-03-16 23:52:50'),
(606, 58, 'CREATE', 'study-groups', 11, NULL, '{}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups/11/join', '2026-03-16 23:52:50'),
(607, 57, 'UPDATE', 'study-groups', 11, NULL, '{\"description\":\"Updated description\"}', '127.0.0.1', NULL, 'UPDATE study-groups via PUT /api/study-groups/11', '2026-03-16 23:52:50'),
(608, 58, 'DELETE', 'study-groups', 11, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/11/leave', '2026-03-16 23:52:50'),
(609, 57, 'DELETE', 'study-groups', 11, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/11', '2026-03-16 23:52:50'),
(610, 58, 'CREATE', 'office-hours', NULL, NULL, '{\"dayOfWeek\":\"monday\",\"startTime\":\"10:00:00\",\"endTime\":\"12:00:00\",\"location\":\"Room 301\",\"mode\":\"in_person\",\"maxAppointments\":4}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/slots', '2026-03-16 23:52:50'),
(611, 58, 'UPDATE', 'office-hours', 8, NULL, '{\"location\":\"Room 400\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PUT /api/office-hours/slots/8', '2026-03-16 23:52:50'),
(612, 57, 'CREATE', 'office-hours', NULL, NULL, '{\"slotId\":8,\"appointmentDate\":\"2026-04-20\",\"topic\":\"Help with HW3\",\"notes\":\"Algorithm questions\"}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/appointments', '2026-03-16 23:52:51'),
(613, 58, 'UPDATE', 'office-hours', 4, NULL, '{\"status\":\"confirmed\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PATCH /api/office-hours/appointments/4', '2026-03-16 23:52:51'),
(614, 58, 'DELETE', 'office-hours', 8, NULL, NULL, '127.0.0.1', NULL, 'DELETE office-hours via DELETE /api/office-hours/slots/8', '2026-03-16 23:52:51'),
(615, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', NULL, 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-16 23:52:51'),
(616, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:54:20'),
(617, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:54:20'),
(618, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:54:20'),
(619, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\"}', '127.0.0.1', NULL, 'CREATE auth via POST /api/auth/login', '2026-03-16 23:54:21'),
(620, 57, 'CREATE', 'study-groups', NULL, NULL, '{\"courseId\":1,\"groupName\":\"Test Study Group\",\"description\":\"Testing\",\"maxMembers\":5,\"isPublic\":true}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups', '2026-03-16 23:54:21'),
(621, 58, 'CREATE', 'study-groups', 12, NULL, '{}', '127.0.0.1', NULL, 'CREATE study-groups via POST /api/study-groups/12/join', '2026-03-16 23:54:21'),
(622, 57, 'UPDATE', 'study-groups', 12, NULL, '{\"description\":\"Updated description\"}', '127.0.0.1', NULL, 'UPDATE study-groups via PUT /api/study-groups/12', '2026-03-16 23:54:21'),
(623, 58, 'DELETE', 'study-groups', 12, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/12/leave', '2026-03-16 23:54:21'),
(624, 57, 'DELETE', 'study-groups', 12, NULL, NULL, '127.0.0.1', NULL, 'DELETE study-groups via DELETE /api/study-groups/12', '2026-03-16 23:54:21'),
(625, 58, 'CREATE', 'office-hours', NULL, NULL, '{\"dayOfWeek\":\"monday\",\"startTime\":\"10:00:00\",\"endTime\":\"12:00:00\",\"location\":\"Room 301\",\"mode\":\"in_person\",\"maxAppointments\":4}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/slots', '2026-03-16 23:54:21'),
(626, 58, 'UPDATE', 'office-hours', 9, NULL, '{\"location\":\"Room 400\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PUT /api/office-hours/slots/9', '2026-03-16 23:54:21'),
(627, 57, 'CREATE', 'office-hours', NULL, NULL, '{\"slotId\":9,\"appointmentDate\":\"2026-04-20\",\"topic\":\"Help with HW3\",\"notes\":\"Algorithm questions\"}', '127.0.0.1', NULL, 'CREATE office-hours via POST /api/office-hours/appointments', '2026-03-16 23:54:21'),
(628, 58, 'UPDATE', 'office-hours', 5, NULL, '{\"status\":\"confirmed\"}', '127.0.0.1', NULL, 'UPDATE office-hours via PATCH /api/office-hours/appointments/5', '2026-03-16 23:54:21'),
(629, 57, 'DELETE', 'office-hours', 5, NULL, NULL, '127.0.0.1', NULL, 'DELETE office-hours via DELETE /api/office-hours/appointments/5', '2026-03-16 23:54:21'),
(630, 58, 'DELETE', 'office-hours', 9, NULL, NULL, '127.0.0.1', NULL, 'DELETE office-hours via DELETE /api/office-hours/slots/9', '2026-03-16 23:54:21'),
(631, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', NULL, 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-16 23:54:21'),
(632, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 23:58:53'),
(633, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 23:58:54'),
(634, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 23:58:54'),
(635, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 23:58:54'),
(636, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-16 23:58:54'),
(637, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-16 23:58:54'),
(638, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-16 23:58:55'),
(639, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-16 23:58:55'),
(640, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-16 23:58:55'),
(641, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-16 23:58:56'),
(642, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-16 23:58:57'),
(643, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-16 23:58:57'),
(644, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-16 23:58:57'),
(645, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"159\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-16 23:58:59'),
(646, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-16 23:59:00'),
(647, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-16 23:59:00'),
(648, 59, 'UPDATE', 'courses', 65, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/65', '2026-03-16 23:59:01'),
(649, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-16 23:59:01'),
(650, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-16 23:59:01'),
(651, 59, 'DELETE', 'courses', 65, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/65', '2026-03-16 23:59:01'),
(652, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-16 23:59:02'),
(653, 59, 'UPDATE', 'courses', 26, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/26', '2026-03-16 23:59:02'),
(654, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-16 23:59:02'),
(655, 59, 'DELETE', 'courses', 26, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/26', '2026-03-16 23:59:02'),
(656, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-16 23:59:03'),
(657, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-16 23:59:03'),
(658, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-16 23:59:04'),
(659, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-16 23:59:04'),
(660, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-16 23:59:04'),
(661, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-16 23:59:04'),
(662, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-16 23:59:05'),
(663, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-16 23:59:05');
INSERT INTO `audit_logs` (`log_id`, `user_id`, `action_type`, `entity_type`, `entity_id`, `old_values`, `new_values`, `ip_address`, `user_agent`, `description`, `created_at`) VALUES
(664, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-16 23:59:05'),
(665, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-16 23:59:05'),
(666, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-16 23:59:06'),
(667, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-16 23:59:06'),
(668, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-16 23:59:06'),
(669, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-16 23:59:06'),
(670, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-16 23:59:08'),
(671, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/28', '2026-03-16 23:59:08'),
(672, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/28', '2026-03-16 23:59:08'),
(673, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-16 23:59:09'),
(674, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-16 23:59:09'),
(675, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-16 23:59:10'),
(676, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-16 23:59:11'),
(677, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-16 23:59:11'),
(678, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-16 23:59:12'),
(679, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-16 23:59:12'),
(680, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-16 23:59:12'),
(681, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-16 23:59:13'),
(682, 59, 'DELETE', 'calendar', 19, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/19', '2026-03-16 23:59:13'),
(683, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-16 23:59:14'),
(684, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-16 23:59:14'),
(685, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-16 23:59:15'),
(686, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-16 23:59:15'),
(687, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-16 23:59:17'),
(688, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-16 23:59:18'),
(689, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-16 23:59:19'),
(690, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-16 23:59:20'),
(691, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-16 23:59:20'),
(692, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-16 23:59:20'),
(693, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-16 23:59:20'),
(694, 61, 'CREATE', 'security', NULL, NULL, '{\"format\":\"json\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/logs/export', '2026-03-16 23:59:21'),
(695, 61, 'DELETE', 'security', 10, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/sessions/user/10', '2026-03-16 23:59:21'),
(696, 61, 'CREATE', 'security', NULL, NULL, '{\"ipAddress\":\"192.168.1.50\",\"reason\":\"Repeated failed logins\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/block-ip', '2026-03-16 23:59:22'),
(697, 61, 'DELETE', 'security', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/blocked-ips/1', '2026-03-16 23:59:22'),
(698, 61, 'CREATE', 'audit', NULL, NULL, '{\"format\":\"csv\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE audit via POST /api/audit/logs/export', '2026-03-16 23:59:22'),
(699, 61, 'UPDATE', 'settings', NULL, NULL, '{\"settings\":{\"platform_name\":\"EduVerse updated\"}}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings', '2026-03-16 23:59:22'),
(700, 61, 'UPDATE', 'settings', NULL, NULL, '{\"value\":\"EduVerse Pro\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/platform_name', '2026-03-16 23:59:22'),
(701, 61, 'UPDATE', 'settings', NULL, NULL, '{\"primaryColor\":\"#ff0000\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/branding/1', '2026-03-16 23:59:22'),
(702, 61, 'UPDATE', 'settings', 1, NULL, '{\"maxRequests\":1000,\"windowSeconds\":60}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/rate-limits/1', '2026-03-16 23:59:23'),
(703, 61, 'CREATE', 'integrations', NULL, NULL, '{\"integrationName\":\"Canvas LMS\",\"integrationType\":\"lms\",\"campusId\":1,\"apiEndpoint\":\"https://canvas.example.com\",\"apiKey\":\"s3cr3t\",\"apiSecret\":\"s3cr3t2\",\"configuration\":\"{}\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE integrations via POST /api/integrations', '2026-03-16 23:59:23'),
(704, 61, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"High CPU Alert\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"description\":\"Alert when CPU exceeds 90%\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE alerts via POST /api/alerts', '2026-03-16 23:59:25'),
(705, 61, 'CREATE', 'backups', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE backups via POST /api/backups', '2026-03-16 23:59:27'),
(706, 61, 'CREATE', 'database', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE database via POST /api/database/optimize', '2026-03-16 23:59:28'),
(707, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:01:34'),
(708, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:01:34'),
(709, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:01:34'),
(710, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:01:35'),
(711, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:01:35'),
(712, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-17 00:01:35'),
(713, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-17 00:01:35'),
(714, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-17 00:01:35'),
(715, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-17 00:01:35'),
(716, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-17 00:01:36'),
(717, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-17 00:01:37'),
(718, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-17 00:01:38'),
(719, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-17 00:01:38'),
(720, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"542\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-17 00:01:39'),
(721, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-17 00:01:41'),
(722, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-17 00:01:41'),
(723, 59, 'UPDATE', 'courses', 68, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/68', '2026-03-17 00:01:41'),
(724, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-17 00:01:41'),
(725, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-17 00:01:41'),
(726, 59, 'DELETE', 'courses', 68, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/68', '2026-03-17 00:01:42'),
(727, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-17 00:01:42'),
(728, 59, 'UPDATE', 'courses', 27, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/27', '2026-03-17 00:01:42'),
(729, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-17 00:01:42'),
(730, 59, 'DELETE', 'courses', 27, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/27', '2026-03-17 00:01:42'),
(731, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-17 00:01:43'),
(732, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-17 00:01:43'),
(733, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-17 00:01:43'),
(734, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-17 00:01:43'),
(735, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-17 00:01:44'),
(736, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-17 00:01:44'),
(737, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-17 00:01:44'),
(738, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-17 00:01:45'),
(739, 59, 'CREATE', 'discussions', 3, NULL, '{\"messageText\":\"Test reply from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions/3/reply', '2026-03-17 00:01:45'),
(740, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-17 00:01:45'),
(741, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-17 00:01:45'),
(742, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-17 00:01:46'),
(743, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-17 00:01:46'),
(744, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-17 00:01:46'),
(745, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-17 00:01:46'),
(746, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-17 00:01:48'),
(747, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/29', '2026-03-17 00:01:48'),
(748, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/29', '2026-03-17 00:01:48'),
(749, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-17 00:01:49'),
(750, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-17 00:01:49'),
(751, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-17 00:01:50'),
(752, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-17 00:01:51'),
(753, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-17 00:01:51'),
(754, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-17 00:01:51'),
(755, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-17 00:01:52'),
(756, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-17 00:01:52'),
(757, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-17 00:01:53'),
(758, 59, 'DELETE', 'calendar', 20, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/20', '2026-03-17 00:01:53'),
(759, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-17 00:01:54'),
(760, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-17 00:01:54'),
(761, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-17 00:01:54'),
(762, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-17 00:01:55'),
(763, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-17 00:01:57'),
(764, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-17 00:01:58'),
(765, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-17 00:01:58'),
(766, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-17 00:01:59'),
(767, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-17 00:02:00'),
(768, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-17 00:02:00'),
(769, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-17 00:02:00'),
(770, 61, 'CREATE', 'security', NULL, NULL, '{\"format\":\"json\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/logs/export', '2026-03-17 00:02:00'),
(771, 61, 'DELETE', 'security', 10, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/sessions/user/10', '2026-03-17 00:02:01'),
(772, 61, 'CREATE', 'security', NULL, NULL, '{\"ipAddress\":\"192.168.1.50\",\"reason\":\"Repeated failed logins\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/block-ip', '2026-03-17 00:02:01'),
(773, 61, 'DELETE', 'security', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/blocked-ips/1', '2026-03-17 00:02:01'),
(774, 61, 'CREATE', 'audit', NULL, NULL, '{\"format\":\"csv\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE audit via POST /api/audit/logs/export', '2026-03-17 00:02:02'),
(775, 61, 'UPDATE', 'settings', NULL, NULL, '{\"settings\":{\"platform_name\":\"EduVerse updated\"}}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings', '2026-03-17 00:02:02'),
(776, 61, 'UPDATE', 'settings', NULL, NULL, '{\"value\":\"EduVerse Pro\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/platform_name', '2026-03-17 00:02:02'),
(777, 61, 'UPDATE', 'settings', NULL, NULL, '{\"primaryColor\":\"#ff0000\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/branding/1', '2026-03-17 00:02:02'),
(778, 61, 'UPDATE', 'settings', 1, NULL, '{\"maxRequests\":1000,\"windowSeconds\":60}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/rate-limits/1', '2026-03-17 00:02:02'),
(779, 61, 'CREATE', 'integrations', NULL, NULL, '{\"integrationName\":\"Canvas LMS\",\"integrationType\":\"lms\",\"campusId\":1,\"apiEndpoint\":\"https://canvas.example.com\",\"apiKey\":\"s3cr3t\",\"apiSecret\":\"s3cr3t2\",\"configuration\":\"{}\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE integrations via POST /api/integrations', '2026-03-17 00:02:03'),
(780, 61, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"High CPU Alert\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"description\":\"Alert when CPU exceeds 90%\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE alerts via POST /api/alerts', '2026-03-17 00:02:05'),
(781, 61, 'CREATE', 'backups', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE backups via POST /api/backups', '2026-03-17 00:02:07'),
(782, 61, 'CREATE', 'database', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE database via POST /api/database/optimize', '2026-03-17 00:02:07'),
(783, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:21:34'),
(784, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:21:35'),
(785, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:21:35'),
(786, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:21:35'),
(787, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:21:35'),
(788, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-17 00:21:35'),
(789, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-17 00:21:36'),
(790, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-17 00:21:36'),
(791, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-17 00:21:36'),
(792, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-17 00:21:37'),
(793, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-17 00:21:38'),
(794, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-17 00:21:38'),
(795, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-17 00:21:38'),
(796, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"547\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-17 00:21:39'),
(797, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-17 00:21:41'),
(798, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-17 00:21:41'),
(799, 59, 'UPDATE', 'courses', 71, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/71', '2026-03-17 00:21:41'),
(800, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-17 00:21:42'),
(801, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-17 00:21:42'),
(802, 59, 'DELETE', 'courses', 71, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/71', '2026-03-17 00:21:42'),
(803, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-17 00:21:42'),
(804, 59, 'UPDATE', 'courses', 28, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/28', '2026-03-17 00:21:42'),
(805, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-17 00:21:43'),
(806, 59, 'DELETE', 'courses', 28, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/28', '2026-03-17 00:21:43'),
(807, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-17 00:21:44'),
(808, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-17 00:21:44'),
(809, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-17 00:21:44'),
(810, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-17 00:21:44'),
(811, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-17 00:21:45'),
(812, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-17 00:21:45'),
(813, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-17 00:21:45'),
(814, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-17 00:21:45'),
(815, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-17 00:21:46'),
(816, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-17 00:21:46'),
(817, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-17 00:21:46'),
(818, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-17 00:21:46'),
(819, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-17 00:21:47'),
(820, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-17 00:21:47'),
(821, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-17 00:21:48'),
(822, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/30', '2026-03-17 00:21:49'),
(823, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/30', '2026-03-17 00:21:49'),
(824, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-17 00:21:50'),
(825, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-17 00:21:50'),
(826, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-17 00:21:51'),
(827, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-17 00:21:51'),
(828, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-17 00:21:52'),
(829, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-17 00:21:52'),
(830, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-17 00:21:52'),
(831, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-17 00:21:53'),
(832, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-17 00:21:54'),
(833, 59, 'DELETE', 'calendar', 21, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/21', '2026-03-17 00:21:54'),
(834, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-17 00:21:55'),
(835, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-17 00:21:55'),
(836, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-17 00:21:56'),
(837, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-17 00:21:56'),
(838, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-17 00:21:58'),
(839, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-17 00:21:59'),
(840, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-17 00:22:00'),
(841, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-17 00:22:01'),
(842, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-17 00:22:01'),
(843, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-17 00:22:01'),
(844, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-17 00:22:01'),
(845, 61, 'CREATE', 'security', NULL, NULL, '{\"format\":\"json\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/logs/export', '2026-03-17 00:22:02'),
(846, 61, 'DELETE', 'security', 10, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/sessions/user/10', '2026-03-17 00:22:02'),
(847, 61, 'CREATE', 'security', NULL, NULL, '{\"ipAddress\":\"192.168.1.50\",\"reason\":\"Repeated failed logins\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/block-ip', '2026-03-17 00:22:02'),
(848, 61, 'DELETE', 'security', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/blocked-ips/1', '2026-03-17 00:22:03'),
(849, 61, 'CREATE', 'audit', NULL, NULL, '{\"format\":\"csv\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE audit via POST /api/audit/logs/export', '2026-03-17 00:22:03'),
(850, 61, 'UPDATE', 'settings', NULL, NULL, '{\"settings\":{\"platform_name\":\"EduVerse updated\"}}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings', '2026-03-17 00:22:03'),
(851, 61, 'UPDATE', 'settings', NULL, NULL, '{\"value\":\"EduVerse Pro\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/platform_name', '2026-03-17 00:22:03'),
(852, 61, 'UPDATE', 'settings', NULL, NULL, '{\"primaryColor\":\"#ff0000\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/branding/1', '2026-03-17 00:22:04'),
(853, 61, 'UPDATE', 'settings', 1, NULL, '{\"maxRequests\":1000,\"windowSeconds\":60}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/rate-limits/1', '2026-03-17 00:22:04'),
(854, 61, 'CREATE', 'integrations', NULL, NULL, '{\"integrationName\":\"Canvas LMS\",\"integrationType\":\"lms\",\"campusId\":1,\"apiEndpoint\":\"https://canvas.example.com\",\"apiKey\":\"s3cr3t\",\"apiSecret\":\"s3cr3t2\",\"configuration\":\"{}\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE integrations via POST /api/integrations', '2026-03-17 00:22:04'),
(855, 61, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"High CPU Alert\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"description\":\"Alert when CPU exceeds 90%\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE alerts via POST /api/alerts', '2026-03-17 00:22:06'),
(856, 61, 'CREATE', 'backups', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE backups via POST /api/backups', '2026-03-17 00:22:08'),
(857, 61, 'CREATE', 'database', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE database via POST /api/database/optimize', '2026-03-17 00:22:09'),
(858, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_student@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:22:59'),
(859, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:34:17'),
(860, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:34:18'),
(861, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:34:18'),
(862, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:34:18'),
(863, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:34:18'),
(864, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-17 00:34:18'),
(865, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-17 00:34:19'),
(866, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-17 00:34:19'),
(867, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-17 00:34:19'),
(868, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-17 00:34:20'),
(869, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-17 00:34:21'),
(870, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-17 00:34:21'),
(871, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-17 00:34:21'),
(872, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"886\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-17 00:34:23'),
(873, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-17 00:34:27'),
(874, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-17 00:34:33'),
(875, 59, 'UPDATE', 'courses', 74, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/74', '2026-03-17 00:34:34'),
(876, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-17 00:34:34'),
(877, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-17 00:34:34'),
(878, 59, 'DELETE', 'courses', 74, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/74', '2026-03-17 00:34:35'),
(879, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-17 00:34:35'),
(880, 59, 'UPDATE', 'courses', 29, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/29', '2026-03-17 00:34:35'),
(881, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-17 00:34:35'),
(882, 59, 'DELETE', 'courses', 29, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/29', '2026-03-17 00:34:35'),
(883, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-17 00:34:37'),
(884, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-17 00:34:37'),
(885, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-17 00:34:37'),
(886, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-17 00:34:37'),
(887, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-17 00:34:38');
INSERT INTO `audit_logs` (`log_id`, `user_id`, `action_type`, `entity_type`, `entity_id`, `old_values`, `new_values`, `ip_address`, `user_agent`, `description`, `created_at`) VALUES
(888, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-17 00:34:38'),
(889, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-17 00:34:38'),
(890, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-17 00:34:38'),
(891, 59, 'CREATE', 'discussions', 3, NULL, '{\"messageText\":\"Test reply from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions/3/reply', '2026-03-17 00:34:38'),
(892, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-17 00:34:39'),
(893, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-17 00:34:39'),
(894, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-17 00:34:39'),
(895, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-17 00:34:39'),
(896, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-17 00:34:40'),
(897, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-17 00:34:40'),
(898, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-17 00:34:42'),
(899, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/31', '2026-03-17 00:34:42'),
(900, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/31', '2026-03-17 00:34:42'),
(901, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-17 00:34:43'),
(902, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-17 00:34:43'),
(903, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-17 00:34:44'),
(904, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-17 00:34:44'),
(905, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-17 00:34:45'),
(906, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-17 00:34:45'),
(907, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-17 00:34:45'),
(908, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-17 00:34:46'),
(909, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-17 00:34:47'),
(910, 59, 'DELETE', 'calendar', 22, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/22', '2026-03-17 00:34:47'),
(911, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-17 00:34:48'),
(912, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-17 00:34:48'),
(913, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-17 00:34:48'),
(914, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-17 00:34:49'),
(915, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-17 00:34:51'),
(916, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-17 00:34:52'),
(917, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-17 00:34:53'),
(918, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-17 00:34:54'),
(919, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-17 00:34:54'),
(920, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-17 00:34:54'),
(921, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-17 00:34:54'),
(922, 61, 'CREATE', 'security', NULL, NULL, '{\"format\":\"json\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/logs/export', '2026-03-17 00:34:55'),
(923, 61, 'DELETE', 'security', 10, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/sessions/user/10', '2026-03-17 00:34:55'),
(924, 61, 'CREATE', 'security', NULL, NULL, '{\"ipAddress\":\"192.168.1.50\",\"reason\":\"Repeated failed logins\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/block-ip', '2026-03-17 00:34:55'),
(925, 61, 'DELETE', 'security', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/blocked-ips/1', '2026-03-17 00:34:55'),
(926, 61, 'CREATE', 'audit', NULL, NULL, '{\"format\":\"csv\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE audit via POST /api/audit/logs/export', '2026-03-17 00:34:56'),
(927, 61, 'UPDATE', 'settings', NULL, NULL, '{\"settings\":{\"platform_name\":\"EduVerse updated\"}}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings', '2026-03-17 00:34:56'),
(928, 61, 'UPDATE', 'settings', NULL, NULL, '{\"value\":\"EduVerse Pro\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/platform_name', '2026-03-17 00:34:56'),
(929, 61, 'UPDATE', 'settings', NULL, NULL, '{\"primaryColor\":\"#ff0000\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/branding/1', '2026-03-17 00:34:56'),
(930, 61, 'UPDATE', 'settings', 1, NULL, '{\"maxRequests\":1000,\"windowSeconds\":60}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/rate-limits/1', '2026-03-17 00:34:57'),
(931, 61, 'CREATE', 'integrations', NULL, NULL, '{\"integrationName\":\"Canvas LMS\",\"integrationType\":\"lms\",\"campusId\":1,\"apiEndpoint\":\"https://canvas.example.com\",\"apiKey\":\"s3cr3t\",\"apiSecret\":\"s3cr3t2\",\"configuration\":\"{}\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE integrations via POST /api/integrations', '2026-03-17 00:34:57'),
(932, 61, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"High CPU Alert\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"description\":\"Alert when CPU exceeds 90%\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE alerts via POST /api/alerts', '2026-03-17 00:34:59'),
(933, 61, 'CREATE', 'backups', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE backups via POST /api/backups', '2026-03-17 00:35:01'),
(934, 61, 'CREATE', 'database', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE database via POST /api/database/optimize', '2026-03-17 00:35:02'),
(935, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_admin@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:36:57'),
(936, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:50:13'),
(937, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:50:14'),
(938, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:50:14'),
(939, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:50:14'),
(940, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:50:14'),
(941, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-17 00:50:14'),
(942, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-17 00:50:15'),
(943, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-17 00:50:15'),
(944, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-17 00:50:15'),
(945, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-17 00:50:16'),
(946, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-17 00:50:17'),
(947, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-17 00:50:17'),
(948, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-17 00:50:17'),
(949, NULL, 'CREATE', 'sections', NULL, NULL, '{\"courseId\":1,\"semesterId\":2,\"sectionNumber\":\"323\",\"maxCapacity\":30,\"location\":\"Room TEST\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE sections via POST /api/sections', '2026-03-17 00:50:19'),
(950, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-17 00:50:20'),
(951, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-17 00:50:20'),
(952, 59, 'UPDATE', 'courses', 77, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/77', '2026-03-17 00:50:20'),
(953, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-17 00:50:20'),
(954, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-17 00:50:21'),
(955, 59, 'DELETE', 'courses', 77, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/77', '2026-03-17 00:50:21'),
(956, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-17 00:50:21'),
(957, 59, 'UPDATE', 'courses', 30, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/30', '2026-03-17 00:50:21'),
(958, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-17 00:50:21'),
(959, 59, 'DELETE', 'courses', 30, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/30', '2026-03-17 00:50:21'),
(960, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-17 00:50:23'),
(961, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-17 00:50:23'),
(962, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-17 00:50:23'),
(963, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-17 00:50:23'),
(964, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-17 00:50:24'),
(965, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-17 00:50:24'),
(966, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-17 00:50:24'),
(967, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-17 00:50:24'),
(968, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-17 00:50:24'),
(969, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-17 00:50:24'),
(970, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-17 00:50:25'),
(971, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-17 00:50:25'),
(972, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-17 00:50:25'),
(973, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-17 00:50:26'),
(974, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-17 00:50:27'),
(975, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/32', '2026-03-17 00:50:27'),
(976, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/32', '2026-03-17 00:50:27'),
(977, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-17 00:50:28'),
(978, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-17 00:50:28'),
(979, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-17 00:50:29'),
(980, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-17 00:50:30'),
(981, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-17 00:50:30'),
(982, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-17 00:50:31'),
(983, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-17 00:50:31'),
(984, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-17 00:50:31'),
(985, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-17 00:50:32'),
(986, 59, 'DELETE', 'calendar', 23, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/23', '2026-03-17 00:50:32'),
(987, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-17 00:50:33'),
(988, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-17 00:50:33'),
(989, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-17 00:50:33'),
(990, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-17 00:50:34'),
(991, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-17 00:50:35'),
(992, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-17 00:50:37'),
(993, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-17 00:50:37'),
(994, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-17 00:50:39'),
(995, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-17 00:50:39'),
(996, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-17 00:50:39'),
(997, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-17 00:50:39'),
(998, 61, 'CREATE', 'security', NULL, NULL, '{\"format\":\"json\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/logs/export', '2026-03-17 00:50:39'),
(999, 61, 'DELETE', 'security', 10, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/sessions/user/10', '2026-03-17 00:50:40'),
(1000, 61, 'CREATE', 'security', NULL, NULL, '{\"ipAddress\":\"192.168.1.50\",\"reason\":\"Repeated failed logins\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/block-ip', '2026-03-17 00:50:40'),
(1001, 61, 'DELETE', 'security', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/blocked-ips/1', '2026-03-17 00:50:40'),
(1002, 61, 'CREATE', 'audit', NULL, NULL, '{\"format\":\"csv\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE audit via POST /api/audit/logs/export', '2026-03-17 00:50:41'),
(1003, 61, 'UPDATE', 'settings', NULL, NULL, '{\"settings\":{\"platform_name\":\"EduVerse updated\"}}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings', '2026-03-17 00:50:41'),
(1004, 61, 'UPDATE', 'settings', NULL, NULL, '{\"value\":\"EduVerse Pro\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/platform_name', '2026-03-17 00:50:41'),
(1005, 61, 'UPDATE', 'settings', NULL, NULL, '{\"primaryColor\":\"#ff0000\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/branding/1', '2026-03-17 00:50:41'),
(1006, 61, 'UPDATE', 'settings', 1, NULL, '{\"maxRequests\":1000,\"windowSeconds\":60}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/rate-limits/1', '2026-03-17 00:50:41'),
(1007, 61, 'CREATE', 'integrations', NULL, NULL, '{\"integrationName\":\"Canvas LMS\",\"integrationType\":\"lms\",\"campusId\":1,\"apiEndpoint\":\"https://canvas.example.com\",\"apiKey\":\"s3cr3t\",\"apiSecret\":\"s3cr3t2\",\"configuration\":\"{}\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE integrations via POST /api/integrations', '2026-03-17 00:50:42'),
(1008, 61, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"High CPU Alert\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"description\":\"Alert when CPU exceeds 90%\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE alerts via POST /api/alerts', '2026-03-17 00:50:44'),
(1009, 61, 'CREATE', 'backups', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE backups via POST /api/backups', '2026-03-17 00:50:45'),
(1010, 61, 'CREATE', 'database', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE database via POST /api/database/optimize', '2026-03-17 00:50:46'),
(1011, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:56:59'),
(1012, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:56:59'),
(1013, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:56:59'),
(1014, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:56:59'),
(1015, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 00:57:00'),
(1016, NULL, 'CREATE', 'auth', NULL, NULL, '{\"refreshToken\":\"[REDACTED]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/refresh-token', '2026-03-17 00:57:00'),
(1017, 57, 'UPDATE', 'users', NULL, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\",\"phone\":\"+201234567890\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/profile', '2026-03-17 00:57:00'),
(1018, 57, 'UPDATE', 'users', NULL, NULL, '{\"theme\":\"dark\",\"language\":\"en\",\"emailNotifications\":true,\"pushNotifications\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PUT /api/users/preferences', '2026-03-17 00:57:00'),
(1019, 57, 'UPDATE', 'users', NULL, NULL, '{\"currentPassword\":\"SecureP@ss123\",\"newPassword\":\"SecureP@ss123\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE users via PATCH /api/users/password', '2026-03-17 00:57:00'),
(1020, 59, 'UPDATE', 'admin', 57, NULL, '{\"firstName\":\"Student\",\"lastName\":\"Tarek\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE admin via PUT /api/admin/users/57', '2026-03-17 00:57:01'),
(1021, 59, 'UPDATE', 'campuses', 1, NULL, '{\"name\":\"Updated Campus Name\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE campuses via PUT /api/campuses/1', '2026-03-17 00:57:02'),
(1022, 59, 'UPDATE', 'departments', 1, NULL, '{\"name\":\"Updated Department\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE departments via PUT /api/departments/1', '2026-03-17 00:57:02'),
(1023, 59, 'UPDATE', 'programs', 1, NULL, '{\"name\":\"Updated Program\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE programs via PUT /api/programs/1', '2026-03-17 00:57:03'),
(1024, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"API Dog Test Material\",\"materialType\":\"document\",\"description\":\"Created by API Dog test\",\"weekNumber\":1,\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials', '2026-03-17 00:57:05'),
(1025, 59, 'CREATE', 'courses', 1, NULL, '{\"materials\":[{\"title\":\"Bulk Test 1\",\"materialType\":\"lecture\",\"weekNumber\":10,\"isPublished\":true},{\"title\":\"Bulk Test 2\",\"materialType\":\"slide\",\"weekNumber\":10,\"isPublished\":true}]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/bulk', '2026-03-17 00:57:05'),
(1026, 59, 'UPDATE', 'courses', 80, NULL, '{\"title\":\"Updated API Dog Material\",\"description\":\"Updated by test\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/materials/80', '2026-03-17 00:57:05'),
(1027, 59, 'UPDATE', 'courses', 15, NULL, '{\"isPublished\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/materials/15/visibility', '2026-03-17 00:57:05'),
(1028, 59, 'CREATE', 'courses', 15, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/materials/15/view', '2026-03-17 00:57:06'),
(1029, 59, 'DELETE', 'courses', 80, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/materials/80', '2026-03-17 00:57:06'),
(1030, 59, 'CREATE', 'courses', 1, NULL, '{\"title\":\"Week 10: API Dog Test\",\"organizationType\":\"lecture\",\"weekNumber\":10,\"orderIndex\":99}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE courses via POST /api/courses/1/structure', '2026-03-17 00:57:06'),
(1031, 59, 'UPDATE', 'courses', 31, NULL, '{\"title\":\"Week 10: Updated\",\"description\":\"Updated by API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PUT /api/courses/1/structure/31', '2026-03-17 00:57:06'),
(1032, 59, 'UPDATE', 'courses', 1, NULL, '{\"orderIds\":[7,8,9,10,11,12]}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE courses via PATCH /api/courses/1/structure/reorder', '2026-03-17 00:57:06'),
(1033, 59, 'DELETE', 'courses', 31, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE courses via DELETE /api/courses/1/structure/31', '2026-03-17 00:57:07'),
(1034, 59, 'CREATE', 'announcements', NULL, NULL, '{\"title\":\"API Dog Test Announcement\",\"content\":\"This is a test announcement from API Dog.\",\"courseId\":1,\"priority\":\"medium\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE announcements via POST /api/announcements', '2026-03-17 00:57:08'),
(1035, 59, 'UPDATE', 'announcements', 1, NULL, '{\"title\":\"Updated: Welcome to CS101!\",\"content\":\"Updated announcement content.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PUT /api/announcements/1', '2026-03-17 00:57:08'),
(1036, 59, 'UPDATE', 'announcements', 1, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/publish', '2026-03-17 00:57:08'),
(1037, 59, 'UPDATE', 'announcements', 1, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE announcements via PATCH /api/announcements/1/pin', '2026-03-17 00:57:08'),
(1038, 59, 'CREATE', 'assignments', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Assignment\",\"description\":\"Test assignment from API Dog\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE assignments via POST /api/assignments', '2026-03-17 00:57:09'),
(1039, 59, 'UPDATE', 'assignments', 1, NULL, '{\"title\":\"Updated Assignment Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE assignments via PATCH /api/assignments/1', '2026-03-17 00:57:09'),
(1040, 59, 'CREATE', 'discussions', NULL, NULL, '{\"courseId\":1,\"title\":\"API Dog Test Discussion\",\"description\":\"Testing from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions', '2026-03-17 00:57:09'),
(1041, 59, 'UPDATE', 'discussions', 3, NULL, '{\"title\":\"Updated Discussion Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PUT /api/discussions/3', '2026-03-17 00:57:10'),
(1042, 59, 'CREATE', 'discussions', 3, NULL, '{\"messageText\":\"Test reply from API Dog.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE discussions via POST /api/discussions/3/reply', '2026-03-17 00:57:10'),
(1043, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isPinned\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/pin', '2026-03-17 00:57:10'),
(1044, 59, 'UPDATE', 'discussions', 3, NULL, '{\"isLocked\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE discussions via PATCH /api/discussions/3/lock', '2026-03-17 00:57:10'),
(1045, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"API Dog Test Post\",\"content\":\"Testing from API Dog.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/communities/1/posts', '2026-03-17 00:57:10'),
(1046, 59, 'CREATE', 'community', NULL, NULL, '{\"title\":\"Global Post from API Dog\",\"content\":\"Test global post.\",\"communityId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/global/posts', '2026-03-17 00:57:10'),
(1047, 59, 'CREATE', 'community', 3, NULL, '{\"commentText\":\"API Dog test comment\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/comment', '2026-03-17 00:57:11'),
(1048, 59, 'CREATE', 'community', 3, NULL, '{\"reactionType\":\"like\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE community via POST /api/community/posts/3/react', '2026-03-17 00:57:11'),
(1049, 59, 'CREATE', 'files', NULL, NULL, '{\"folderName\":\"API Dog Test Folder\",\"parentFolderId\":1}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE files via POST /api/files/folders', '2026-03-17 00:57:13'),
(1050, 59, 'UPDATE', 'files', NULL, NULL, '{\"folderName\":\"Updated Test Folder\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE files via PUT /api/files/folders/33', '2026-03-17 00:57:13'),
(1051, 59, 'DELETE', 'files', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE files via DELETE /api/files/folders/33', '2026-03-17 00:57:13'),
(1052, 59, 'CREATE', 'labs', NULL, NULL, '{\"title\":\"API Dog Test Lab\",\"courseId\":1,\"description\":\"Test lab\",\"dueDate\":\"2026-06-15T23:59:00Z\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE labs via POST /api/labs', '2026-03-17 00:57:14'),
(1053, 59, 'UPDATE', 'labs', 3, NULL, '{\"title\":\"Updated Lab Title\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE labs via PUT /api/labs/3', '2026-03-17 00:57:14'),
(1054, 58, 'CREATE', 'rubrics', NULL, NULL, '{\"rubricName\":\"API Dog Test Rubric\",\"courseId\":1,\"totalPoints\":100}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE rubrics via POST /api/rubrics', '2026-03-17 00:57:15'),
(1055, 59, 'CREATE', 'attendance', NULL, NULL, '{\"sectionId\":1,\"sessionDate\":\"2026-03-15\",\"sessionType\":\"lecture\",\"startTime\":\"09:00:00\",\"endTime\":\"10:30:00\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE attendance via POST /attendance/sessions', '2026-03-17 00:57:16'),
(1056, 57, 'UPDATE', 'notifications', NULL, NULL, '{\"emailEnabled\":true,\"pushEnabled\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PUT /api/notifications/preferences', '2026-03-17 00:57:16'),
(1057, 57, 'UPDATE', 'notifications', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE notifications via PATCH /api/notifications/read-all', '2026-03-17 00:57:16'),
(1058, 59, 'CREATE', 'notifications', NULL, NULL, '{\"userIds\":[57],\"notificationType\":\"system\",\"title\":\"Test from API Dog\",\"body\":\"This is a test notification.\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE notifications via POST /api/notifications/send', '2026-03-17 00:57:17'),
(1059, 57, 'CREATE', 'messages', NULL, NULL, '{\"participantIds\":[59],\"type\":\"direct\",\"text\":\"Hello from API Dog test!\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE messages via POST /api/messages/conversations', '2026-03-17 00:57:17'),
(1060, 59, 'CREATE', 'calendar', NULL, NULL, '{\"title\":\"API Dog Test Event\",\"description\":\"Test\",\"startTime\":\"2026-04-01T10:00:00Z\",\"endTime\":\"2026-04-01T11:00:00Z\",\"eventType\":\"meeting\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE calendar via POST /api/calendar/events', '2026-03-17 00:57:18'),
(1061, 59, 'DELETE', 'calendar', 24, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE calendar via DELETE /api/calendar/events/24', '2026-03-17 00:57:18'),
(1062, 57, 'CREATE', 'tasks', NULL, NULL, '{\"title\":\"Study for Final Exam\",\"description\":\"Review all chapters\",\"taskType\":\"study\",\"dueDate\":\"2026-03-18T18:14:01.673Z\",\"priority\":\"high\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks', '2026-03-17 00:57:19'),
(1063, 57, 'CREATE', 'tasks', 8, NULL, '{\"notes\":\"Finished studying all chapters\",\"timeTakenMinutes\":120}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/8/complete', '2026-03-17 00:57:19'),
(1064, 57, 'CREATE', 'tasks', NULL, NULL, '{\"taskId\":9,\"reminderTime\":\"2026-03-17T18:14:01.673Z\",\"reminderType\":\"in_app\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE tasks via POST /api/tasks/reminders', '2026-03-17 00:57:19'),
(1065, 57, 'DELETE', 'search', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE search via DELETE /api/search/history', '2026-03-17 00:57:20'),
(1066, 59, 'CREATE', 'reports', NULL, NULL, '{\"templateId\":1,\"reportName\":\"Test Student Progress Report\",\"filters\":{\"courseId\":1,\"semesterId\":2},\"exportFormat\":\"pdf\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE reports via POST /api/reports/generate', '2026-03-17 00:57:21'),
(1067, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders', '2026-03-17 00:57:23'),
(1068, NULL, 'CREATE', 'google-drive', NULL, NULL, '{\"name\":\"EduVerse_Test_Folder\",\"parentId\":\"\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/folders/find-or-create', '2026-03-17 00:57:24'),
(1069, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/init', '2026-03-17 00:57:25'),
(1070, 59, 'CREATE', 'google-drive', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/courses/1/init', '2026-03-17 00:57:25'),
(1071, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/labs/3/init', '2026-03-17 00:57:25'),
(1072, 59, 'CREATE', 'google-drive', NULL, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE google-drive via POST /google-drive/admin/assignments/1/init', '2026-03-17 00:57:25'),
(1073, 61, 'CREATE', 'security', NULL, NULL, '{\"format\":\"json\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/logs/export', '2026-03-17 00:57:26'),
(1074, 61, 'DELETE', 'security', 10, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/sessions/user/10', '2026-03-17 00:57:26'),
(1075, 61, 'CREATE', 'security', NULL, NULL, '{\"ipAddress\":\"192.168.1.50\",\"reason\":\"Repeated failed logins\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE security via POST /api/security/block-ip', '2026-03-17 00:57:26'),
(1076, 61, 'DELETE', 'security', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE security via DELETE /api/security/blocked-ips/1', '2026-03-17 00:57:26'),
(1077, 61, 'CREATE', 'audit', NULL, NULL, '{\"format\":\"csv\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE audit via POST /api/audit/logs/export', '2026-03-17 00:57:27'),
(1078, 61, 'UPDATE', 'settings', NULL, NULL, '{\"settings\":{\"platform_name\":\"EduVerse updated\"}}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings', '2026-03-17 00:57:27'),
(1079, 61, 'UPDATE', 'settings', NULL, NULL, '{\"value\":\"EduVerse Pro\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/platform_name', '2026-03-17 00:57:27'),
(1080, 61, 'UPDATE', 'settings', NULL, NULL, '{\"primaryColor\":\"#ff0000\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/branding/1', '2026-03-17 00:57:27'),
(1081, 61, 'UPDATE', 'settings', 1, NULL, '{\"maxRequests\":1000,\"windowSeconds\":60}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE settings via PUT /api/settings/rate-limits/1', '2026-03-17 00:57:28'),
(1082, 61, 'CREATE', 'integrations', NULL, NULL, '{\"integrationName\":\"Canvas LMS\",\"integrationType\":\"lms\",\"campusId\":1,\"apiEndpoint\":\"https://canvas.example.com\",\"apiKey\":\"s3cr3t\",\"apiSecret\":\"s3cr3t2\",\"configuration\":\"{}\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE integrations via POST /api/integrations', '2026-03-17 00:57:28'),
(1083, 61, 'CREATE', 'alerts', NULL, NULL, '{\"name\":\"High CPU Alert\",\"conditionType\":\"cpu_usage\",\"threshold\":90,\"description\":\"Alert when CPU exceeds 90%\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE alerts via POST /api/alerts', '2026-03-17 00:57:30'),
(1084, 61, 'CREATE', 'backups', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE backups via POST /api/backups', '2026-03-17 00:57:32'),
(1085, 61, 'CREATE', 'database', NULL, NULL, '{}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE database via POST /api/database/optimize', '2026-03-17 00:57:32'),
(1086, 57, 'CREATE', 'study-groups', NULL, NULL, '{\"courseId\":1,\"groupName\":\"Math Wizards\",\"description\":\"A group for hardcore math studying\",\"maxMembers\":10,\"isPublic\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE study-groups via POST /api/study-groups', '2026-03-17 00:57:33'),
(1087, 58, 'CREATE', 'office-hours', NULL, NULL, '{\"dayOfWeek\":\"monday\",\"startTime\":\"10:00:00\",\"endTime\":\"12:00:00\",\"location\":\"Room 303\",\"mode\":\"in_person\",\"maxAppointments\":5}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE office-hours via POST /api/office-hours/slots', '2026-03-17 00:57:34'),
(1088, 58, 'UPDATE', 'office-hours', 1, NULL, '{\"status\":\"confirmed\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE office-hours via PATCH /api/office-hours/appointments/1', '2026-03-17 00:57:35'),
(1089, 57, 'DELETE', 'office-hours', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE office-hours via DELETE /api/office-hours/appointments/1', '2026-03-17 00:57:35'),
(1090, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-17 00:57:35'),
(1091, 66, 'CREATE', 'study-groups', NULL, NULL, '{\"courseId\":1,\"groupName\":\"Data Structures Study Group\",\"description\":\"Weekly study sessions for DS course\",\"maxMembers\":10,\"isPublic\":true,\"meetingSchedule\":\"Every Monday 5-7 PM\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE study-groups via POST /api/study-groups', '2026-03-17 01:02:13'),
(1092, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_student@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:02:54'),
(1093, 63, 'CREATE', 'study-groups', 14, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE study-groups via POST /api/study-groups/14/join', '2026-03-17 01:03:05'),
(1094, 63, 'DELETE', 'study-groups', 14, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'DELETE study-groups via DELETE /api/study-groups/14/leave', '2026-03-17 01:03:27'),
(1095, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"amir_student@example.com\",\"password\":\"Pass@123\",\"rememberMe\":false}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:09:56'),
(1096, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:11:57'),
(1097, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:11:57'),
(1098, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:11:57'),
(1099, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:11:58'),
(1100, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:11:58'),
(1101, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:13:45'),
(1102, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"instructor.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:13:45'),
(1103, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"student.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:13:45'),
(1104, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"ta.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:13:45'),
(1105, NULL, 'CREATE', 'auth', NULL, NULL, '{\"email\":\"it_admin.tarek@example.com\",\"password\":\"SecureP@ss123\",\"rememberMe\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE auth via POST /api/auth/login', '2026-03-17 01:13:45'),
(1106, 57, 'CREATE', 'study-groups', NULL, NULL, '{\"courseId\":1,\"groupName\":\"Math Wizards\",\"description\":\"A group for hardcore math studying\",\"maxMembers\":10,\"isPublic\":true}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE study-groups via POST /api/study-groups', '2026-03-17 01:13:46'),
(1107, 58, 'CREATE', 'office-hours', NULL, NULL, '{\"dayOfWeek\":\"monday\",\"startTime\":\"10:00:00\",\"endTime\":\"12:00:00\",\"location\":\"Room 303\",\"mode\":\"in_person\",\"maxAppointments\":5}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE office-hours via POST /api/office-hours/slots', '2026-03-17 01:13:47'),
(1108, 58, 'UPDATE', 'office-hours', 1, NULL, '{\"status\":\"confirmed\"}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'UPDATE office-hours via PATCH /api/office-hours/appointments/1', '2026-03-17 01:13:47');
INSERT INTO `audit_logs` (`log_id`, `user_id`, `action_type`, `entity_type`, `entity_id`, `old_values`, `new_values`, `ip_address`, `user_agent`, `description`, `created_at`) VALUES
(1109, 57, 'DELETE', 'office-hours', 1, NULL, NULL, '127.0.0.1', 'PostmanRuntime/7.52.0', 'DELETE office-hours via DELETE /api/office-hours/appointments/1', '2026-03-17 01:13:47'),
(1110, 58, 'CREATE', 'peer-reviews', NULL, NULL, '{\"assignmentId\":1,\"reviewersPerSubmission\":2}', '127.0.0.1', 'PostmanRuntime/7.52.0', 'CREATE peer-reviews via POST /api/peer-reviews/assign', '2026-03-17 01:13:48');

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

--
-- Table structure for table `backup_records`
--

DROP TABLE IF EXISTS `backup_records`;
CREATE TABLE IF NOT EXISTS `backup_records` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_size_bytes` bigint UNSIGNED NOT NULL DEFAULT '0',
  `type` enum('manual','scheduled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'manual',
  `status` enum('pending','in_progress','completed','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `created_by` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `completed_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `backup_records_ibfk_created_by` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `backup_records`
--

INSERT INTO `backup_records` (`id`, `file_name`, `file_size_bytes`, `type`, `status`, `created_by`, `created_at`, `completed_at`) VALUES
(1, 'backup_2026-03-16T22-04-58-526Z.sql', 687684, 'manual', 'completed', NULL, '2026-03-16 22:04:58', '2026-03-16 22:05:00'),
(3, 'backup_2026-03-16T22-34-10-919Z.sql', 710693, 'manual', 'completed', NULL, '2026-03-16 22:34:10', '2026-03-16 22:34:13'),
(4, 'backup_2026-03-16T22-35-35-446Z.sql', 732426, 'manual', 'completed', NULL, '2026-03-16 22:35:35', '2026-03-16 22:35:37'),
(5, 'backup_2026-03-16T23-59-25-990Z.sql', 788794, 'manual', 'completed', NULL, '2026-03-16 23:59:25', '2026-03-16 23:59:28'),
(6, 'backup_2026-03-17T00-02-05-528Z.sql', 810589, 'manual', 'completed', NULL, '2026-03-17 00:02:05', '2026-03-17 00:02:07'),
(7, 'backup_2026-03-17T00-22-06-975Z.sql', 832164, 'manual', 'completed', NULL, '2026-03-17 00:22:06', '2026-03-17 00:22:09'),
(8, 'backup_2026-03-17T00-34-59-868Z.sql', 854680, 'manual', 'completed', NULL, '2026-03-17 00:34:59', '2026-03-17 00:35:02'),
(9, 'backup_2026-03-17T00-50-44-477Z.sql', 876981, 'manual', 'completed', NULL, '2026-03-17 00:50:44', '2026-03-17 00:50:46'),
(10, 'backup_2026-03-17T00-57-30-785Z.sql', 898522, 'manual', 'completed', NULL, '2026-03-17 00:57:30', '2026-03-17 00:57:32');

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

--
-- Table structure for table `badges`
--

DROP TABLE IF EXISTS `badges`;
CREATE TABLE IF NOT EXISTS `badges` (
  `badge_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `badge_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `badge_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `badge_icon_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `badge_category` enum('achievement','milestone','special','course') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'achievement',
  `rarity` enum('common','rare','epic','legendary') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'common',
  `points_reward` int DEFAULT '0',
  `criteria` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`badge_id`),
  UNIQUE KEY `badge_name` (`badge_name`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `badges`
--

INSERT INTO `badges` (`badge_id`, `badge_name`, `badge_description`, `badge_icon_url`, `badge_category`, `rarity`, `points_reward`, `criteria`, `is_active`, `created_at`) VALUES
(1, 'First Steps', 'Complete your first assignment', NULL, 'achievement', 'common', 10, NULL, 1, '2025-11-20 13:43:00'),
(2, 'Quiz Master', 'Score 100% on a quiz', NULL, 'achievement', 'rare', 50, NULL, 1, '2025-11-20 13:43:00'),
(3, 'Perfect Attendance', 'Attend all classes in a week', NULL, 'milestone', 'rare', 25, NULL, 1, '2025-11-20 13:43:00'),
(4, 'Early Bird', 'Submit 5 assignments early', NULL, 'achievement', 'epic', 100, NULL, 1, '2025-11-20 13:43:00'),
(5, 'Helpful Peer', 'Complete 10 peer reviews', NULL, 'achievement', 'rare', 50, NULL, 1, '2025-11-20 13:43:00'),
(6, 'Level 5', 'Reach level 5', NULL, 'milestone', 'epic', 75, NULL, 1, '2025-11-20 13:43:00'),
(7, 'Overachiever', 'Score above 95% average', NULL, 'achievement', 'legendary', 200, NULL, 1, '2025-11-20 13:43:00'),
(8, 'Consistent Learner', 'Maintain 30-day streak', NULL, 'milestone', 'epic', 150, NULL, 1, '2025-11-20 13:43:00');

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

--
-- Table structure for table `blocked_ips`
--

DROP TABLE IF EXISTS `blocked_ips`;
CREATE TABLE IF NOT EXISTS `blocked_ips` (
  `ip_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `blocked_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `expires_at` timestamp NULL DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`ip_id`),
  UNIQUE KEY `idx_ip_address` (`ip_address`),
  KEY `idx_is_active` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blocked_ips`
--

INSERT INTO `blocked_ips` (`ip_id`, `ip_address`, `reason`, `blocked_at`, `expires_at`, `is_active`) VALUES
(1, '192.168.1.50', 'Repeated failed logins', '2026-03-16 20:59:21', NULL, 0);

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

--
-- Table structure for table `branding_settings`
--

DROP TABLE IF EXISTS `branding_settings`;
CREATE TABLE IF NOT EXISTS `branding_settings` (
  `branding_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `campus_id` bigint UNSIGNED NOT NULL,
  `logo_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `favicon_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `primary_color` varchar(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '#007bff',
  `secondary_color` varchar(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '#6c757d',
  `custom_css` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `email_header_html` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `email_footer_html` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `updated_by` bigint UNSIGNED DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`branding_id`),
  UNIQUE KEY `campus_id` (`campus_id`),
  KEY `branding_settings_ibfk_updated_by` (`updated_by`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `branding_settings`
--

INSERT INTO `branding_settings` (`branding_id`, `campus_id`, `logo_url`, `favicon_url`, `primary_color`, `secondary_color`, `custom_css`, `email_header_html`, `email_footer_html`, `updated_by`, `updated_at`) VALUES
(1, 1, '/assets/logos/main_campus_logo.png', '/assets/favicons/main_campus.ico', '#ff0000', '#6c757d', NULL, NULL, NULL, 61, '2026-03-16 22:35:32'),
(2, 2, '/assets/logos/downtown_campus_logo.png', '/assets/favicons/downtown_campus.ico', '#28a745', '#6c757d', NULL, NULL, NULL, NULL, '2025-11-20 13:43:00'),
(3, 3, '/assets/logos/online_campus_logo.png', '/assets/favicons/online_campus.ico', '#17a2b8', '#6c757d', NULL, NULL, NULL, NULL, '2025-11-20 13:43:00');

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

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

DROP TABLE IF EXISTS `calendar_events`;
CREATE TABLE IF NOT EXISTS `calendar_events` (
  `event_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED DEFAULT NULL,
  `event_type` enum('lecture','lab','exam','assignment','quiz','meeting','custom') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `color` varchar(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `schedule_id` bigint UNSIGNED DEFAULT NULL,
  `exam_id` bigint UNSIGNED DEFAULT NULL,
  `is_recurring` tinyint(1) DEFAULT '0',
  `recurrence_pattern` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reminder_minutes` int DEFAULT '30',
  `status` enum('scheduled','completed','cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'scheduled',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`event_id`),
  KEY `schedule_id` (`schedule_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_start` (`start_time`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `calendar_events` (`event_id`, `user_id`, `course_id`, `event_type`, `title`, `description`, `location`, `color`, `start_time`, `end_time`, `schedule_id`, `exam_id`, `is_recurring`, `recurrence_pattern`, `reminder_minutes`, `status`, `created_at`, `updated_at`) VALUES
(8, 59, NULL, 'meeting', 'API Dog Test Event', 'Test', NULL, NULL, '2026-04-01 10:00:00', '2026-04-01 11:00:00', NULL, NULL, 0, NULL, 30, 'scheduled', '2026-03-14 15:17:53', '2026-03-14 15:17:53');

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

--
-- Table structure for table `calendar_integrations`
--

DROP TABLE IF EXISTS `calendar_integrations`;
CREATE TABLE IF NOT EXISTS `calendar_integrations` (
  `integration_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `calendar_type` enum('google','outlook','ical') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `access_token_encrypted` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `refresh_token_encrypted` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_sync` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `sync_status` enum('active','error','disabled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`integration_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`sync_status`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `calendar_integrations`
--

INSERT INTO `calendar_integrations` (`integration_id`, `user_id`, `calendar_type`, `access_token_encrypted`, `refresh_token_encrypted`, `last_sync`, `sync_status`, `created_at`, `updated_at`) VALUES
(1, 7, 'google', NULL, NULL, '2025-02-15 04:00:00', 'active', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(2, 8, 'outlook', NULL, NULL, '2025-02-15 04:15:00', 'active', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 9, 'google', NULL, NULL, '2025-02-14 16:30:00', 'error', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 10, 'ical', NULL, NULL, '2025-02-15 04:30:00', 'active', '2025-11-20 13:43:00', '2025-11-20 13:43:00');

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

--
-- Table structure for table `campuses`
--

DROP TABLE IF EXISTS `campuses`;
CREATE TABLE IF NOT EXISTS `campuses` (
  `campus_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `campus_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `campus_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `timezone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'UTC',
  `status` enum('active','inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`campus_id`),
  UNIQUE KEY `campus_code` (`campus_code`),
  KEY `idx_code` (`campus_code`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `campuses`
--

INSERT INTO `campuses` (`campus_id`, `campus_name`, `campus_code`, `address`, `city`, `country`, `phone`, `email`, `timezone`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Updated Campus Name', 'MC001', '123 University Ave', 'New York', 'USA', '+1-555-0100', 'info@maincampus.edu', 'America/New_York', 'active', '2025-11-20 13:42:59', '2026-03-02 23:28:34'),
(2, 'Downtown Campus', 'DC002', '456 Downtown St', 'Los Angeles', 'USA', '+1-555-0200', 'info@downtown.edu', 'America/Los_Angeles', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(3, 'Online Campus', 'OC003', '789 Virtual Plaza', 'Chicago', 'USA', '+1-555-0300', 'info@online.edu', 'America/Chicago', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(4, 'Main Campus Updated', 'MAIN2', '456 University Ave', 'Boston', 'USA', '+1-555-0456', 'main2@university.edu', 'America/Boston', 'inactive', '2025-11-26 18:16:28', '2025-11-26 18:22:21'),
(14, 'Test Campus Z', 'TCZ', '123 St', 'NYC', 'US', '555-1234', NULL, 'UTC', 'active', '2026-03-02 13:29:51', '2026-03-02 13:29:51'),
(15, 'AutoTest', 'AT1', NULL, NULL, NULL, NULL, NULL, 'UTC', 'active', '2026-03-02 13:49:12', '2026-03-02 13:49:12'),
(16, 'Test Campus', 'TC01', '123 Test St', 'Cairo', 'Egypt', '+20 123 456 7890', 'campus@test.com', 'Africa/Cairo', 'active', '2026-03-02 23:28:34', '2026-03-02 23:28:34'),
(17, 'API Dog Test Campus', 'APIDOG01', '123 Test St', 'Cairo', 'Egypt', NULL, NULL, 'UTC', 'active', '2026-03-11 17:37:43', '2026-03-11 17:37:43');

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

--
-- Table structure for table `certificates`
--

DROP TABLE IF EXISTS `certificates`;
CREATE TABLE IF NOT EXISTS `certificates` (
  `certificate_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED NOT NULL,
  `certificate_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `certificate_type` enum('completion','excellence','participation') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `issue_date` date DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `file_id` bigint UNSIGNED DEFAULT NULL,
  `verification_hash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_verified` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`certificate_id`),
  UNIQUE KEY `certificate_number` (`certificate_number`),
  KEY `file_id` (`file_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_cert_number` (`certificate_number`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `chatbot_conversations`
--

DROP TABLE IF EXISTS `chatbot_conversations`;
CREATE TABLE IF NOT EXISTS `chatbot_conversations` (
  `conversation_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED DEFAULT NULL,
  `conversation_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `context_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `status` enum('active','archived','deleted') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `started_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_message_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`conversation_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chatbot_conversations`
--

INSERT INTO `chatbot_conversations` (`conversation_id`, `user_id`, `course_id`, `conversation_title`, `context_data`, `status`, `started_at`, `last_message_at`) VALUES
(1, 7, NULL, 'Help with Assignment 1', NULL, 'active', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(2, 8, NULL, 'Python Syntax Questions', NULL, 'active', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 9, 2, 'Data Structures Explanation', NULL, 'archived', '2025-11-20 13:43:00', '2025-11-20 13:43:00');

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

--
-- Table structure for table `chatbot_messages`
--

DROP TABLE IF EXISTS `chatbot_messages`;
CREATE TABLE IF NOT EXISTS `chatbot_messages` (
  `message_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `conversation_id` bigint UNSIGNED NOT NULL,
  `sender_type` enum('user','bot') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `message_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `message_metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `intent` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `confidence_score` decimal(3,2) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`message_id`),
  KEY `idx_conversation` (`conversation_id`),
  KEY `idx_sender` (`sender_type`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chatbot_messages`
--

INSERT INTO `chatbot_messages` (`message_id`, `conversation_id`, `sender_type`, `message_text`, `message_metadata`, `intent`, `confidence_score`, `created_at`) VALUES
(1, 1, 'user', 'How do I start Assignment 1?', NULL, 'help_request', 0.95, '2025-11-20 13:43:00'),
(2, 1, 'bot', 'To start Assignment 1, first review the assignment instructions in the course materials. You need to create a Python program that prints \"Hello World\". Would you like help with setting up your Python environment?', NULL, 'help_response', NULL, '2025-11-20 13:43:00'),
(3, 1, 'user', 'Yes, how do I install Python?', NULL, 'help_request', 0.92, '2025-11-20 13:43:00'),
(4, 1, 'bot', 'Here are the steps to install Python: 1) Visit python.org, 2) Download Python 3.11 or later, 3) Run the installer, 4) Check \"Add Python to PATH\", 5) Verify installation by opening terminal and typing \"python --version\".', NULL, 'help_response', NULL, '2025-11-20 13:43:00'),
(5, 2, 'user', 'What is the difference between a list and a tuple?', NULL, 'concept_question', 0.89, '2025-11-20 13:43:00'),
(6, 2, 'bot', 'Great question! Lists are mutable (can be modified) and use square brackets [], while tuples are immutable (cannot be modified) and use parentheses (). Lists: [1,2,3], Tuples: (1,2,3)', NULL, 'explanation', NULL, '2025-11-20 13:43:00');

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

--
-- Table structure for table `chat_messages`
--

DROP TABLE IF EXISTS `chat_messages`;
CREATE TABLE IF NOT EXISTS `chat_messages` (
  `message_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `thread_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `message_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_message_id` bigint UNSIGNED DEFAULT NULL,
  `is_answer` tinyint(1) DEFAULT '0',
  `is_endorsed` tinyint(1) DEFAULT '0',
  `endorsed_by` bigint UNSIGNED DEFAULT NULL,
  `upvote_count` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`message_id`),
  KEY `parent_message_id` (`parent_message_id`),
  KEY `endorsed_by` (`endorsed_by`),
  KEY `idx_thread` (`thread_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chat_messages`
--

INSERT INTO `chat_messages` (`message_id`, `thread_id`, `user_id`, `message_text`, `parent_message_id`, `is_answer`, `is_endorsed`, `endorsed_by`, `upvote_count`, `created_at`, `updated_at`) VALUES
(6, 3, 13, 'Here is a great YouTube playlist for data structures: [link]', NULL, 0, 0, NULL, 7, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(9, 5, 58, 'I have uploaded the lecture slides to the course files. Check Chapter 5 section for detailed notes.', NULL, 0, 0, NULL, 0, '2026-03-03 18:24:42', '2026-03-03 18:24:42'),
(10, 5, 57, 'Thank you professor! I found the slides very helpful.', 9, 0, 0, NULL, 0, '2026-03-03 18:24:43', '2026-03-03 18:24:43'),
(11, 6, 58, 'Great initiative! Focus on the key theorems from Chapter 7 as they carry the most weight.', NULL, 1, 1, 58, 0, '2026-03-03 18:26:57', '2026-03-05 19:16:31'),
(12, 6, 57, 'Thanks professor! Will definitely prioritize Chapter 7.', 11, 0, 0, NULL, 0, '2026-03-03 18:26:58', '2026-03-03 18:26:58'),
(13, 6, 58, 'I recommend using an adjacency list for sparse graphs and a matrix for dense ones. BFS is optimal for shortest path.', NULL, 0, 0, NULL, 0, '2026-03-03 18:34:12', '2026-03-03 18:34:12'),
(14, 6, 57, 'Would a priority queue help with Dijkstras implementation?', 11, 0, 0, NULL, 0, '2026-03-03 18:34:12', '2026-03-03 18:34:12'),
(15, 6, 60, 'OH', NULL, 0, 0, NULL, 0, '2026-03-10 17:28:42', '2026-03-10 17:28:42'),
(16, 3, 59, 'Test reply from API Dog.', NULL, 0, 0, NULL, 0, '2026-03-14 15:17:46', '2026-03-14 15:17:46'),
(17, 3, 59, 'Test reply from API Dog.', NULL, 0, 0, NULL, 0, '2026-03-14 15:40:43', '2026-03-14 15:40:43'),
(18, 3, 59, 'Test reply from API Dog.', NULL, 0, 0, NULL, 0, '2026-03-16 20:19:03', '2026-03-16 20:19:03'),
(19, 3, 59, 'Test reply from API Dog.', NULL, 0, 0, NULL, 0, '2026-03-16 20:32:50', '2026-03-16 20:32:50'),
(20, 3, 59, 'Test reply from API Dog.', NULL, 0, 0, NULL, 0, '2026-03-16 20:53:52', '2026-03-16 20:53:52'),
(21, 3, 59, 'Test reply from API Dog.', NULL, 0, 0, NULL, 0, '2026-03-16 22:35:16', '2026-03-16 22:35:16'),
(22, 3, 59, 'Test reply from API Dog.', NULL, 0, 0, NULL, 0, '2026-03-17 00:01:45', '2026-03-17 00:01:45'),
(23, 3, 59, 'Test reply from API Dog.', NULL, 0, 0, NULL, 0, '2026-03-17 00:34:38', '2026-03-17 00:34:38'),
(24, 3, 59, 'Test reply from API Dog.', NULL, 0, 0, NULL, 0, '2026-03-17 00:57:10', '2026-03-17 00:57:10');

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

--
-- Table structure for table `collaborative_grading`
--

DROP TABLE IF EXISTS `collaborative_grading`;
CREATE TABLE IF NOT EXISTS `collaborative_grading` (
  `collab_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `assignment_id` bigint UNSIGNED NOT NULL,
  `submission_id` bigint UNSIGNED NOT NULL,
  `grader_1_id` bigint UNSIGNED NOT NULL,
  `grader_2_id` bigint UNSIGNED DEFAULT NULL,
  `grader_1_score` decimal(5,2) DEFAULT NULL,
  `grader_2_score` decimal(5,2) DEFAULT NULL,
  `final_score` decimal(5,2) DEFAULT NULL,
  `resolution_method` enum('average','higher','manual','grader_1') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'average',
  `status` enum('pending','in_progress','completed','disputed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `completed_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`collab_id`),
  KEY `submission_id` (`submission_id`),
  KEY `grader_1_id` (`grader_1_id`),
  KEY `grader_2_id` (`grader_2_id`),
  KEY `idx_assignment` (`assignment_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `communities`
--

DROP TABLE IF EXISTS `communities`;
CREATE TABLE IF NOT EXISTS `communities` (
  `community_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `community_type` enum('global','department') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `department_id` bigint UNSIGNED DEFAULT NULL,
  `cover_image_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `created_by` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`community_id`),
  KEY `idx_community_type` (`community_type`),
  KEY `idx_department` (`department_id`),
  KEY `communities_creator_fk` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `communities`
--

INSERT INTO `communities` (`community_id`, `name`, `description`, `community_type`, `department_id`, `cover_image_url`, `is_active`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'Global Community', 'Platform-wide community for all users', 'global', NULL, NULL, 1, 1, '2026-03-10 18:48:58', '2026-03-10 18:48:58'),
(2, 'Math Cohort 2026', 'Updated: Math department community for the 2026 cohort students', 'department', 2, NULL, 1, 59, '2026-03-10 19:04:02', '2026-03-10 19:05:33'),
(3, 'Mechanical Engineering General', 'ME community', 'department', 5, NULL, 1, 59, '2026-03-10 19:04:27', '2026-03-10 19:04:27');

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

--
-- Table structure for table `community_posts`
--

DROP TABLE IF EXISTS `community_posts`;
CREATE TABLE IF NOT EXISTS `community_posts` (
  `post_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED DEFAULT NULL,
  `community_id` bigint UNSIGNED DEFAULT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `post_type` enum('discussion','question','announcement','resource') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'discussion',
  `is_pinned` tinyint(1) DEFAULT '0',
  `is_locked` tinyint(1) DEFAULT '0',
  `view_count` int DEFAULT '0',
  `upvote_count` int DEFAULT '0',
  `reply_count` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`post_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_community` (`community_id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `community_posts`
--

INSERT INTO `community_posts` (`post_id`, `course_id`, `community_id`, `user_id`, `title`, `content`, `post_type`, `is_pinned`, `is_locked`, `view_count`, `upvote_count`, `reply_count`, `created_at`, `updated_at`) VALUES
(3, NULL, 1, 12, 'Study Group for Midterm', 'Anyone interested in forming a study group for the upcoming midterm? We can meet on weekends.', 'discussion', 0, 0, 62, 10, 23, '2025-11-20 13:43:00', '2026-03-17 00:57:11'),
(7, NULL, 1, 58, 'Post 1 Trying to test the posts', 'Post 1 Content', 'announcement', 0, 0, 8, 4, 2, '2026-03-10 17:25:16', '2026-03-10 18:49:07'),
(8, NULL, 1, 57, 'First Tagged Post', 'Testing tags system', 'discussion', 0, 0, 0, 0, 0, '2026-03-10 19:04:01', '2026-03-10 19:04:01'),
(9, NULL, 2, 57, 'Math Study Group', 'Anyone want to study linear algebra?', 'discussion', 0, 0, 0, 0, 0, '2026-03-10 19:04:33', '2026-03-10 19:04:33'),
(10, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-11 17:37:50', '2026-03-11 17:37:50'),
(11, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-11 17:37:50', '2026-03-11 17:37:50'),
(12, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-14 15:17:46', '2026-03-14 15:17:46'),
(13, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-14 15:17:47', '2026-03-14 15:17:47'),
(14, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-14 15:36:03', '2026-03-14 15:36:03'),
(15, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-14 15:36:04', '2026-03-14 15:36:04'),
(16, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-14 15:40:43', '2026-03-14 15:40:43'),
(17, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-14 15:40:44', '2026-03-14 15:40:44'),
(18, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-14 16:06:06', '2026-03-14 16:06:06'),
(19, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-14 16:06:06', '2026-03-14 16:06:06'),
(20, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:19:04', '2026-03-16 20:19:04'),
(21, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:19:04', '2026-03-16 20:19:04'),
(22, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:20:10', '2026-03-16 20:20:10'),
(23, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:20:10', '2026-03-16 20:20:10'),
(24, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:32:51', '2026-03-16 20:32:51'),
(25, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:32:51', '2026-03-16 20:32:51'),
(26, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:45:17', '2026-03-16 20:45:17'),
(27, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:45:17', '2026-03-16 20:45:17'),
(28, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:53:53', '2026-03-16 20:53:53'),
(29, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 20:53:53', '2026-03-16 20:53:53'),
(30, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 22:31:29', '2026-03-16 22:31:29'),
(31, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 22:31:29', '2026-03-16 22:31:29'),
(32, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 22:35:17', '2026-03-16 22:35:17'),
(33, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 22:35:17', '2026-03-16 22:35:17'),
(34, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 23:59:06', '2026-03-16 23:59:06'),
(35, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-16 23:59:06', '2026-03-16 23:59:06'),
(36, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:01:46', '2026-03-17 00:01:46'),
(37, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:01:46', '2026-03-17 00:01:46'),
(38, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:21:46', '2026-03-17 00:21:46'),
(39, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:21:46', '2026-03-17 00:21:46'),
(40, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:34:39', '2026-03-17 00:34:39'),
(41, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:34:39', '2026-03-17 00:34:39'),
(42, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:50:25', '2026-03-17 00:50:25'),
(43, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:50:25', '2026-03-17 00:50:25'),
(44, NULL, 1, 59, 'API Dog Test Post', 'Testing from API Dog.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:57:10', '2026-03-17 00:57:10'),
(45, NULL, 1, 59, 'Global Post from API Dog', 'Test global post.', 'discussion', 0, 0, 0, 0, 0, '2026-03-17 00:57:10', '2026-03-17 00:57:10');

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

--
-- Table structure for table `community_post_comments`
--

DROP TABLE IF EXISTS `community_post_comments`;
CREATE TABLE IF NOT EXISTS `community_post_comments` (
  `comment_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `post_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `comment_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_comment_id` bigint UNSIGNED DEFAULT NULL,
  `upvote_count` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`comment_id`),
  KEY `parent_comment_id` (`parent_comment_id`),
  KEY `idx_post` (`post_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `community_post_comments`
--

INSERT INTO `community_post_comments` (`comment_id`, `post_id`, `user_id`, `comment_text`, `parent_comment_id`, `upvote_count`, `created_at`, `updated_at`) VALUES
(8, 3, 57, 'My comment', NULL, 0, '2026-03-10 17:20:31', '2026-03-10 17:20:31'),
(9, 7, 58, 'Hi guys', NULL, 0, '2026-03-10 17:25:34', '2026-03-10 17:25:34'),
(10, 7, 60, 'Done', NULL, 0, '2026-03-10 17:25:52', '2026-03-10 17:25:52'),
(11, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-11 17:37:51', '2026-03-11 17:37:51'),
(12, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-14 15:36:04', '2026-03-14 15:36:04'),
(13, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-14 15:40:44', '2026-03-14 15:40:44'),
(14, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-14 16:06:06', '2026-03-14 16:06:06'),
(15, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-16 20:19:05', '2026-03-16 20:19:05'),
(16, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-16 20:20:10', '2026-03-16 20:20:10'),
(17, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-16 20:32:52', '2026-03-16 20:32:52'),
(18, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-16 20:45:17', '2026-03-16 20:45:17'),
(19, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-16 20:53:54', '2026-03-16 20:53:54'),
(20, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-16 22:31:30', '2026-03-16 22:31:30'),
(21, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-16 22:35:17', '2026-03-16 22:35:17'),
(22, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-16 23:59:06', '2026-03-16 23:59:06'),
(23, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-17 00:01:46', '2026-03-17 00:01:46'),
(24, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-17 00:21:47', '2026-03-17 00:21:47'),
(25, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-17 00:34:40', '2026-03-17 00:34:40'),
(26, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-17 00:50:25', '2026-03-17 00:50:25'),
(27, 3, 59, 'API Dog test comment', NULL, 0, '2026-03-17 00:57:11', '2026-03-17 00:57:11');

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

--
-- Table structure for table `community_post_reactions`
--

DROP TABLE IF EXISTS `community_post_reactions`;
CREATE TABLE IF NOT EXISTS `community_post_reactions` (
  `reaction_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `post_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `reaction_type` enum('like','helpful','insightful','thanks') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'like',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`reaction_id`),
  UNIQUE KEY `unique_post_user_reaction` (`post_id`,`user_id`,`reaction_type`),
  KEY `idx_post` (`post_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `community_post_reactions`
--

INSERT INTO `community_post_reactions` (`reaction_id`, `post_id`, `user_id`, `reaction_type`, `created_at`) VALUES
(15, 3, 57, 'like', '2026-03-10 17:20:23'),
(16, 3, 57, 'helpful', '2026-03-10 17:20:24'),
(17, 7, 58, 'like', '2026-03-10 17:25:21'),
(18, 7, 58, 'insightful', '2026-03-10 17:25:23'),
(19, 7, 58, 'thanks', '2026-03-10 17:25:24'),
(20, 7, 58, 'helpful', '2026-03-10 17:25:25');

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

--
-- Table structure for table `community_post_tags`
--

DROP TABLE IF EXISTS `community_post_tags`;
CREATE TABLE IF NOT EXISTS `community_post_tags` (
  `post_id` bigint UNSIGNED NOT NULL,
  `tag_id` bigint UNSIGNED NOT NULL,
  PRIMARY KEY (`post_id`,`tag_id`),
  KEY `post_tags_tag_fk` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `community_post_tags`
--

INSERT INTO `community_post_tags` (`post_id`, `tag_id`) VALUES
(8, 1),
(8, 2),
(9, 3),
(9, 4);

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

--
-- Table structure for table `community_tags`
--

DROP TABLE IF EXISTS `community_tags`;
CREATE TABLE IF NOT EXISTS `community_tags` (
  `tag_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`tag_id`),
  UNIQUE KEY `unique_tag_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `community_tags`
--

INSERT INTO `community_tags` (`tag_id`, `name`, `created_at`) VALUES
(1, 'study-tips', '2026-03-10 19:04:00'),
(2, 'exam-prep', '2026-03-10 19:04:01'),
(3, 'math', '2026-03-10 19:04:33'),
(4, 'study-group', '2026-03-10 19:04:33'),
(5, 'apidog-test', '2026-03-11 17:20:05');

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

--
-- Table structure for table `content_translations`
--

DROP TABLE IF EXISTS `content_translations`;
CREATE TABLE IF NOT EXISTS `content_translations` (
  `translation_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `entity_type` enum('course','material','assignment','quiz','announcement','instruction') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `entity_id` bigint UNSIGNED NOT NULL,
  `field_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `language_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `translated_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `translator_type` enum('human','ai','system') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'human',
  `translator_id` bigint UNSIGNED DEFAULT NULL,
  `quality_score` decimal(3,2) DEFAULT NULL,
  `is_verified` tinyint(1) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`translation_id`),
  UNIQUE KEY `unique_entity_field_lang` (`entity_type`,`entity_id`,`field_name`,`language_code`),
  KEY `translator_id` (`translator_id`),
  KEY `idx_entity` (`entity_type`,`entity_id`),
  KEY `idx_language` (`language_code`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `content_translations`
--

INSERT INTO `content_translations` (`translation_id`, `entity_type`, `entity_id`, `field_name`, `language_code`, `translated_content`, `translator_type`, `translator_id`, `quality_score`, `is_verified`, `created_at`, `updated_at`) VALUES
(1, 'course', 1, 'course_name', 'es', 'Introducci??n a la Programaci??n', 'ai', NULL, 0.95, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(2, 'course', 1, 'course_description', 'es', 'Conceptos b??sicos de programaci??n usando Python', 'ai', NULL, 0.92, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 'assignment', 1, 'title', 'es', 'Tarea 1: Hola Mundo', 'ai', NULL, 0.98, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 'announcement', 1, 'title', 'fr', 'D??but du cours', 'human', NULL, 1.00, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(5, 'material', 1, 'title', 'ar', '???????? ????????????', 'ai', NULL, 0.88, 0, '2025-11-20 13:43:00', '2025-11-20 13:43:00');

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

--
-- Table structure for table `courses`
--

DROP TABLE IF EXISTS `courses`;
CREATE TABLE IF NOT EXISTS `courses` (
  `course_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `department_id` bigint UNSIGNED NOT NULL,
  `course_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `course_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `course_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `credits` int DEFAULT '3',
  `level` enum('freshman','sophomore','junior','senior','graduate') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `syllabus_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `instructor_id` bigint UNSIGNED DEFAULT NULL,
  `ta_ids` json DEFAULT NULL,
  `status` enum('active','inactive','archived') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`course_id`),
  UNIQUE KEY `unique_course_code` (`department_id`,`course_code`),
  KEY `idx_department` (`department_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `courses`
--

INSERT INTO `courses` (`course_id`, `department_id`, `course_name`, `course_code`, `course_description`, `credits`, `level`, `syllabus_url`, `instructor_id`, `ta_ids`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'Updated Course Name', 'CS101', 'Basic programming concepts using Python', 3, 'freshman', NULL, NULL, NULL, 'active', '2025-11-27 18:18:48', '2026-03-02 23:29:23', NULL),
(2, 1, 'Data Structures', 'CS201', 'Fundamental data structures and algorithms', 3, 'sophomore', 'https://example.com/amir.pdf', NULL, NULL, 'active', '2025-11-20 13:42:59', '2025-11-29 00:27:15', NULL),
(3, 1, 'Database Systems', 'CS301', 'Database design and SQL', 3, 'junior', NULL, NULL, NULL, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(4, 1, 'Artificial Intelligence', 'CS401', 'Artificial Intelligence (CS401)', 4, 'senior', NULL, NULL, NULL, 'active', '2025-11-20 13:42:59', '2026-03-15 15:33:32', NULL),
(5, 2, 'Calculus I', 'MATH101', 'Differential calculus', 4, 'freshman', NULL, NULL, NULL, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(6, 2, 'Linear Algebra', 'MATH201', 'Matrices and vector spaces', 3, 'sophomore', NULL, NULL, NULL, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(7, 3, 'Physics I', 'PHY101', 'Classical mechanics', 4, 'freshman', NULL, NULL, NULL, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(8, 4, 'Business Management', 'BUS101', 'Introduction to business management', 3, 'freshman', NULL, NULL, NULL, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(9, 3, 'Principles of Management', 'BUS101', 'Fundamentals of business management and organizational behavior', 3, 'freshman', '/uploads/syllabi/BUS101.pdf', NULL, NULL, 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(10, 3, 'Business Finance', 'BUS202', 'Financial analysis, investment decisions, and capital budgeting', 3, 'sophomore', '/uploads/syllabi/BUS202.pdf', NULL, NULL, 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(11, 4, 'Statistics for Data Science', 'DS101', 'Probability, hypothesis testing, statistical inference', 3, 'freshman', '/uploads/syllabi/DS101.pdf', NULL, NULL, 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(12, 1, 'Introduction to Programming', 'CS1001', 'Basic programming concepts - prerequisite course', 3, 'freshman', NULL, NULL, NULL, 'active', '2025-11-27 18:02:54', '2025-11-27 18:02:54', NULL),
(13, 5, 'English Literature I', 'AH101', 'Classic works of English literature from Renaissance to 19th century', 3, 'freshman', '/uploads/syllabi/AH101.pdf', NULL, NULL, 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(14, 5, 'Arabic Language Skills', 'AH102', 'Arabic Language Skills (AH102)', 3, 'freshman', '/uploads/syllabi/AH102.pdf', 64, NULL, 'active', '2024-09-01 08:00:00', '2026-03-15 15:33:14', NULL),
(15, 6, 'Calculus I', 'SCI101', 'Differential and integral calculus', 4, 'freshman', '/uploads/syllabi/SCI101.pdf', NULL, NULL, 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(16, 1, 'intro to digital', 'CS2024', 'Study of advanced data structures and algorithm optimization techniques', 4, 'junior', 'https://example.com/syllabus-advanced.pdf', NULL, NULL, 'inactive', '2025-11-27 18:13:14', '2025-11-27 18:14:45', '2025-11-27 18:14:45'),
(17, 1, 'Electro 4', 'EEE2026', 'Study of advanced electro 4', 2, 'junior', 'https://example.com/syllabus-advanced.pdf', NULL, NULL, 'active', '2025-11-30 15:49:58', '2025-11-30 15:52:42', '2025-11-30 15:52:42'),
(18, 3, 'Strategic Management', 'BUS401', 'Corporate strategy and competitive analysis', 3, 'senior', '/uploads/syllabi/BUS401.pdf', NULL, NULL, 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(19, 1, 'Test Course Z2', 'TCZ2', 'A test course', 3, 'freshman', NULL, NULL, NULL, 'active', '2026-03-02 13:31:15', '2026-03-02 13:31:15', NULL),
(20, 1, 'Auto Course', 'AC99', 'Test', 3, 'freshman', NULL, NULL, NULL, 'active', '2026-03-02 13:50:13', '2026-03-02 13:50:13', NULL),
(21, 1, 'Test Course', 'TC101', 'A test course for postman', 3, 'senior', NULL, NULL, NULL, 'active', '2026-03-03 18:35:43', '2026-03-03 18:35:43', NULL),
(22, 1, 'API Dog Test Course', 'TEST101', 'API Dog Test Course (TEST101)', 3, 'freshman', NULL, 58, NULL, 'active', '2026-03-11 17:37:44', '2026-03-15 15:36:57', NULL),
(23, 1, 'EDU FIRST COURSE', 'EDL2', 'Course for Fall 2025', 3, 'freshman', NULL, NULL, NULL, 'active', '2026-03-15 14:23:35', '2026-03-15 14:23:35', NULL),
(24, 1, 'FULL NEW TEST', 'NEW1', 'FULL NEW TEST (NEW1)', 3, 'freshman', NULL, NULL, NULL, 'active', '2026-03-15 15:02:50', '2026-03-15 15:02:50', NULL);

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

--
-- Table structure for table `course_analytics`
--

DROP TABLE IF EXISTS `course_analytics`;
CREATE TABLE IF NOT EXISTS `course_analytics` (
  `analytics_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `instructor_id` bigint UNSIGNED NOT NULL,
  `total_students` int DEFAULT '0',
  `active_students` int DEFAULT '0',
  `average_grade` decimal(5,2) DEFAULT NULL,
  `average_attendance` decimal(5,2) DEFAULT NULL,
  `completion_rate` decimal(5,2) DEFAULT NULL,
  `engagement_score` decimal(5,2) DEFAULT NULL,
  `calculation_date` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`analytics_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_instructor` (`instructor_id`),
  KEY `idx_date` (`calculation_date`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_analytics`
--

INSERT INTO `course_analytics` (`analytics_id`, `course_id`, `instructor_id`, `total_students`, `active_students`, `average_grade`, `average_attendance`, `completion_rate`, `engagement_score`, `calculation_date`, `created_at`) VALUES
(2, 2, 3, 12, 11, 82.75, 88.50, 72.30, 84.10, '2025-02-15', '2025-11-20 13:43:01'),
(3, 3, 3, 10, 10, 87.20, 95.00, 85.40, 91.30, '2025-02-15', '2025-11-20 13:43:01'),
(5, 1, 58, 35, 30, 78.50, 85.20, 65.00, 72.30, '2026-03-11', '2026-03-11 18:12:04'),
(6, 2, 58, 28, 25, 82.10, 90.50, 70.00, 80.15, '2026-03-11', '2026-03-11 18:12:04'),
(7, 3, 58, 22, 20, 75.30, 78.60, 55.00, 68.90, '2026-03-11', '2026-03-11 18:12:04'),
(8, 4, 58, 18, 15, 88.00, 92.30, 80.00, 85.40, '2026-03-11', '2026-03-11 18:12:04');

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

--
-- Table structure for table `course_chat_threads`
--

DROP TABLE IF EXISTS `course_chat_threads`;
CREATE TABLE IF NOT EXISTS `course_chat_threads` (
  `thread_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `created_by` bigint UNSIGNED NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` enum('open','answered','closed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'open',
  `is_pinned` tinyint(1) DEFAULT '0',
  `is_locked` tinyint(1) DEFAULT '0',
  `view_count` int DEFAULT '0',
  `reply_count` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`thread_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_creator` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_chat_threads`
--

INSERT INTO `course_chat_threads` (`thread_id`, `course_id`, `created_by`, `title`, `description`, `status`, `is_pinned`, `is_locked`, `view_count`, `reply_count`, `created_at`, `updated_at`) VALUES
(3, 2, 12, 'Updated Discussion Title', 'Share study resources and tips', 'open', 1, 1, 76, 24, '2025-11-20 13:43:00', '2026-03-17 00:57:10'),
(5, 1, 57, 'Help with Midterm Review - Chapter 5', 'Can anyone share their notes on Chapter 5? I missed the lecture and need help understanding the key concepts.', 'open', 0, 0, 2, 2, '2026-03-03 18:24:20', '2026-03-10 17:28:48'),
(6, 1, 57, 'Tips for Final Project - Data Structures & Algorithms', 'Updated: Including both data structures and algorithm choices for the graph module.', 'open', 1, 0, 6, 5, '2026-03-03 18:26:52', '2026-03-10 17:28:47'),
(8, 1, 57, 'Tips for Final Project - Data Structures', 'What data structures would you recommend for implementing the graph traversal module?', 'open', 0, 0, 0, 0, '2026-03-03 18:34:11', '2026-03-03 18:34:11'),
(10, 1, 57, 'Temporary Thread - Delete Test', 'This thread can be safely deleted for testing purposes.', 'open', 0, 0, 3, 0, '2026-03-03 18:43:55', '2026-03-03 18:44:57'),
(11, 1, 57, 'Tips for Final Project - Data Structures', 'What data structures would you recommend for implementing the graph traversal module?', 'open', 0, 0, 1, 0, '2026-03-05 19:16:30', '2026-03-10 17:28:46'),
(12, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-11 17:37:49', '2026-03-11 17:37:49'),
(13, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-14 15:17:45', '2026-03-14 15:17:45'),
(14, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-14 15:36:02', '2026-03-14 15:36:02'),
(15, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-14 15:40:43', '2026-03-14 15:40:43'),
(16, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-14 16:06:05', '2026-03-14 16:06:05'),
(17, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-16 20:19:03', '2026-03-16 20:19:03'),
(18, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-16 20:20:09', '2026-03-16 20:20:09'),
(19, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-16 20:32:50', '2026-03-16 20:32:50'),
(20, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-16 20:45:16', '2026-03-16 20:45:16'),
(21, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-16 20:53:52', '2026-03-16 20:53:52'),
(22, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-16 22:31:28', '2026-03-16 22:31:28'),
(23, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-16 22:35:16', '2026-03-16 22:35:16'),
(24, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-16 23:59:05', '2026-03-16 23:59:05'),
(25, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-17 00:01:44', '2026-03-17 00:01:44'),
(26, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-17 00:21:45', '2026-03-17 00:21:45'),
(27, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-17 00:34:38', '2026-03-17 00:34:38'),
(28, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-17 00:50:24', '2026-03-17 00:50:24'),
(29, 1, 59, 'API Dog Test Discussion', 'Testing from API Dog.', 'open', 0, 0, 0, 0, '2026-03-17 00:57:09', '2026-03-17 00:57:09');

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

--
-- Table structure for table `course_enrollments`
--

DROP TABLE IF EXISTS `course_enrollments`;
CREATE TABLE IF NOT EXISTS `course_enrollments` (
  `enrollment_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `section_id` bigint UNSIGNED NOT NULL,
  `program_id` bigint UNSIGNED DEFAULT NULL,
  `enrollment_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `enrollment_status` enum('enrolled','dropped','completed','withdrawn') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'enrolled',
  `grade` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `final_score` decimal(5,2) DEFAULT NULL,
  `dropped_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`enrollment_id`),
  UNIQUE KEY `unique_enrollment` (`user_id`,`section_id`),
  KEY `program_id` (`program_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_section` (`section_id`),
  KEY `idx_status` (`enrollment_status`),
  KEY `idx_user_status` (`user_id`,`enrollment_status`),
  KEY `idx_section_status` (`section_id`,`enrollment_status`),
  KEY `idx_composite_lookup` (`user_id`,`section_id`,`enrollment_status`)
) ENGINE=InnoDB AUTO_INCREMENT=240 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_enrollments`
--

INSERT INTO `course_enrollments` (`enrollment_id`, `user_id`, `section_id`, `program_id`, `enrollment_date`, `enrollment_status`, `grade`, `final_score`, `dropped_at`, `completed_at`, `updated_at`) VALUES
(62, 7, 1, 1, '2025-09-01 07:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(63, 8, 1, 1, '2025-09-01 07:15:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(64, 9, 1, 1, '2025-09-01 07:30:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(65, 10, 1, 1, '2025-09-01 08:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(66, 11, 1, 1, '2025-09-01 08:15:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(67, 25, 1, 1, '2025-09-01 11:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(68, 30, 1, 1, '2025-09-01 11:30:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(69, 34, 1, 1, '2025-11-12 13:00:00', 'dropped', NULL, NULL, '2025-11-30 16:39:49', NULL, '2025-11-30 16:39:48'),
(70, 12, 9, 1, '2025-09-01 07:45:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(71, 13, 9, 1, '2025-09-01 08:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(72, 14, 9, 1, '2025-09-01 08:15:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(73, 15, 9, 1, '2025-09-01 08:30:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(74, 16, 9, 1, '2025-09-01 08:45:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(75, 9, 10, 1, '2025-09-01 07:30:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(76, 10, 10, 1, '2025-09-01 08:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(77, 11, 10, 1, '2025-09-01 08:15:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(78, 12, 10, 1, '2025-09-01 07:45:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(79, 16, 10, 1, '2025-09-01 09:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(80, 25, 10, 1, '2025-09-01 11:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(81, 30, 10, 1, '2025-09-01 11:30:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(82, 13, 1, 1, '2025-09-01 08:00:00', 'dropped', NULL, NULL, '2025-09-15 13:00:00', NULL, '2025-11-30 16:28:28'),
(83, 14, 1, 1, '2025-09-01 08:15:00', 'dropped', NULL, NULL, '2025-09-20 11:00:00', NULL, '2025-11-30 16:28:28'),
(84, 15, 1, 1, '2025-09-01 08:30:00', 'withdrawn', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(85, 16, 1, 1, '2025-09-01 09:00:00', 'withdrawn', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(86, 7, 10, 1, '2025-09-01 07:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(87, 8, 10, 1, '2025-09-01 07:15:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(88, 34, 9, 1, '2025-09-01 12:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2025-11-30 16:28:28'),
(185, 21, 1, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(186, 22, 1, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(187, 23, 1, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(188, 24, 1, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(189, 26, 1, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(190, 27, 1, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(191, 28, 1, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(192, 29, 1, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(193, 31, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(194, 32, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(195, 33, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(196, 34, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(197, 35, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(198, 36, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(199, 37, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(200, 38, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(201, 39, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(202, 40, 2, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(203, 21, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(204, 23, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(205, 25, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(206, 27, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(207, 29, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(208, 32, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(209, 34, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(210, 36, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(211, 38, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(212, 40, 3, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(213, 22, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(214, 24, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(215, 26, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(216, 28, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(217, 30, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(218, 31, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(219, 33, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(220, 35, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(221, 37, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(222, 39, 4, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(223, 21, 5, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(224, 23, 5, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(225, 25, 5, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(226, 27, 5, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(227, 29, 5, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(228, 32, 5, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(229, 34, 5, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(230, 36, 5, 1, '2026-03-01 14:55:40', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-01 14:55:40'),
(231, 57, 7, NULL, '2026-03-04 14:13:13', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-04 14:13:13'),
(232, 57, 8, NULL, '2026-03-04 14:13:22', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-04 14:13:22'),
(235, 57, 1, NULL, '2025-08-31 21:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-11 16:42:26'),
(236, 57, 3, NULL, '2025-08-31 21:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-11 16:42:26'),
(237, 57, 5, NULL, '2025-08-31 21:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-11 16:42:26'),
(238, 57, 6, NULL, '2025-08-31 21:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-11 16:42:26'),
(239, 57, 26, NULL, '2025-08-31 21:00:00', 'enrolled', NULL, NULL, NULL, NULL, '2026-03-11 16:42:26');

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

--
-- Table structure for table `course_instructors`
--

DROP TABLE IF EXISTS `course_instructors`;
CREATE TABLE IF NOT EXISTS `course_instructors` (
  `assignment_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `section_id` bigint UNSIGNED NOT NULL,
  `role` enum('primary','co_instructor','guest') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'primary',
  `assigned_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`assignment_id`),
  UNIQUE KEY `unique_instructor_section` (`user_id`,`section_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_section` (`section_id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_instructors`
--

INSERT INTO `course_instructors` (`assignment_id`, `user_id`, `section_id`, `role`, `assigned_at`) VALUES
(1, 8, 1, 'primary', '2024-12-15 10:00:00'),
(2, 9, 2, 'primary', '2024-12-15 10:00:00'),
(3, 10, 3, 'primary', '2024-12-15 10:00:00'),
(4, 13, 4, 'primary', '2024-12-15 10:00:00'),
(5, 12, 5, 'primary', '2024-12-15 10:00:00'),
(7, 15, 7, 'primary', '2024-12-15 10:00:00'),
(8, 11, 8, 'primary', '2024-12-15 10:00:00'),
(9, 16, 9, 'primary', '2024-12-15 10:00:00'),
(10, 17, 10, 'primary', '2024-12-15 10:00:00'),
(11, 2, 1, 'primary', '2026-03-10 20:09:45'),
(16, 64, 1, 'co_instructor', '2026-03-10 21:26:04'),
(17, 64, 24, 'primary', '2026-03-15 15:05:30'),
(18, 3, 25, 'primary', '2026-03-15 15:33:03'),
(19, 58, 26, 'primary', '2026-03-15 15:33:14'),
(20, 1, 6, 'primary', '2026-03-15 15:33:32');

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

--
-- Table structure for table `course_materials`
--

DROP TABLE IF EXISTS `course_materials`;
CREATE TABLE IF NOT EXISTS `course_materials` (
  `material_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `file_id` bigint UNSIGNED DEFAULT NULL,
  `drive_file_id` bigint UNSIGNED DEFAULT NULL COMMENT 'FK to drive_files table for Google Drive integration',
  `material_type` enum('lecture','slide','video','reading','link','document','other') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'document',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `external_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `youtube_video_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order_index` int DEFAULT '0',
  `week_number` int DEFAULT NULL,
  `uploaded_by` bigint UNSIGNED NOT NULL,
  `is_published` tinyint(1) DEFAULT '0',
  `published_at` timestamp NULL DEFAULT NULL,
  `view_count` int DEFAULT '0',
  `download_count` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`material_id`),
  KEY `uploaded_by` (`uploaded_by`),
  KEY `idx_course` (`course_id`),
  KEY `idx_file` (`file_id`),
  KEY `idx_type` (`material_type`),
  KEY `idx_materials_week_number` (`course_id`,`week_number`),
  KEY `idx_course_materials_youtube` (`youtube_video_id`)
) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_materials`
--

INSERT INTO `course_materials` (`material_id`, `course_id`, `file_id`, `drive_file_id`, `material_type`, `title`, `description`, `external_url`, `youtube_video_id`, `order_index`, `week_number`, `uploaded_by`, `is_published`, `published_at`, `view_count`, `download_count`, `created_at`, `updated_at`) VALUES
(4, 2, 4, NULL, 'document', 'Course Syllabus', 'CS201 Spring 2025 Syllabus', NULL, NULL, 1, NULL, 3, 1, NULL, 0, 19, '2025-11-20 13:42:59', '2026-03-17 00:57:06'),
(6, 2, NULL, NULL, 'lecture', 'Week 1: Updated Lecture Title', 'Updated description', NULL, NULL, 0, 5, 59, 0, '2026-03-10 20:03:39', 1, 0, '2026-03-10 20:03:38', '2026-03-10 20:05:29'),
(7, 2, NULL, NULL, 'reading', 'Week 2: Advanced Topics', 'Testing weekNumber filter', NULL, NULL, 0, 2, 59, 1, '2026-03-10 20:04:00', 0, 0, '2026-03-10 20:03:59', '2026-03-10 20:03:59'),
(8, 2, NULL, NULL, 'slide', 'Week 3: Final Review', 'Testing weekNumber filter', NULL, NULL, 0, 3, 59, 1, '2026-03-10 20:04:02', 0, 0, '2026-03-10 20:04:02', '2026-03-10 20:04:02'),
(9, 2, NULL, NULL, 'slide', 'Bulk Material 1: Lecture Slides', 'Created via bulk upload', NULL, NULL, 0, 4, 59, 1, '2026-03-10 20:04:27', 0, 0, '2026-03-10 20:04:26', '2026-03-10 20:04:26'),
(10, 2, NULL, NULL, 'reading', 'Bulk Material 2: Reading Assignment', 'Created via bulk upload', NULL, NULL, 0, 4, 59, 1, '2026-03-10 20:04:27', 0, 0, '2026-03-10 20:04:27', '2026-03-10 20:04:27'),
(11, 2, NULL, NULL, 'document', 'Bulk Material 3: Lab Exercise', 'Created via bulk upload', NULL, NULL, 0, 4, 59, 0, NULL, 0, 0, '2026-03-10 20:04:27', '2026-03-10 20:04:27'),
(15, 1, NULL, NULL, 'lecture', 'Week 1: Introduction to Programming', 'Overview of programming concepts and course structure', NULL, NULL, 1, 1, 2, 1, '2026-03-16 20:19:00', 44, 10, '2026-03-10 20:09:45', '2026-03-17 00:57:06'),
(16, 1, NULL, NULL, 'slide', 'Week 1: Presentation Slides', 'Accompanying slides for week 1 lecture', 'https://slides.example.com/week1', NULL, 2, 1, 2, 1, '2026-03-10 20:09:45', 18, 5, '2026-03-10 20:09:45', '2026-03-10 20:09:45'),
(17, 1, NULL, NULL, 'video', 'Week 1: Video Tutorial', 'Hands-on coding demonstration', 'https://www.youtube.com/embed/dQw4w9WgXcQ', NULL, 3, 1, 2, 1, '2026-03-10 20:09:45', 45, 0, '2026-03-10 20:09:45', '2026-03-10 20:09:45'),
(18, 1, NULL, NULL, 'reading', 'Week 2: Variables and Data Types', 'Chapter 2 from textbook', 'https://textbook.example.com/chapter2', NULL, 1, 2, 2, 1, '2026-03-10 20:09:45', 12, 3, '2026-03-10 20:09:45', '2026-03-10 20:09:45'),
(19, 1, NULL, NULL, 'document', 'Week 2: Lab Exercises (DRAFT)', 'Practice exercises - not yet ready', NULL, NULL, 2, 2, 5, 0, NULL, 2, 0, '2026-03-10 20:09:45', '2026-03-10 20:09:45'),
(20, 1, NULL, NULL, 'link', 'Week 3: External Resources', 'Additional learning resources', 'https://resources.example.com/week3', NULL, 1, 3, 2, 1, '2026-03-10 20:09:45', 8, 0, '2026-03-10 20:09:45', '2026-03-10 20:09:45'),
(21, 1, NULL, NULL, 'document', 'Course Syllabus', 'Complete course syllabus and schedule', NULL, NULL, 0, NULL, 2, 1, '2026-03-10 20:09:45', 100, 50, '2026-03-10 20:09:45', '2026-03-10 20:09:45'),
(22, 1, NULL, NULL, 'other', 'Supplementary Material', 'Miscellaneous course content', 'https://misc.example.com', NULL, 99, NULL, 2, 1, '2026-03-10 20:09:45', 5, 1, '2026-03-10 20:09:45', '2026-03-10 20:09:45'),
(23, 1, NULL, NULL, 'video', 'Lecture 1: Introduction to Data Structures', 'This video covers the basics of data structures.', 'https://www.youtube.com/embed/8Jl9HwRS5NU', '8Jl9HwRS5NU', 0, 1, 66, 1, '2026-03-10 21:54:29', 0, 0, '2026-03-10 21:54:28', '2026-03-10 21:54:28'),
(24, 1, NULL, NULL, 'video', 'Lecture 1: Introduction to Data Structures', 'This video covers the basics of data structures.', 'https://www.youtube.com/embed/xom3C8hwGzM', 'xom3C8hwGzM', 0, 1, 64, 1, '2026-03-10 22:00:32', 0, 0, '2026-03-10 22:00:31', '2026-03-10 22:00:31'),
(26, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-11 17:20:01', 0, 0, '2026-03-11 17:20:00', '2026-03-11 17:20:00'),
(27, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-11 17:20:01', 0, 0, '2026-03-11 17:20:00', '2026-03-11 17:20:00'),
(29, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-11 17:37:46', 0, 0, '2026-03-11 17:37:46', '2026-03-11 17:37:46'),
(30, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-11 17:37:46', 0, 0, '2026-03-11 17:37:46', '2026-03-11 17:37:46'),
(32, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-14 15:35:59', 0, 0, '2026-03-14 15:35:59', '2026-03-14 15:35:59'),
(33, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-14 15:35:59', 0, 0, '2026-03-14 15:35:59', '2026-03-14 15:35:59'),
(35, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-14 15:40:39', 0, 0, '2026-03-14 15:40:39', '2026-03-14 15:40:39'),
(36, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-14 15:40:39', 0, 0, '2026-03-14 15:40:39', '2026-03-14 15:40:39'),
(38, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-14 16:06:02', 0, 0, '2026-03-14 16:06:01', '2026-03-14 16:06:01'),
(39, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-14 16:06:02', 0, 0, '2026-03-14 16:06:01', '2026-03-14 16:06:01'),
(40, 1, NULL, NULL, 'document', 'Test Material', 'Test', NULL, NULL, 0, 1, 59, 1, '2026-03-15 23:22:47', 0, 0, '2026-03-15 23:22:46', '2026-03-15 23:22:46'),
(42, 14, NULL, NULL, 'video', 'First Lecture Test', 'Test', NULL, NULL, 0, 1, 58, 1, '2026-03-15 23:40:06', 3, 0, '2026-03-15 23:40:05', '2026-03-16 00:06:46'),
(44, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:19:00', 0, 0, '2026-03-16 20:18:59', '2026-03-16 20:18:59'),
(45, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:19:00', 0, 0, '2026-03-16 20:18:59', '2026-03-16 20:18:59'),
(47, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:20:06', 0, 0, '2026-03-16 20:20:05', '2026-03-16 20:20:05'),
(48, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:20:06', 0, 0, '2026-03-16 20:20:05', '2026-03-16 20:20:05'),
(49, 1, NULL, 1, 'lecture', 'Week 1 Lecture Notes: Introduction to Data Structures', 'Comprehensive lecture notes covering the basics.', 'https://drive.google.com/file/d/1PFxy4dByCPhiLvhH2wuKmHlX9fWDi0kK/view?usp=drivesdk', NULL, 0, 1, 66, 1, '2026-03-16 20:31:42', 0, 0, '2026-03-16 20:31:41', '2026-03-16 20:31:41'),
(51, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:32:47', 0, 0, '2026-03-16 20:32:46', '2026-03-16 20:32:46'),
(52, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:32:47', 0, 0, '2026-03-16 20:32:46', '2026-03-16 20:32:46'),
(54, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:45:12', 0, 0, '2026-03-16 20:45:12', '2026-03-16 20:45:12'),
(55, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:45:12', 0, 0, '2026-03-16 20:45:12', '2026-03-16 20:45:12'),
(57, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:53:48', 0, 0, '2026-03-16 20:53:48', '2026-03-16 20:53:48'),
(58, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 20:53:48', 0, 0, '2026-03-16 20:53:48', '2026-03-16 20:53:48'),
(60, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 22:31:25', 0, 0, '2026-03-16 22:31:24', '2026-03-16 22:31:24'),
(61, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 22:31:25', 0, 0, '2026-03-16 22:31:24', '2026-03-16 22:31:24'),
(63, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 22:35:13', 0, 0, '2026-03-16 22:35:12', '2026-03-16 22:35:12'),
(64, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 22:35:13', 0, 0, '2026-03-16 22:35:12', '2026-03-16 22:35:12'),
(66, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 23:59:01', 0, 0, '2026-03-16 23:59:00', '2026-03-16 23:59:00'),
(67, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-16 23:59:01', 0, 0, '2026-03-16 23:59:00', '2026-03-16 23:59:00'),
(69, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:01:41', 0, 0, '2026-03-17 00:01:41', '2026-03-17 00:01:41'),
(70, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:01:41', 0, 0, '2026-03-17 00:01:41', '2026-03-17 00:01:41'),
(72, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:21:41', 0, 0, '2026-03-17 00:21:41', '2026-03-17 00:21:41'),
(73, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:21:41', 0, 0, '2026-03-17 00:21:41', '2026-03-17 00:21:41'),
(75, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:34:28', 0, 0, '2026-03-17 00:34:27', '2026-03-17 00:34:27'),
(76, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:34:29', 0, 0, '2026-03-17 00:34:29', '2026-03-17 00:34:29'),
(78, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:50:21', 0, 0, '2026-03-17 00:50:20', '2026-03-17 00:50:20'),
(79, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:50:21', 0, 0, '2026-03-17 00:50:20', '2026-03-17 00:50:20'),
(81, 1, NULL, NULL, 'lecture', 'Bulk Test 1', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:57:06', 0, 0, '2026-03-17 00:57:05', '2026-03-17 00:57:05'),
(82, 1, NULL, NULL, 'slide', 'Bulk Test 2', NULL, NULL, NULL, 0, 10, 59, 1, '2026-03-17 00:57:06', 0, 0, '2026-03-17 00:57:05', '2026-03-17 00:57:05');

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

--
-- Table structure for table `course_prerequisites`
--

DROP TABLE IF EXISTS `course_prerequisites`;
CREATE TABLE IF NOT EXISTS `course_prerequisites` (
  `prerequisite_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `prerequisite_course_id` bigint UNSIGNED NOT NULL,
  `is_mandatory` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`prerequisite_id`),
  UNIQUE KEY `unique_prerequisite` (`course_id`,`prerequisite_course_id`),
  KEY `prerequisite_course_id` (`prerequisite_course_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_prerequisites`
--

INSERT INTO `course_prerequisites` (`prerequisite_id`, `course_id`, `prerequisite_course_id`, `is_mandatory`, `created_at`) VALUES
(1, 2, 1, 1, '2024-09-01 08:00:00'),
(2, 3, 2, 1, '2025-11-20 13:42:59'),
(3, 4, 2, 1, '2025-11-20 13:42:59'),
(4, 6, 5, 1, '2025-11-20 13:42:59'),
(5, 8, 5, 1, '2025-11-27 17:54:45'),
(8, 3, 1, 1, '2026-03-02 23:29:24');

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

--
-- Table structure for table `course_schedules`
--

DROP TABLE IF EXISTS `course_schedules`;
CREATE TABLE IF NOT EXISTS `course_schedules` (
  `schedule_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `section_id` bigint UNSIGNED NOT NULL,
  `day_of_week` enum('monday','tuesday','wednesday','thursday','friday','saturday','sunday') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `room` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `building` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `schedule_type` enum('lecture','lab','tutorial','exam') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'lecture',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`schedule_id`),
  KEY `idx_section` (`section_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_schedules`
--

INSERT INTO `course_schedules` (`schedule_id`, `section_id`, `day_of_week`, `start_time`, `end_time`, `room`, `building`, `schedule_type`, `created_at`) VALUES
(1, 1, 'monday', '09:00:00', '10:30:00', '101', 'Building A', 'lecture', '2024-12-15 10:00:00'),
(2, 1, 'wednesday', '09:00:00', '10:30:00', '101', 'Building A', 'lecture', '2024-12-15 10:00:00'),
(3, 2, 'tuesday', '11:00:00', '12:30:00', '102', 'Building A', 'lecture', '2024-12-15 10:00:00'),
(4, 2, 'thursday', '11:00:00', '12:30:00', '102', 'Building A', 'lecture', '2024-12-15 10:00:00'),
(5, 3, 'monday', '13:00:00', '14:30:00', '201', 'Building B', 'lab', '2024-12-15 10:00:00'),
(6, 3, 'wednesday', '13:00:00', '14:30:00', '201', 'Building B', 'lab', '2024-12-15 10:00:00'),
(7, 4, 'tuesday', '14:00:00', '15:30:00', '202', 'Building B', 'tutorial', '2024-12-15 10:00:00'),
(8, 4, 'thursday', '14:00:00', '15:30:00', '202', 'Building B', 'tutorial', '2024-12-15 10:00:00'),
(9, 5, 'monday', '15:00:00', '16:30:00', '301', 'Lab Building', 'exam', '2024-12-15 10:00:00'),
(10, 9, 'tuesday', '14:00:00', '15:30:00', '320', 'Building C', 'lecture', '2025-11-27 18:28:26'),
(11, 1, 'monday', '14:00:00', '15:30:00', '355', 'Building C', 'lecture', '2025-11-27 18:30:21'),
(12, 2, 'monday', '09:00:00', '10:30:00', '101', 'Building A', 'lecture', '2026-03-01 21:05:48'),
(13, 1, 'monday', '11:00:00', '12:30:00', '102', 'Main', 'lecture', '2026-03-02 13:31:16'),
(14, 1, 'tuesday', '14:00:00', '15:30:00', '201', NULL, 'lecture', '2026-03-02 13:50:19'),
(15, 24, 'monday', '09:00:00', '10:30:00', 'Room A-101', NULL, 'lecture', '2026-03-15 15:02:56'),
(17, 26, 'monday', '09:00:00', '10:30:00', 'Room A-101', NULL, 'lecture', '2026-03-15 15:33:14'),
(18, 6, 'monday', '09:00:00', '10:30:00', 'Room 401A', NULL, 'lecture', '2026-03-15 15:33:32'),
(19, 25, 'monday', '09:00:00', '10:30:00', 'Room A-101', NULL, 'lecture', '2026-03-15 15:36:57');

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

--
-- Table structure for table `course_sections`
--

DROP TABLE IF EXISTS `course_sections`;
CREATE TABLE IF NOT EXISTS `course_sections` (
  `section_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `semester_id` bigint UNSIGNED NOT NULL,
  `section_number` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `max_capacity` int DEFAULT '50',
  `current_enrollment` int DEFAULT '0',
  `location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('open','closed','full','cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'open',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`section_id`),
  UNIQUE KEY `unique_section` (`course_id`,`semester_id`,`section_number`),
  KEY `idx_course` (`course_id`),
  KEY `idx_semester` (`semester_id`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_sections`
--

INSERT INTO `course_sections` (`section_id`, `course_id`, `semester_id`, `section_number`, `max_capacity`, `current_enrollment`, `location`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 4, '01', 40, 7, 'Building A, Room 101', 'open', '2025-11-27 18:20:49', '2025-11-30 16:39:48'),
(2, 1, 2, '02', 50, 48, 'Room 102B', 'full', '2024-12-15 10:00:00', '2025-02-15 09:30:00'),
(3, 2, 2, '01', 40, 35, 'Room 201A', 'open', '2024-12-15 10:00:00', '2025-02-15 09:30:00'),
(4, 2, 2, '02', 40, 38, 'Room 202B', 'open', '2024-12-15 10:00:00', '2025-02-15 09:30:00'),
(5, 3, 2, '01', 45, 40, 'Lab 301', 'open', '2024-12-15 10:00:00', '2025-02-15 09:30:00'),
(6, 4, 2, '01', 35, 32, 'Room 401A', 'open', '2024-12-15 10:00:00', '2026-03-15 15:33:32'),
(7, 5, 2, '01', 40, 39, 'Room 501A', 'open', '2024-12-15 10:00:00', '2026-03-04 14:13:13'),
(8, 9, 2, '01', 50, 46, 'Room 601A', 'open', '2024-12-15 10:00:00', '2026-03-04 14:13:22'),
(9, 2, 3, '2', 50, 6, 'Building C, Room 320', 'open', '2025-11-27 18:25:02', '2025-11-30 16:13:44'),
(10, 1, 3, '2', 45, 9, 'Building B, Room 215', 'open', '2025-11-30 16:00:35', '2025-11-30 16:13:44'),
(11, 1, 1, '1', 35, 0, 'Room B202', 'open', '2026-03-02 13:30:09', '2026-03-16 20:56:28'),
(12, 1, 1, '2', 30, 0, NULL, 'open', '2026-03-02 13:50:17', '2026-03-02 13:50:17'),
(13, 1, 1, '3', 30, 0, 'Room A101', 'open', '2026-03-02 23:30:18', '2026-03-02 23:30:18'),
(14, 1, 1, '4', 30, 0, 'Room A101', 'open', '2026-03-02 23:51:54', '2026-03-02 23:51:54'),
(15, 1, 1, '5', 30, 0, 'Room A101', 'open', '2026-03-03 00:23:16', '2026-03-03 00:23:16'),
(16, 1, 1, '6', 30, 0, 'Room A101', 'open', '2026-03-03 18:34:00', '2026-03-03 18:34:00'),
(17, 1, 1, '7', 30, 0, 'Room A101', 'open', '2026-03-05 19:16:21', '2026-03-05 19:16:21'),
(21, 1, 2, '134', 30, 0, 'Room TEST', 'open', '2026-03-14 15:35:57', '2026-03-14 15:35:57'),
(22, 1, 2, '282', 30, 0, 'Room TEST', 'open', '2026-03-14 15:40:38', '2026-03-14 15:40:38'),
(23, 1, 2, '605', 30, 0, 'Room TEST', 'open', '2026-03-14 16:06:00', '2026-03-14 16:06:00'),
(24, 24, 4, '1', 30, 0, 'Room A-101', 'open', '2026-03-15 15:02:56', '2026-03-15 15:02:56'),
(25, 22, 4, '1', 30, 0, 'Room A-101', 'open', '2026-03-15 15:33:02', '2026-03-15 15:36:57'),
(26, 14, 4, '1', 30, 0, 'Room A-101', 'open', '2026-03-15 15:33:14', '2026-03-15 15:33:14'),
(27, 1, 2, '702', 30, 0, 'Room TEST', 'open', '2026-03-16 20:18:57', '2026-03-16 20:18:57'),
(28, 1, 2, '312', 30, 0, 'Room TEST', 'open', '2026-03-16 20:20:04', '2026-03-16 20:20:04'),
(29, 1, 2, '913', 30, 0, 'Room TEST', 'open', '2026-03-16 20:32:45', '2026-03-16 20:32:45'),
(30, 1, 2, '888', 30, 0, 'Room TEST', 'open', '2026-03-16 20:34:09', '2026-03-16 20:34:09'),
(31, 1, 2, '902', 30, 0, 'Room TEST', 'open', '2026-03-16 20:45:10', '2026-03-16 20:45:10'),
(32, 1, 2, '113', 30, 0, 'Room TEST', 'open', '2026-03-16 20:53:46', '2026-03-16 20:53:46'),
(33, 1, 1, '8', 30, 0, 'Room A101', 'open', '2026-03-16 20:56:28', '2026-03-16 20:56:28'),
(34, 1, 2, '197', 30, 0, 'Room TEST', 'open', '2026-03-16 22:31:23', '2026-03-16 22:31:23'),
(35, 1, 2, '806', 30, 0, 'Room TEST', 'open', '2026-03-16 22:35:11', '2026-03-16 22:35:11'),
(36, 1, 2, '159', 30, 0, 'Room TEST', 'open', '2026-03-16 23:58:59', '2026-03-16 23:58:59'),
(37, 1, 2, '542', 30, 0, 'Room TEST', 'open', '2026-03-17 00:01:39', '2026-03-17 00:01:39'),
(38, 1, 2, '547', 30, 0, 'Room TEST', 'open', '2026-03-17 00:21:39', '2026-03-17 00:21:39'),
(39, 1, 2, '886', 30, 0, 'Room TEST', 'open', '2026-03-17 00:34:23', '2026-03-17 00:34:23'),
(40, 1, 2, '323', 30, 0, 'Room TEST', 'open', '2026-03-17 00:50:18', '2026-03-17 00:50:18');

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

--
-- Table structure for table `course_tas`
--

DROP TABLE IF EXISTS `course_tas`;
CREATE TABLE IF NOT EXISTS `course_tas` (
  `assignment_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `section_id` bigint UNSIGNED NOT NULL,
  `responsibilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `assigned_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`assignment_id`),
  UNIQUE KEY `unique_ta_section` (`user_id`,`section_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_section` (`section_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_tas`
--

INSERT INTO `course_tas` (`assignment_id`, `user_id`, `section_id`, `responsibilities`, `assigned_at`) VALUES
(1, 18, 1, 'Grading assignments and leading lab sessions', '2024-12-15 10:00:00'),
(2, 19, 2, 'Grading assignments and holding office hours', '2024-12-15 10:00:00'),
(3, 18, 3, 'Grading assignments and leading lab sessions', '2024-12-15 10:00:00'),
(4, 20, 4, 'Grading assignments and proctoring quizzes', '2024-12-15 10:00:00'),
(5, 19, 5, 'Grading assignments and holding office hours', '2024-12-15 10:00:00'),
(6, 5, 1, NULL, '2026-03-10 20:09:45'),
(7, 65, 1, 'Grading assignments and holding office hours', '2026-03-10 21:26:04'),
(8, 60, 24, NULL, '2026-03-15 15:05:30'),
(9, 65, 25, NULL, '2026-03-15 15:33:03'),
(10, 6, 25, NULL, '2026-03-15 15:33:03'),
(11, 60, 26, NULL, '2026-03-15 15:33:14'),
(12, 60, 6, NULL, '2026-03-15 15:33:32');

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

--
-- Table structure for table `daily_streaks`
--

DROP TABLE IF EXISTS `daily_streaks`;
CREATE TABLE IF NOT EXISTS `daily_streaks` (
  `streak_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `current_streak` int DEFAULT '0',
  `longest_streak` int DEFAULT '0',
  `last_activity_date` date DEFAULT NULL,
  `streak_start_date` date DEFAULT NULL,
  `total_active_days` int DEFAULT '0',
  `streak_status` enum('active','broken','frozen') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `freeze_count` int DEFAULT '0',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`streak_id`),
  UNIQUE KEY `user_id` (`user_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_streak` (`current_streak`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `daily_streaks`
--

INSERT INTO `daily_streaks` (`streak_id`, `user_id`, `current_streak`, `longest_streak`, `last_activity_date`, `streak_start_date`, `total_active_days`, `streak_status`, `freeze_count`, `updated_at`) VALUES
(1, 7, 15, 15, '2025-02-15', '2025-02-01', 15, 'active', 0, '2025-11-20 13:43:00'),
(2, 8, 12, 12, '2025-02-15', '2025-02-04', 12, 'active', 0, '2025-11-20 13:43:00'),
(3, 9, 8, 10, '2025-02-15', '2025-02-08', 20, 'active', 1, '2025-11-20 13:43:00'),
(4, 10, 5, 7, '2025-02-15', '2025-02-11', 15, 'active', 0, '2025-11-20 13:43:00'),
(5, 11, 3, 5, '2025-02-15', '2025-02-13', 10, 'active', 0, '2025-11-20 13:43:00');

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

--
-- Table structure for table `deadline_reminders`
--

DROP TABLE IF EXISTS `deadline_reminders`;
CREATE TABLE IF NOT EXISTS `deadline_reminders` (
  `reminder_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `task_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `reminder_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `reminder_type` enum('email','push','sms','in_app') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'in_app',
  `status` enum('pending','sent','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `sent_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`reminder_id`),
  KEY `idx_task` (`task_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `deadline_reminders`
--

INSERT INTO `deadline_reminders` (`reminder_id`, `task_id`, `user_id`, `reminder_time`, `reminder_type`, `status`, `sent_at`, `created_at`) VALUES
(4, 5, 8, '2025-02-18 07:00:00', 'email', 'sent', '2025-02-18 07:00:15', '2025-11-20 13:43:00'),
(5, 6, 9, '2025-03-13 07:00:00', 'push', 'pending', NULL, '2025-11-20 13:43:00'),
(6, 7, 57, '2026-03-13 18:12:04', 'in_app', 'pending', NULL, '2026-03-11 18:12:04'),
(7, 8, 57, '2026-03-15 18:12:04', 'email', 'pending', NULL, '2026-03-11 18:12:04'),
(10, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-14 15:17:54'),
(11, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-14 15:36:12'),
(12, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-14 15:40:52'),
(13, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-14 16:06:14'),
(14, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-16 20:19:12'),
(15, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-16 20:20:18'),
(16, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-16 20:33:00'),
(17, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-16 20:45:25'),
(18, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-16 20:54:01'),
(19, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-16 22:31:38'),
(20, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-16 22:35:25'),
(21, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-16 23:59:15'),
(22, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-17 00:01:54'),
(23, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-17 00:21:56'),
(24, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-17 00:34:48'),
(25, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-17 00:50:33'),
(26, 9, 57, '2026-03-17 18:14:02', 'in_app', 'pending', NULL, '2026-03-17 00:57:19');

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

--
-- Table structure for table `departments`
--

DROP TABLE IF EXISTS `departments`;
CREATE TABLE IF NOT EXISTS `departments` (
  `department_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `campus_id` bigint UNSIGNED NOT NULL,
  `department_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `department_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `head_of_department_id` bigint UNSIGNED DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` enum('active','inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`department_id`),
  UNIQUE KEY `unique_dept_code` (`campus_id`,`department_code`),
  KEY `head_of_department_id` (`head_of_department_id`),
  KEY `idx_campus` (`campus_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `departments`
--

INSERT INTO `departments` (`department_id`, `campus_id`, `department_name`, `department_code`, `head_of_department_id`, `description`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Updated Department', 'CS', NULL, 'Department of Computer Science and Engineering', 'active', '2025-11-20 13:42:59', '2026-03-17 00:57:02'),
(2, 1, 'Mathematics', 'MATH', NULL, 'Department of Mathematics', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(3, 1, 'Physics', 'PHY', NULL, 'Department of Physics', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(4, 2, 'Business Administration', 'BUS', NULL, 'School of Business', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(5, 2, 'Engineering', 'ENG', NULL, 'School of Engineering', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(6, 3, 'Science', 'SCI', NULL, 'Department of mathematics, physics, and chemistry', 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00'),
(14, 1, 'Test Dept Z', 'TDZ', NULL, 'Test', 'active', '2026-03-02 13:29:52', '2026-03-02 13:29:52'),
(15, 1, 'AutoDept', 'AD1', NULL, NULL, 'active', '2026-03-02 13:49:17', '2026-03-02 13:49:17'),
(16, 1, 'Test Department', 'TD01', NULL, 'A test department', 'active', '2026-03-02 23:28:49', '2026-03-02 23:28:49'),
(17, 1, 'API Dog Test Dept', 'TESTD01', NULL, NULL, 'active', '2026-03-11 17:37:43', '2026-03-11 17:37:43');

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

--
-- Table structure for table `device_tokens`
--

DROP TABLE IF EXISTS `device_tokens`;
CREATE TABLE IF NOT EXISTS `device_tokens` (
  `token_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `device_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `device_type` enum('ios','android','web') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `device_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `last_used` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`token_id`),
  UNIQUE KEY `unique_user_token` (`user_id`,`device_token`),
  KEY `idx_user` (`user_id`),
  KEY `idx_active` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `device_tokens`
--

INSERT INTO `device_tokens` (`token_id`, `user_id`, `device_token`, `device_type`, `device_name`, `is_active`, `last_used`, `created_at`) VALUES
(1, 7, 'fcm_token_alice_phone_12345', 'android', 'Alice Phone', 1, '2025-02-15 06:30:00', '2025-11-20 13:43:00'),
(2, 7, 'fcm_token_alice_tablet_67890', '', 'Alice Tablet', 1, '2025-02-14 18:15:00', '2025-11-20 13:43:00'),
(3, 8, 'apns_token_bob_iphone_abcde', 'ios', 'Bob iPhone 13', 1, '2025-02-15 05:45:00', '2025-11-20 13:43:00'),
(4, 9, 'fcm_token_carol_android_fghij', 'android', 'Carol Galaxy S21', 1, '2025-02-15 07:00:00', '2025-11-20 13:43:00'),
(5, 10, 'web_push_token_david_chrome', 'web', 'Chrome on Windows', 1, '2025-02-15 08:30:00', '2025-11-20 13:43:00');

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

--
-- Table structure for table `drive_files`
--

DROP TABLE IF EXISTS `drive_files`;
CREATE TABLE IF NOT EXISTS `drive_files` (
  `drive_file_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `drive_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Google Drive file ID',
  `drive_folder_id` bigint UNSIGNED NOT NULL COMMENT 'Parent folder in drive_folders',
  `local_file_id` bigint UNSIGNED DEFAULT NULL COMMENT 'FK to local files table (redundant backup)',
  `file_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'File name in Google Drive',
  `original_file_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Original uploaded file name',
  `mime_type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_size` bigint UNSIGNED NOT NULL COMMENT 'File size in bytes',
  `web_view_link` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Google Drive view link',
  `web_content_link` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Direct download link',
  `thumbnail_link` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Thumbnail URL if available',
  `entity_type` enum('course_material','lab_instruction','lab_ta_material','lab_submission','assignment_instruction','assignment_submission','project_instruction','project_ta_material','project_submission') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Type of entity this file belongs to',
  `entity_id` bigint UNSIGNED DEFAULT NULL COMMENT 'ID of the related entity',
  `version_number` int DEFAULT '1' COMMENT 'Version number for file updates',
  `uploaded_by` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`drive_file_id`),
  UNIQUE KEY `uk_drive_id` (`drive_id`),
  KEY `idx_drive_folder` (`drive_folder_id`),
  KEY `idx_local_file` (`local_file_id`),
  KEY `idx_entity` (`entity_type`,`entity_id`),
  KEY `idx_uploaded_by` (`uploaded_by`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Tracks files uploaded to Google Drive';

--
-- Dumping data for table `drive_files`
--

INSERT INTO `drive_files` (`drive_file_id`, `drive_id`, `drive_folder_id`, `local_file_id`, `file_name`, `original_file_name`, `mime_type`, `file_size`, `web_view_link`, `web_content_link`, `thumbnail_link`, `entity_type`, `entity_id`, `version_number`, `uploaded_by`, `created_at`, `updated_at`) VALUES
(1, '1PFxy4dByCPhiLvhH2wuKmHlX9fWDi0kK', 7, NULL, 'Week01_Week_1_Lecture_Notes__Introduction_to_Data_Structu_v1.pdf', 'Week01_Week_1_Lecture_Notes__Introduction_to_Data_Structu_v1.pdf', 'application/pdf', 139394, 'https://drive.google.com/file/d/1PFxy4dByCPhiLvhH2wuKmHlX9fWDi0kK/view?usp=drivesdk', 'https://drive.google.com/uc?id=1PFxy4dByCPhiLvhH2wuKmHlX9fWDi0kK&export=download', NULL, 'course_material', 49, 1, 66, '2026-03-16 20:31:41', '2026-03-16 20:31:41');

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

--
-- Table structure for table `drive_folders`
--

DROP TABLE IF EXISTS `drive_folders`;
CREATE TABLE IF NOT EXISTS `drive_folders` (
  `drive_folder_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `drive_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Google Drive folder ID',
  `folder_type` enum('root','department','academic_year','semester','course','course_general','course_lectures','course_labs','course_assignments','course_projects','lecture_week','lab','lab_instructions','lab_ta_materials','lab_submissions','lab_student_submission','assignment','assignment_instructions','assignment_submissions','assignment_student_submission','project','project_instructions','project_ta_materials','project_submissions','project_group_submission') COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_drive_folder_id` bigint UNSIGNED DEFAULT NULL COMMENT 'Self-referencing FK to parent folder',
  `entity_type` enum('department','semester','course','lab','assignment','project','user','group') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Type of entity this folder represents',
  `entity_id` bigint UNSIGNED DEFAULT NULL COMMENT 'ID of the related entity (course_id, lab_id, etc.)',
  `folder_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Human-readable folder name',
  `folder_path` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Full path for reference (e.g., EduVerse/CS/2024-2025/Fall)',
  `created_by` bigint UNSIGNED NOT NULL COMMENT 'User who created this folder',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`drive_folder_id`),
  UNIQUE KEY `uk_drive_id` (`drive_id`),
  KEY `idx_folder_type` (`folder_type`),
  KEY `idx_parent` (`parent_drive_folder_id`),
  KEY `idx_entity` (`entity_type`,`entity_id`),
  KEY `idx_created_by` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Maps Google Drive folders to entities (courses, labs, etc.)';

--
-- Dumping data for table `drive_folders`
--

INSERT INTO `drive_folders` (`drive_folder_id`, `drive_id`, `folder_type`, `parent_drive_folder_id`, `entity_type`, `entity_id`, `folder_name`, `folder_path`, `created_by`, `created_at`, `updated_at`) VALUES
(1, '11z3BsI4TWsUkb_0ZErXnbiqhicqvCar4', 'root', NULL, NULL, NULL, 'EduVerse', 'EduVerse', 66, '2026-03-16 20:29:14', '2026-03-16 20:29:14'),
(2, '[REDACTED]', 'department', 1, 'department', 1, 'Updated_Department', 'EduVerse/Updated Department', 66, '2026-03-16 20:31:31', '2026-03-16 20:31:31'),
(3, '1_bl4n-JKg_RdVrTYh970e0tgVCGoTJbB', 'academic_year', 2, NULL, NULL, '2025-2026', 'EduVerse/Updated Department/2025-2026', 66, '2026-03-16 20:31:32', '2026-03-16 20:31:32'),
(4, '1hzy0BvdRX1wOm3vid-0Hf3dxaCiOx2xb', 'semester', 3, 'semester', 1, 'Fall_2026_Updated', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated', 66, '2026-03-16 20:31:33', '2026-03-16 20:31:33'),
(5, '1mmCYS0bVyAqEQdWQPRIvxtMt1HUYU83g', 'course', 4, 'course', 1, 'CS101_Updated_Course_Name', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated/CS101_Updated_Course_Name', 66, '2026-03-16 20:31:34', '2026-03-16 20:31:34'),
(6, '1uDOaN3UBSQ1cTeGjPcmDW-q6PNjI_D9m', 'course_general', 5, 'course', 1, 'General', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated/CS101_Updated_Course_Name/General', 66, '2026-03-16 20:31:35', '2026-03-16 20:31:35'),
(7, '1U77g8MXYTR_tAhLtZN0uxZjtg4iOBGBd', 'course_lectures', 5, 'course', 1, 'Lectures', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated/CS101_Updated_Course_Name/Lectures', 66, '2026-03-16 20:31:36', '2026-03-16 20:31:36'),
(8, '1v76RnRCVjwWy5A4IRqXlk-CMOAMV4tGF', 'course_labs', 5, 'course', 1, 'Labs', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated/CS101_Updated_Course_Name/Labs', 66, '2026-03-16 20:31:37', '2026-03-16 20:31:37'),
(9, '1tLOaumIEagNTu7XxqO1aG_kRew-aeZPg', 'course_assignments', 5, 'course', 1, 'Assignments', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated/CS101_Updated_Course_Name/Assignments', 66, '2026-03-16 20:31:38', '2026-03-16 20:31:38'),
(10, '1lxs3kcaQF6zZs8BtWCcSWVthyAeofPQU', 'course_projects', 5, 'course', 1, 'Projects', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated/CS101_Updated_Course_Name/Projects', 66, '2026-03-16 20:31:39', '2026-03-16 20:31:39'),
(11, '1_pSqKy_zvYhXg93Stg4_gja7y3xW3GS1', 'semester', 3, 'semester', 2, 'Spring_2025', 'EduVerse/Updated Department/2025-2026/Spring_2025', 59, '2026-03-16 20:33:06', '2026-03-16 20:33:06'),
(12, '1mPc31vENKsswwJlFT_yH6o-s2M8e6aPb', 'course', 11, 'course', 2, 'CS201_Data_Structures', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures', 59, '2026-03-16 20:33:07', '2026-03-16 20:33:07'),
(13, '1CbCgIdRA-BSAMnw9CO5BRPwR5lcKFRwB', 'course_general', 12, 'course', 2, 'General', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures/General', 59, '2026-03-16 20:33:07', '2026-03-16 20:33:07'),
(14, '15HZStYUqQ0-lhcW3wApKTjaQ2eGm_Eus', 'course_lectures', 12, 'course', 2, 'Lectures', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures/Lectures', 59, '2026-03-16 20:33:08', '2026-03-16 20:33:08'),
(15, '1S26fhkXiWDuPNzQMTn5UNwCgsLF3fl4Q', 'course_labs', 12, 'course', 2, 'Labs', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures/Labs', 59, '2026-03-16 20:33:09', '2026-03-16 20:33:09'),
(16, '1ADW91g3mub5OUJAQL72hrttwd1km1QTa', 'course_assignments', 12, 'course', 2, 'Assignments', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures/Assignments', 59, '2026-03-16 20:33:10', '2026-03-16 20:33:10'),
(17, '1kMpR_R3gN1h3_gfxEbXnNVRSOHbzlmIe', 'course_projects', 12, 'course', 2, 'Projects', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures/Projects', 59, '2026-03-16 20:33:11', '2026-03-16 20:33:11'),
(18, '1kXCV4uUZmSV8DpKdBLMdM26iHK3h3PaX', 'lab', 15, 'lab', 3, 'Lab_01_Updated_Lab_Title', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures/Labs/Lab_01_Updated_Lab_Title', 59, '2026-03-16 20:33:12', '2026-03-16 20:33:12'),
(19, '15pkvpSC3vWXqMaPcXleeWEKbKNTa_4EK', 'lab_instructions', 18, 'lab', 3, 'instructions', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures/Labs/Lab_01_Updated_Lab_Title/instructions', 59, '2026-03-16 20:33:13', '2026-03-16 20:33:13'),
(20, '1DvEqPO9a6BRhWl9h0CPDiRaYnV5w8OEX', 'lab_ta_materials', 18, 'lab', 3, 'ta_materials', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures/Labs/Lab_01_Updated_Lab_Title/ta_materials', 59, '2026-03-16 20:33:14', '2026-03-16 20:33:14'),
(21, '18NDzdz7a6PJMkB-IBxAjii_J5Uc31s4U', 'lab_submissions', 18, 'lab', 3, 'submissions', 'EduVerse/Updated Department/2025-2026/Spring_2025/CS201_Data_Structures/Labs/Lab_01_Updated_Lab_Title/submissions', 59, '2026-03-16 20:33:15', '2026-03-16 20:33:15'),
(22, '1g4c47Nmx_hIo2ouHbUTiqh0srFq7v6h3', 'assignment', 9, 'assignment', 1, 'Assignment_01_Updated_Assignment_Title', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated/CS101_Updated_Course_Name/Assignments/Assignment_01_Updated_Assignment_Title', 59, '2026-03-16 20:33:16', '2026-03-16 20:33:16'),
(23, '1Qpc8v00nE_iXt4g5W_16H47YOHiJUMMf', 'assignment_instructions', 22, 'assignment', 1, 'instructions', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated/CS101_Updated_Course_Name/Assignments/Assignment_01_Updated_Assignment_Title/instructions', 59, '2026-03-16 20:33:17', '2026-03-16 20:33:17'),
(24, '1ZAH8D2mkzOLMuX0G7Mfo3fqxaX3clGED', 'assignment_submissions', 22, 'assignment', 1, 'submissions', 'EduVerse/Updated Department/2025-2026/Fall_2026_Updated/CS101_Updated_Course_Name/Assignments/Assignment_01_Updated_Assignment_Title/submissions', 59, '2026-03-16 20:33:18', '2026-03-16 20:33:18');

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

--
-- Table structure for table `email_verifications`
--

DROP TABLE IF EXISTS `email_verifications`;
CREATE TABLE IF NOT EXISTS `email_verifications` (
  `verification_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `verification_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `expires_at` datetime NOT NULL,
  `used` tinyint(1) DEFAULT '0',
  `used_at` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`verification_id`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_token` (`verification_token`),
  KEY `idx_used_expires` (`used`,`expires_at`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `email_verifications`
--

INSERT INTO `email_verifications` (`verification_id`, `user_id`, `verification_token`, `expires_at`, `used`, `used_at`, `created_at`) VALUES
(1, 25, '5d07adec255c200238f6eaa009c3b46f9896bb02ce146733c8cf2d742b9f0711', '2025-11-27 17:22:14', 1, '2025-11-26 17:23:27', '2025-11-26 15:22:14'),
(6, 29, '21835f50cc20c446f178a8c94498092b0891812a8e99e493456119faef097fd9', '2025-11-27 20:02:35', 1, '2025-11-26 20:03:48', '2025-11-26 18:02:35'),
(7, 30, '1232f414678fdff80cafc79ff0c80c37fe239fa37b01ddff305ce46e12538fa3', '2025-11-28 01:31:32', 1, '2025-11-27 01:33:39', '2025-11-26 23:31:32'),
(10, 33, '420bf068e218a74d45eeae1f71e894af89d642b5c26abc0e125e37deab55c81d', '2025-11-28 02:32:35', 1, '2025-11-27 02:36:26', '2025-11-27 00:32:35'),
(11, 33, 'e3e106fdf64b97aa98d2aa32913f0848e3be99cc0e56da772d0a1fed775b95fe', '2025-11-28 02:36:26', 1, '2025-11-27 02:36:43', '2025-11-27 00:36:26'),
(12, 34, 'd29afa104b8d7a7700c047ee8732a9edae9c77c8b4fb2b3856d25f60bca755a8', '2025-12-01 18:08:06', 0, NULL, '2025-11-30 16:08:06'),
(13, 35, '3435b074bbdebb93a84a2af96d393d94ccdddbc778909051c6d8533a5e0a877f', '2026-02-26 21:01:55', 0, NULL, '2026-02-25 19:01:54'),
(14, 36, '2fa8c3e006a12edaf0294cf86bdc49c6cf2a8f1792016bcfabcb008018eb77e0', '2026-02-26 21:02:43', 0, NULL, '2026-02-25 19:02:43');

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

--
-- Table structure for table `exam_schedules`
--

DROP TABLE IF EXISTS `exam_schedules`;
CREATE TABLE IF NOT EXISTS `exam_schedules` (
  `exam_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `semester_id` bigint UNSIGNED NOT NULL,
  `exam_type` enum('midterm','final','quiz','makeup') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `exam_date` date NOT NULL,
  `start_time` time NOT NULL,
  `duration_minutes` int NOT NULL,
  `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `instructions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` enum('scheduled','in_progress','completed','cancelled','postponed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'scheduled',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`exam_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_semester` (`semester_id`),
  KEY `idx_date` (`exam_date`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `exam_schedules`
--

INSERT INTO `exam_schedules` (`exam_id`, `course_id`, `semester_id`, `exam_type`, `title`, `exam_date`, `start_time`, `duration_minutes`, `location`, `instructions`, `status`, `created_at`, `updated_at`) VALUES
(6, 1, 2, 'midterm', 'CS101 Midterm', '2026-06-15', '09:00:00', 120, 'Room A101', NULL, 'scheduled', '2026-03-14 15:17:54', '2026-03-14 15:17:54');

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

--
-- Table structure for table `export_history`
--

DROP TABLE IF EXISTS `export_history`;
CREATE TABLE IF NOT EXISTS `export_history` (
  `export_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `report_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `export_format` enum('pdf','excel','csv','json') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_id` bigint UNSIGNED DEFAULT NULL,
  `exported_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`export_id`),
  KEY `file_id` (`file_id`),
  KEY `idx_report` (`report_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `export_history`
--

INSERT INTO `export_history` (`export_id`, `report_id`, `user_id`, `export_format`, `file_id`, `exported_at`) VALUES
(1, 1, 59, 'pdf', NULL, '2026-03-11 18:12:04'),
(2, 2, 59, 'excel', NULL, '2026-03-11 18:12:04'),
(3, 3, 59, 'csv', NULL, '2026-03-11 18:12:04'),
(4, 5, 59, 'pdf', NULL, '2026-03-11 18:19:39'),
(5, 6, 59, 'pdf', NULL, '2026-03-11 18:23:02'),
(6, 7, 59, 'csv', NULL, '2026-03-11 18:24:07'),
(7, 8, 59, 'pdf', NULL, '2026-03-11 18:29:28'),
(8, 9, 59, 'pdf', NULL, '2026-03-14 15:17:56'),
(9, 10, 59, 'pdf', NULL, '2026-03-14 15:36:14'),
(10, 11, 59, 'pdf', NULL, '2026-03-14 15:40:54'),
(11, 12, 59, 'pdf', NULL, '2026-03-14 16:06:16'),
(12, 13, 59, 'pdf', NULL, '2026-03-16 20:19:14'),
(13, 14, 59, 'pdf', NULL, '2026-03-16 20:20:20'),
(14, 15, 59, 'pdf', NULL, '2026-03-16 20:33:02'),
(15, 16, 59, 'pdf', NULL, '2026-03-16 20:45:27'),
(16, 17, 59, 'pdf', NULL, '2026-03-16 20:54:03'),
(17, 18, 59, 'pdf', NULL, '2026-03-16 22:31:40'),
(18, 19, 59, 'pdf', NULL, '2026-03-16 22:35:27'),
(19, 20, 59, 'pdf', NULL, '2026-03-16 23:59:17'),
(20, 21, 59, 'pdf', NULL, '2026-03-17 00:01:57'),
(21, 22, 59, 'pdf', NULL, '2026-03-17 00:21:58'),
(22, 23, 59, 'pdf', NULL, '2026-03-17 00:34:51'),
(23, 24, 59, 'pdf', NULL, '2026-03-17 00:50:35'),
(24, 25, 59, 'pdf', NULL, '2026-03-17 00:57:21');

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

--
-- Table structure for table `face_recognition_data`
--

DROP TABLE IF EXISTS `face_recognition_data`;
CREATE TABLE IF NOT EXISTS `face_recognition_data` (
  `face_data_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `face_encoding` blob NOT NULL,
  `sample_image_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `confidence_threshold` decimal(3,2) DEFAULT '0.75',
  `enrollment_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `status` enum('active','pending','failed','disabled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  PRIMARY KEY (`face_data_id`),
  UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `face_recognition_data`
--

INSERT INTO `face_recognition_data` (`face_data_id`, `user_id`, `face_encoding`, `sample_image_url`, `confidence_threshold`, `enrollment_date`, `last_updated`, `status`) VALUES
(1, 7, 0x89504e470d0a1a0a0000, '/uploads/face_samples/user_7_sample.jpg', 0.85, '2025-01-20 08:00:00', '2025-11-20 13:43:00', 'active'),
(2, 8, 0x89504e470d0a1a0a0001, '/uploads/face_samples/user_8_sample.jpg', 0.80, '2025-01-20 08:15:00', '2025-11-20 13:43:00', 'active'),
(3, 9, 0x89504e470d0a1a0a0002, '/uploads/face_samples/user_9_sample.jpg', 0.82, '2025-01-20 08:30:00', '2025-11-20 13:43:00', 'active'),
(4, 10, 0x89504e470d0a1a0a0003, '/uploads/face_samples/user_10_sample.jpg', 0.75, '2025-01-20 08:45:00', '2025-11-20 13:43:00', 'active'),
(5, 11, 0x89504e470d0a1a0a0004, '/uploads/face_samples/user_11_sample.jpg', 0.78, '2025-01-20 09:00:00', '2025-11-20 13:43:00', 'pending');

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

--
-- Table structure for table `feedback_responses`
--

DROP TABLE IF EXISTS `feedback_responses`;
CREATE TABLE IF NOT EXISTS `feedback_responses` (
  `response_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `feedback_id` bigint UNSIGNED DEFAULT NULL,
  `ticket_id` bigint UNSIGNED DEFAULT NULL,
  `responder_id` bigint UNSIGNED NOT NULL,
  `response_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_internal_note` tinyint(1) DEFAULT '0',
  `attachments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`response_id`),
  KEY `idx_feedback` (`feedback_id`),
  KEY `idx_ticket` (`ticket_id`),
  KEY `idx_responder` (`responder_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `feedback_responses`
--

INSERT INTO `feedback_responses` (`response_id`, `feedback_id`, `ticket_id`, `responder_id`, `response_text`, `is_internal_note`, `attachments`, `created_at`) VALUES
(1, 1, 1, 1, 'Thank you for reporting this issue. We have identified the problem with file upload validation. Could you please try again?', 0, NULL, '2025-11-20 13:43:00'),
(2, 1, 1, 7, 'It works now! Thank you so much!', 0, NULL, '2025-11-20 13:43:00'),
(3, 4, 2, 1, 'Your quiz grade has been updated. There was a delay in the automated grading system. Please check your gradebook now.', 0, NULL, '2025-11-20 13:43:00'),
(4, NULL, 3, 1, 'I have manually sent you a password reset link to your registered email. Please check your spam folder as well.', 0, NULL, '2025-11-20 13:43:00'),
(5, 2, NULL, 1, 'Great suggestion! We are working on implementing dark mode in the next update.', 0, NULL, '2025-11-20 13:43:00');

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

--
-- Table structure for table `files`
--

DROP TABLE IF EXISTS `files`;
CREATE TABLE IF NOT EXISTS `files` (
  `file_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `original_filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_size` bigint UNSIGNED DEFAULT NULL,
  `mime_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `file_extension` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uploaded_by` bigint UNSIGNED NOT NULL,
  `folder_id` bigint UNSIGNED DEFAULT NULL,
  `checksum` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `download_count` int DEFAULT '0',
  `is_public` tinyint(1) DEFAULT '0',
  `status` enum('active','processing','archived','deleted') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `uploaded_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`file_id`),
  KEY `idx_uploader` (`uploaded_by`),
  KEY `idx_folder` (`folder_id`),
  KEY `idx_checksum` (`checksum`),
  KEY `idx_uploader_status` (`uploaded_by`,`status`),
  KEY `idx_folder_status` (`folder_id`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `files`
--

INSERT INTO `files` (`file_id`, `file_name`, `original_filename`, `file_path`, `file_size`, `mime_type`, `file_extension`, `uploaded_by`, `folder_id`, `checksum`, `download_count`, `is_public`, `status`, `uploaded_at`, `updated_at`, `deleted_at`) VALUES
(1, 'cs101_syllabus.pdf', 'CS101_Syllabus.pdf', '/course_materials/cs101/syllabus.pdf', 524288, 'application/pdf', 'pdf', 2, 2, NULL, 0, 1, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(2, 'cs101_lecture1.pdf', 'Lecture_1_Introduction.pdf', '/course_materials/cs101/lecture1.pdf', 1048576, 'application/pdf', 'pdf', 2, 2, NULL, 0, 1, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(3, 'cs101_lecture2.pdf', 'Lecture_2_Variables.pdf', '/course_materials/cs101/lecture2.pdf', 892467, 'application/pdf', 'pdf', 2, 2, NULL, 0, 1, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(4, 'cs201_syllabus.pdf', 'CS201_Syllabus.pdf', '/course_materials/cs201/syllabus.pdf', 612453, 'application/pdf', 'pdf', 3, 3, NULL, 0, 1, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(5, 'assignment1_spec.pdf', 'Assignment_1_Specifications.pdf', '/assignments/cs101/assign1.pdf', 234567, 'application/pdf', 'pdf', 2, 4, NULL, 0, 0, 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL);

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

--
-- Table structure for table `file_permissions`
--

DROP TABLE IF EXISTS `file_permissions`;
CREATE TABLE IF NOT EXISTS `file_permissions` (
  `permission_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `file_id` bigint UNSIGNED DEFAULT NULL,
  `folder_id` bigint UNSIGNED DEFAULT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `role_id` int UNSIGNED DEFAULT NULL,
  `permission_type` enum('read','write','delete','share') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `granted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `granted_by` bigint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`permission_id`),
  KEY `granted_by` (`granted_by`),
  KEY `idx_file` (`file_id`),
  KEY `idx_folder` (`folder_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_role` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `file_versions`
--

DROP TABLE IF EXISTS `file_versions`;
CREATE TABLE IF NOT EXISTS `file_versions` (
  `version_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `file_id` bigint UNSIGNED NOT NULL,
  `version_number` int NOT NULL,
  `file_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_size` bigint UNSIGNED DEFAULT NULL,
  `uploaded_by` bigint UNSIGNED NOT NULL,
  `change_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`version_id`),
  UNIQUE KEY `unique_file_version` (`file_id`,`version_number`),
  KEY `uploaded_by` (`uploaded_by`),
  KEY `idx_file` (`file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `folders`
--

DROP TABLE IF EXISTS `folders`;
CREATE TABLE IF NOT EXISTS `folders` (
  `folder_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `folder_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_folder_id` bigint UNSIGNED DEFAULT NULL,
  `created_by` bigint UNSIGNED NOT NULL,
  `path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `level` int DEFAULT '0',
  `is_system_folder` tinyint(1) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`folder_id`),
  KEY `idx_parent` (`parent_folder_id`),
  KEY `idx_creator` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `folders`
--

INSERT INTO `folders` (`folder_id`, `folder_name`, `parent_folder_id`, `created_by`, `path`, `level`, `is_system_folder`, `created_at`, `updated_at`) VALUES
(1, 'Course Materials', NULL, 1, '/course_materials', 0, 1, '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(2, 'CS101 Materials', NULL, 2, '/course_materials/cs101', 1, 0, '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(3, 'CS201 Materials', NULL, 3, '/course_materials/cs201', 1, 0, '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(4, 'Assignments', NULL, 1, '/assignments', 0, 1, '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(5, 'Student Submissions', NULL, 1, '/student_submissions', 0, 1, '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(7, 'MergeTestFolder', NULL, 59, NULL, 0, 0, '2026-03-02 14:05:02', '2026-03-02 14:05:02'),
(8, 'Lecture Notes', NULL, 59, NULL, 0, 0, '2026-03-02 23:33:11', '2026-03-02 23:33:11'),
(9, 'Test PM Folder', NULL, 59, NULL, 0, 0, '2026-03-02 23:42:38', '2026-03-02 23:42:38'),
(10, 'Test PM Folder', NULL, 59, NULL, 0, 0, '2026-03-02 23:47:21', '2026-03-02 23:47:21'),
(11, 'Lecture Notes', NULL, 59, NULL, 0, 0, '2026-03-02 23:51:58', '2026-03-02 23:51:58'),
(12, 'Lecture Notes', NULL, 59, NULL, 0, 0, '2026-03-03 00:23:19', '2026-03-03 00:23:19'),
(13, 'Lecture Notes', NULL, 59, NULL, 0, 0, '2026-03-03 18:34:04', '2026-03-03 18:34:04'),
(14, 'Lecture Notes', NULL, 59, NULL, 0, 0, '2026-03-05 19:16:25', '2026-03-05 19:16:25');

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

--
-- Table structure for table `forum_categories`
--

DROP TABLE IF EXISTS `forum_categories`;
CREATE TABLE IF NOT EXISTS `forum_categories` (
  `category_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `category_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `order_index` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`category_id`),
  KEY `idx_course` (`course_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `forum_categories`
--

INSERT INTO `forum_categories` (`category_id`, `course_id`, `category_name`, `description`, `order_index`, `created_at`) VALUES
(4, 2, 'General Discussion', 'General CS201 discussions', 1, '2025-11-20 13:43:00'),
(5, 2, 'Project Discussions', 'Discuss course projects', 2, '2025-11-20 13:43:00'),
(6, 1, 'Test Category', 'A test forum category', 5, '2026-03-05 19:16:32');

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

--
-- Table structure for table `generated_reports`
--

DROP TABLE IF EXISTS `generated_reports`;
CREATE TABLE IF NOT EXISTS `generated_reports` (
  `report_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `template_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `report_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `report_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `filters` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `file_id` bigint UNSIGNED DEFAULT NULL,
  `generation_status` enum('pending','processing','completed','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `generated_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`report_id`),
  KEY `template_id` (`template_id`),
  KEY `file_id` (`file_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`generation_status`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `generated_reports`
--

INSERT INTO `generated_reports` (`report_id`, `template_id`, `user_id`, `report_name`, `report_type`, `filters`, `file_id`, `generation_status`, `generated_at`, `created_at`) VALUES
(1, 1, 2, 'Alice Anderson Progress Report - Spring 2025', 'student', '{\"user_id\": 7, \"semester_id\": 2}', NULL, 'completed', '2025-02-15 08:00:00', '2025-11-20 13:43:00'),
(2, 2, 2, 'CS101 Section A Analytics', 'course', '{\"section_id\": 1, \"semester_id\": 2}', NULL, 'completed', '2025-02-14 13:30:00', '2025-11-20 13:43:00'),
(3, 3, 2, 'CS101 Attendance Report - February', 'attendance', '{\"section_id\": 1, \"month\": \"2025-02\"}', NULL, 'completed', '2025-02-28 07:00:00', '2025-11-20 13:43:00'),
(5, 1, 59, 'Test Report', 'student', '{\"courseId\":1}', NULL, 'completed', '2026-03-11 18:19:40', '2026-03-11 18:19:39'),
(6, 1, 59, 'Test Report', 'student', '{\"courseId\":1}', NULL, 'completed', '2026-03-11 18:23:02', '2026-03-11 18:23:02'),
(7, 1, 59, 'Test', 'student', '{}', NULL, 'completed', '2026-03-11 18:24:07', '2026-03-11 18:24:07'),
(8, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-11 18:29:29', '2026-03-11 18:29:28'),
(9, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-14 15:17:57', '2026-03-14 15:17:56'),
(10, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-14 15:36:14', '2026-03-14 15:36:14'),
(11, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-14 15:40:54', '2026-03-14 15:40:54'),
(12, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-14 16:06:16', '2026-03-14 16:06:16'),
(13, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-16 20:19:15', '2026-03-16 20:19:14'),
(14, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-16 20:20:20', '2026-03-16 20:20:20'),
(15, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-16 20:33:02', '2026-03-16 20:33:01'),
(16, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-16 20:45:28', '2026-03-16 20:45:27'),
(17, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-16 20:54:04', '2026-03-16 20:54:03'),
(18, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-16 22:31:40', '2026-03-16 22:31:39'),
(19, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-16 22:35:27', '2026-03-16 22:35:27'),
(20, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-16 23:59:17', '2026-03-16 23:59:17'),
(21, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-17 00:01:57', '2026-03-17 00:01:56'),
(22, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-17 00:21:58', '2026-03-17 00:21:58'),
(23, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-17 00:34:51', '2026-03-17 00:34:50'),
(24, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-17 00:50:36', '2026-03-17 00:50:35'),
(25, 1, 59, 'Test Student Progress Report', 'student', '{\"courseId\":1,\"semesterId\":2}', NULL, 'completed', '2026-03-17 00:57:22', '2026-03-17 00:57:21');

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

--
-- Table structure for table `gpa_calculations`
--

DROP TABLE IF EXISTS `gpa_calculations`;
CREATE TABLE IF NOT EXISTS `gpa_calculations` (
  `gpa_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `semester_id` bigint UNSIGNED DEFAULT NULL,
  `calculation_type` enum('semester','cumulative') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'semester',
  `gpa` decimal(3,2) NOT NULL,
  `total_credits` int DEFAULT NULL,
  `total_points` decimal(10,2) DEFAULT NULL,
  `calculated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`gpa_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_semester` (`semester_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `gpa_calculations`
--

INSERT INTO `gpa_calculations` (`gpa_id`, `user_id`, `semester_id`, `calculation_type`, `gpa`, `total_credits`, `total_points`, `calculated_at`) VALUES
(4, 7, NULL, 'cumulative', 3.78, 45, 170.10, '2025-02-15 21:59:59'),
(5, 8, NULL, 'cumulative', 3.52, 42, 147.84, '2025-02-15 21:59:59'),
(6, 57, 2, 'semester', 3.65, 15, 54.75, '2026-03-11 16:42:55'),
(7, 57, 4, 'semester', 3.80, 12, 45.60, '2026-03-11 16:42:55'),
(8, 57, NULL, 'cumulative', 3.72, 27, 100.35, '2026-03-11 16:42:55');

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

--
-- Table structure for table `grades`
--

DROP TABLE IF EXISTS `grades`;
CREATE TABLE IF NOT EXISTS `grades` (
  `grade_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED NOT NULL,
  `assignment_id` bigint UNSIGNED DEFAULT NULL,
  `quiz_id` bigint UNSIGNED DEFAULT NULL,
  `lab_id` bigint UNSIGNED DEFAULT NULL,
  `grade_type` enum('assignment','quiz','lab','exam','participation','final') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `score` decimal(5,2) NOT NULL,
  `max_score` decimal(5,2) NOT NULL,
  `percentage` decimal(5,2) DEFAULT NULL,
  `letter_grade` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `feedback` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `graded_by` bigint UNSIGNED DEFAULT NULL,
  `graded_at` timestamp NULL DEFAULT NULL,
  `is_published` tinyint(1) DEFAULT '0',
  `published_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`grade_id`),
  KEY `assignment_id` (`assignment_id`),
  KEY `quiz_id` (`quiz_id`),
  KEY `lab_id` (`lab_id`),
  KEY `graded_by` (`graded_by`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_type` (`grade_type`),
  KEY `idx_published` (`is_published`),
  KEY `idx_user_course` (`user_id`,`course_id`),
  KEY `idx_course_published` (`course_id`,`is_published`),
  KEY `idx_user_published` (`user_id`,`is_published`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `grades`
--

INSERT INTO `grades` (`grade_id`, `user_id`, `course_id`, `assignment_id`, `quiz_id`, `lab_id`, `grade_type`, `score`, `max_score`, `percentage`, `letter_grade`, `feedback`, `graded_by`, `graded_at`, `is_published`, `published_at`, `created_at`, `updated_at`) VALUES
(6, 21, 1, 1, NULL, NULL, 'assignment', 92.00, 100.00, 92.00, 'A', 'Great work! Well-structured code.', 8, '2025-02-01 10:00:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(7, 22, 1, 1, NULL, NULL, 'assignment', 88.00, 100.00, 88.00, 'B+', 'Good solution. Need improvement in error handling.', 8, '2025-02-01 10:00:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(8, 23, 1, 1, NULL, NULL, 'assignment', 95.00, 100.00, 95.00, 'A', 'Excellent! Clean code and thorough testing.', 8, '2025-02-01 10:00:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(9, 24, 1, 1, NULL, NULL, 'assignment', 85.00, 100.00, 85.00, 'B', 'Acceptable solution but could be optimized.', 8, '2025-02-02 09:00:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(10, 25, 1, 1, NULL, NULL, 'assignment', 90.00, 100.00, 90.00, 'A-', 'Good job overall.', 8, '2025-02-01 10:00:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(11, 21, 1, NULL, NULL, NULL, 'quiz', 18.00, 20.00, 90.00, 'A-', 'Well done on the quiz!', 8, '2025-02-03 10:30:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(12, 22, 1, NULL, NULL, NULL, 'quiz', 16.00, 20.00, 80.00, 'B-', 'Good effort. Review control flow concepts.', 8, '2025-02-03 10:30:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(13, 23, 1, NULL, NULL, NULL, 'quiz', 19.00, 20.00, 95.00, 'A', 'Perfect score! Excellent understanding.', 8, '2025-02-03 10:30:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(14, 24, 1, NULL, NULL, NULL, 'quiz', 15.00, 20.00, 75.00, 'C+', 'Needs improvement. Review material.', 8, '2025-02-03 10:30:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(15, 25, 1, NULL, NULL, NULL, 'quiz', 17.00, 20.00, 85.00, 'B+', 'Good work on the quiz.', 8, '2025-02-03 10:30:00', 1, NULL, '2026-03-01 14:55:40', '2026-03-01 14:55:40'),
(16, 57, 1, 1, NULL, NULL, 'assignment', 85.00, 100.00, 85.00, 'A', 'Great work on programming basics!', 2, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(17, 57, 1, 2, NULL, NULL, 'assignment', 78.00, 100.00, 78.00, 'B+', 'Good understanding of functions.', 2, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(18, 57, 1, NULL, NULL, NULL, 'quiz', 90.00, 100.00, 90.00, 'A', 'Excellent quiz performance.', 2, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(19, 57, 1, NULL, NULL, NULL, 'exam', 88.00, 100.00, 88.00, 'A', 'Strong midterm showing.', 2, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(20, 57, 1, NULL, NULL, NULL, 'participation', 95.00, 100.00, 95.00, 'A+', 'Active participant.', 2, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(21, 57, 2, NULL, NULL, NULL, 'assignment', 92.00, 100.00, 92.00, 'A', 'Excellent data structures work.', 3, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(22, 57, 2, NULL, NULL, NULL, 'quiz', 88.00, 100.00, 88.00, 'A', 'Great quiz results.', 3, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(23, 57, 2, NULL, NULL, NULL, 'exam', 82.00, 100.00, 82.00, 'B+', 'Good exam performance.', 3, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(24, 57, 3, NULL, NULL, NULL, 'assignment', 75.00, 100.00, 75.00, 'B', 'Solid database work.', 4, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(25, 57, 3, NULL, NULL, NULL, 'exam', 80.00, 100.00, 80.00, 'B+', 'Good understanding of SQL.', 4, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(26, 57, 4, NULL, NULL, NULL, 'assignment', 95.00, 100.00, 95.00, 'A+', 'Outstanding AI concepts paper.', 2, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(27, 57, 4, NULL, NULL, NULL, 'quiz', 91.00, 100.00, 91.00, 'A', 'Great AI quiz.', 2, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55'),
(28, 57, 5, NULL, NULL, NULL, 'exam', 87.00, 100.00, 87.00, 'A', 'Good calculus exam.', 2, '2026-03-11 16:42:55', 1, '2026-03-11 16:42:55', '2026-03-11 16:42:55', '2026-03-11 16:42:55');

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

--
-- Table structure for table `grade_components`
--

DROP TABLE IF EXISTS `grade_components`;
CREATE TABLE IF NOT EXISTS `grade_components` (
  `component_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `grade_id` bigint UNSIGNED NOT NULL,
  `rubric_id` bigint UNSIGNED DEFAULT NULL,
  `criterion_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `points_earned` decimal(5,2) NOT NULL,
  `max_points` decimal(5,2) NOT NULL,
  `feedback` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`component_id`),
  KEY `rubric_id` (`rubric_id`),
  KEY `idx_grade` (`grade_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `image_text_extractions`
--

DROP TABLE IF EXISTS `image_text_extractions`;
CREATE TABLE IF NOT EXISTS `image_text_extractions` (
  `extraction_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `image_file_id` bigint UNSIGNED NOT NULL,
  `extracted_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `language` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'en',
  `confidence_score` decimal(3,2) DEFAULT NULL,
  `processing_status` enum('pending','completed','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'completed',
  `processing_time_ms` int DEFAULT NULL,
  `ai_model` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`extraction_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_file` (`image_file_id`),
  KEY `idx_status` (`processing_status`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `image_text_extractions`
--

INSERT INTO `image_text_extractions` (`extraction_id`, `user_id`, `image_file_id`, `extracted_text`, `language`, `confidence_score`, `processing_status`, `processing_time_ms`, `ai_model`, `created_at`) VALUES
(1, 7, 3, 'Variables in Python: int, float, str, bool. Variable naming conventions: use lowercase with underscores.', 'en', 0.89, 'completed', 1800, 'tesseract-ocr', '2025-11-20 13:43:00'),
(2, 8, 2, 'Lecture 1: Introduction to Programming. Topics: What is programming? Programming languages. Python basics.', 'en', 0.92, 'completed', 2200, 'tesseract-ocr', '2025-11-20 13:43:00');

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

--
-- Table structure for table `labs`
--

DROP TABLE IF EXISTS `labs`;
CREATE TABLE IF NOT EXISTS `labs` (
  `lab_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `lab_number` int DEFAULT NULL,
  `due_date` timestamp NULL DEFAULT NULL,
  `available_from` timestamp NULL DEFAULT NULL,
  `max_score` decimal(5,2) DEFAULT '100.00',
  `weight` decimal(5,2) DEFAULT '0.00',
  `status` enum('draft','published','closed','archived') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'draft',
  `created_by` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`lab_id`),
  KEY `created_by` (`created_by`),
  KEY `idx_course` (`course_id`),
  KEY `idx_due_date` (`due_date`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `labs`
--

INSERT INTO `labs` (`lab_id`, `course_id`, `title`, `description`, `lab_number`, `due_date`, `available_from`, `max_score`, `weight`, `status`, `created_by`, `created_at`, `updated_at`) VALUES
(3, 2, 'Updated Lab Title', 'Implement dynamic arrays', 1, '2025-03-01 21:59:59', '2025-02-14 22:00:00', 100.00, 10.00, 'draft', 3, '2025-11-20 13:43:00', '2026-03-11 17:20:08'),
(4, 1, 'Data Structures Lab 1 (Updated)', 'Updated description', 1, '2026-04-01 23:59:59', '2026-03-01 00:00:00', 100.00, 10.00, 'published', 58, '2026-03-03 00:09:55', '2026-03-03 00:09:58'),
(7, 1, 'Data Structures Lab 1', 'Binary tree traversal lab', 1, '2026-04-01 23:59:59', '2026-03-01 00:00:00', 100.00, 10.00, 'published', 58, '2026-03-03 00:26:01', '2026-03-03 00:26:01'),
(8, 1, 'Data Structures Lab 1', 'Binary tree traversal lab', 1, '2026-04-01 23:59:59', '2026-03-01 00:00:00', 100.00, 10.00, 'published', 58, '2026-03-03 18:34:08', '2026-03-03 18:34:08'),
(9, 1, 'Data Structures Lab 1', 'Binary tree traversal lab', 1, '2026-04-01 23:59:59', '2026-03-01 00:00:00', 100.00, 10.00, 'published', 58, '2026-03-05 19:16:28', '2026-03-05 19:16:28'),
(10, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-11 17:20:08', '2026-03-11 17:20:08'),
(11, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-11 17:37:54', '2026-03-11 17:37:54'),
(12, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-14 15:17:50', '2026-03-14 15:17:50'),
(13, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-14 15:36:07', '2026-03-14 15:36:07'),
(14, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-14 15:40:47', '2026-03-14 15:40:47'),
(15, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-14 16:06:09', '2026-03-14 16:06:09'),
(16, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-16 20:19:07', '2026-03-16 20:19:07'),
(17, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-16 20:20:13', '2026-03-16 20:20:13'),
(18, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-16 20:32:54', '2026-03-16 20:32:54'),
(19, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-16 20:45:20', '2026-03-16 20:45:20'),
(20, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-16 20:53:56', '2026-03-16 20:53:56'),
(21, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-16 22:31:32', '2026-03-16 22:31:32'),
(22, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-16 22:35:20', '2026-03-16 22:35:20'),
(23, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-16 23:59:09', '2026-03-16 23:59:09'),
(24, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-17 00:01:49', '2026-03-17 00:01:49'),
(25, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-17 00:21:50', '2026-03-17 00:21:50'),
(26, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-17 00:34:43', '2026-03-17 00:34:43'),
(27, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-17 00:50:28', '2026-03-17 00:50:28'),
(28, 1, 'API Dog Test Lab', 'Test lab', NULL, '2026-06-15 23:59:00', NULL, 100.00, 0.00, 'draft', 59, '2026-03-17 00:57:14', '2026-03-17 00:57:14');

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

--
-- Table structure for table `lab_attendance`
--

DROP TABLE IF EXISTS `lab_attendance`;
CREATE TABLE IF NOT EXISTS `lab_attendance` (
  `attendance_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `lab_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `attendance_status` enum('present','absent','excused','late') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'absent',
  `check_in_time` timestamp NULL DEFAULT NULL,
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `marked_by` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`attendance_id`),
  UNIQUE KEY `unique_lab_user` (`lab_id`,`user_id`),
  KEY `marked_by` (`marked_by`),
  KEY `idx_lab` (`lab_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `lab_attendance`
--

INSERT INTO `lab_attendance` (`attendance_id`, `lab_id`, `user_id`, `attendance_status`, `check_in_time`, `notes`, `marked_by`, `created_at`) VALUES
(7, 4, 57, 'present', '2026-03-03 00:10:05', 'On time', 58, '2026-03-03 00:10:05'),
(8, 7, 57, 'present', '2026-03-03 00:27:50', 'On time', 58, '2026-03-03 00:27:50');

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

--
-- Table structure for table `lab_instructions`
--

DROP TABLE IF EXISTS `lab_instructions`;
CREATE TABLE IF NOT EXISTS `lab_instructions` (
  `instruction_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `lab_id` bigint UNSIGNED NOT NULL,
  `file_id` bigint UNSIGNED DEFAULT NULL,
  `instruction_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `order_index` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`instruction_id`),
  KEY `file_id` (`file_id`),
  KEY `idx_lab` (`lab_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `lab_instructions`
--

INSERT INTO `lab_instructions` (`instruction_id`, `lab_id`, `file_id`, `instruction_text`, `order_index`, `created_at`) VALUES
(7, 3, NULL, 'Implement a dynamic array class with push, pop, and resize methods', 1, '2025-11-20 13:43:00'),
(8, 4, NULL, 'Step 1: Implement the binary tree node class', 1, '2026-03-03 00:09:59'),
(9, 7, NULL, 'Step 1: Implement the binary tree node class', 1, '2026-03-03 00:26:30');

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

--
-- Table structure for table `lab_submissions`
--

DROP TABLE IF EXISTS `lab_submissions`;
CREATE TABLE IF NOT EXISTS `lab_submissions` (
  `submission_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `lab_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `file_id` bigint UNSIGNED DEFAULT NULL,
  `submission_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `submitted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `is_late` tinyint(1) DEFAULT '0',
  `status` enum('submitted','graded','returned','resubmit') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'submitted',
  PRIMARY KEY (`submission_id`),
  KEY `file_id` (`file_id`),
  KEY `idx_lab` (`lab_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `lab_submissions`
--

INSERT INTO `lab_submissions` (`submission_id`, `lab_id`, `user_id`, `file_id`, `submission_text`, `submitted_at`, `is_late`, `status`) VALUES
(5, 4, 57, NULL, 'My binary tree implementation...', '2026-03-03 00:10:01', 0, 'graded'),
(6, 7, 57, NULL, 'My binary tree implementation with inorder, preorder, and postorder traversals.', '2026-03-03 00:26:48', 0, 'submitted');

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

--
-- Table structure for table `language_preferences`
--

DROP TABLE IF EXISTS `language_preferences`;
CREATE TABLE IF NOT EXISTS `language_preferences` (
  `preference_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `language_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'en',
  `date_format` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'YYYY-MM-DD',
  `time_format` enum('12h','24h') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '24h',
  `timezone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'UTC',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`preference_id`),
  UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `language_preferences`
--

INSERT INTO `language_preferences` (`preference_id`, `user_id`, `language_code`, `date_format`, `time_format`, `timezone`, `updated_at`) VALUES
(1, 7, 'en', 'YYYY-MM-DD', '24h', 'America/New_York', '2025-11-20 13:43:00'),
(2, 8, 'en', 'MM/DD/YYYY', '12h', 'America/New_York', '2025-11-20 13:43:00'),
(3, 9, 'en', 'YYYY-MM-DD', '24h', 'America/Los_Angeles', '2025-11-20 13:43:00'),
(4, 10, 'en', 'DD/MM/YYYY', '24h', 'America/Chicago', '2025-11-20 13:43:00'),
(5, 11, 'en', 'YYYY-MM-DD', '12h', 'America/New_York', '2025-11-20 13:43:00'),
(6, 12, 'en', 'MM/DD/YYYY', '24h', 'America/New_York', '2025-11-20 13:43:00');

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

--
-- Table structure for table `leaderboards`
--

DROP TABLE IF EXISTS `leaderboards`;
CREATE TABLE IF NOT EXISTS `leaderboards` (
  `leaderboard_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `leaderboard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `leaderboard_type` enum('global','course','semester','department') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `course_id` bigint UNSIGNED DEFAULT NULL,
  `semester_id` bigint UNSIGNED DEFAULT NULL,
  `department_id` bigint UNSIGNED DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `status` enum('active','archived') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`leaderboard_id`),
  KEY `department_id` (`department_id`),
  KEY `idx_type` (`leaderboard_type`),
  KEY `idx_course` (`course_id`),
  KEY `idx_semester` (`semester_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `leaderboard_rankings`
--

DROP TABLE IF EXISTS `leaderboard_rankings`;
CREATE TABLE IF NOT EXISTS `leaderboard_rankings` (
  `ranking_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `leaderboard_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `rank_position` int NOT NULL,
  `total_points` bigint NOT NULL,
  `previous_rank` int DEFAULT NULL,
  `rank_change` int DEFAULT '0',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ranking_id`),
  UNIQUE KEY `unique_leaderboard_user` (`leaderboard_id`,`user_id`),
  KEY `idx_leaderboard` (`leaderboard_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_rank` (`rank_position`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `learning_analytics`
--

DROP TABLE IF EXISTS `learning_analytics`;
CREATE TABLE IF NOT EXISTS `learning_analytics` (
  `analytics_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED NOT NULL,
  `progress_id` bigint UNSIGNED DEFAULT NULL,
  `metric_type` enum('engagement','performance','participation','time') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `metric_value` decimal(10,2) NOT NULL,
  `metric_date` date NOT NULL,
  `additional_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`analytics_id`),
  KEY `progress_id` (`progress_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_date` (`metric_date`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `learning_analytics`
--

INSERT INTO `learning_analytics` (`analytics_id`, `user_id`, `course_id`, `progress_id`, `metric_type`, `metric_value`, `metric_date`, `additional_data`, `created_at`) VALUES
(1, 57, 1, NULL, 'engagement', 72.50, '2026-03-11', '{\"logins\": 15, \"views\": 45, \"submissions\": 8}', '2026-03-11 18:12:04'),
(2, 57, 1, NULL, 'performance', 78.50, '2026-03-11', '{\"assignments_avg\": 80, \"quizzes_avg\": 75}', '2026-03-11 18:12:04'),
(3, 57, 2, NULL, 'engagement', 65.00, '2026-03-11', '{\"logins\": 10, \"views\": 30, \"submissions\": 5}', '2026-03-11 18:12:04'),
(4, 57, 2, NULL, 'participation', 80.00, '2026-03-11', '{\"discussions\": 12, \"comments\": 25}', '2026-03-11 18:12:04'),
(5, 57, 3, NULL, 'time', 560.00, '2026-03-11', '{\"avg_session_minutes\": 45, \"total_sessions\": 12}', '2026-03-11 18:12:04'),
(6, 57, 3, NULL, 'performance', 91.25, '2026-03-11', '{\"assignments_avg\": 92, \"quizzes_avg\": 90}', '2026-03-11 18:12:04');

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

--
-- Table structure for table `lecture_sections_labs`
--

DROP TABLE IF EXISTS `lecture_sections_labs`;
CREATE TABLE IF NOT EXISTS `lecture_sections_labs` (
  `organization_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `material_id` bigint UNSIGNED DEFAULT NULL,
  `organization_type` enum('lecture','section','lab','tutorial') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `week_number` int DEFAULT NULL,
  `order_index` int DEFAULT '0',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`organization_id`),
  KEY `material_id` (`material_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_type` (`organization_type`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `lecture_sections_labs`
--

INSERT INTO `lecture_sections_labs` (`organization_id`, `course_id`, `material_id`, `organization_type`, `title`, `week_number`, `order_index`, `description`, `created_at`, `updated_at`) VALUES
(5, 2, NULL, 'lecture', 'Week 1: Arrays Introduction', 1, 1, 'Introduction to arrays and lists', '2025-11-20 13:43:01', '2026-03-10 19:52:36'),
(6, 2, NULL, 'lab', 'Week 2: Array Operations Lab', 2, 2, 'Hands-on practice with arrays', '2025-11-20 13:43:01', '2026-03-10 19:52:36'),
(7, 1, NULL, 'lecture', 'Week 1 Lecture: Introduction', 1, 0, 'Course introduction and overview', '2026-03-10 20:09:45', '2026-03-17 00:57:06'),
(8, 1, NULL, 'lab', 'Week 1 Lab: Setup', 1, 1, 'Development environment setup', '2026-03-10 20:09:46', '2026-03-17 00:57:06'),
(9, 1, NULL, 'lecture', 'Week 2 Lecture: Variables', 2, 2, 'Variables and data types', '2026-03-10 20:09:46', '2026-03-17 00:57:06'),
(10, 1, NULL, 'section', 'Week 2 Discussion: Best Practices', 2, 3, 'Discussion on coding standards', '2026-03-10 20:09:46', '2026-03-17 00:57:06'),
(11, 1, NULL, 'lecture', 'Week 3 Lecture: Control Flow', 3, 4, 'If statements and loops', '2026-03-10 20:09:46', '2026-03-17 00:57:06'),
(12, 1, NULL, 'tutorial', 'Week 3 Tutorial: Practice', 3, 5, 'Guided practice session', '2026-03-10 20:09:46', '2026-03-17 00:57:06'),
(15, 1, NULL, 'lecture', 'Week 10: API Dog Test', 10, 99, NULL, '2026-03-14 15:17:43', '2026-03-14 15:17:43');

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

--
-- Table structure for table `live_sessions`
--

DROP TABLE IF EXISTS `live_sessions`;
CREATE TABLE IF NOT EXISTS `live_sessions` (
  `session_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `instructor_id` bigint UNSIGNED NOT NULL,
  `session_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `session_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `recording_file_id` bigint UNSIGNED DEFAULT NULL,
  `participant_count` int DEFAULT '0',
  `status` enum('scheduled','live','ended','cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`session_id`),
  KEY `recording_file_id` (`recording_file_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_instructor` (`instructor_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `live_sessions`
--

INSERT INTO `live_sessions` (`session_id`, `course_id`, `instructor_id`, `session_title`, `session_url`, `start_time`, `end_time`, `recording_file_id`, `participant_count`, `status`, `created_at`) VALUES
(2, 2, 3, 'Data Structures Q&A', 'https://meet.campus.edu/cs201-qa-1', '2025-02-22 15:00:00', '2025-02-22 16:00:00', NULL, 8, 'ended', '2025-11-20 13:43:00');

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

--
-- Table structure for table `live_session_participants`
--

DROP TABLE IF EXISTS `live_session_participants`;
CREATE TABLE IF NOT EXISTS `live_session_participants` (
  `participant_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `session_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `joined_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `left_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `participation_score` decimal(5,2) DEFAULT NULL,
  PRIMARY KEY (`participant_id`),
  UNIQUE KEY `unique_session_user` (`session_id`,`user_id`),
  KEY `idx_session` (`session_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `live_session_participants`
--

INSERT INTO `live_session_participants` (`participant_id`, `session_id`, `user_id`, `joined_at`, `left_at`, `participation_score`) VALUES
(4, 2, 12, '2025-02-22 15:00:00', '2025-02-22 16:00:00', 92.00),
(5, 2, 13, '2025-02-22 15:03:00', '2025-02-22 15:45:00', 75.00);

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

--
-- Table structure for table `localization_strings`
--

DROP TABLE IF EXISTS `localization_strings`;
CREATE TABLE IF NOT EXISTS `localization_strings` (
  `string_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `language_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `string_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `string_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `context` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`string_id`),
  UNIQUE KEY `unique_lang_key` (`language_code`,`string_key`),
  KEY `idx_language` (`language_code`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `localization_strings`
--

INSERT INTO `localization_strings` (`string_id`, `language_code`, `string_key`, `string_value`, `context`, `created_at`, `updated_at`) VALUES
(1, 'en', 'dashboard.welcome', 'Welcome back', 'dashboard', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(2, 'es', 'dashboard.welcome', 'Bienvenido de nuevo', 'dashboard', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(3, 'fr', 'dashboard.welcome', 'Bon retour', 'dashboard', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(4, 'en', 'course.assignments', 'Assignments', 'courses', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(5, 'es', 'course.assignments', 'Tareas', 'courses', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(6, 'fr', 'course.assignments', 'Devoirs', 'courses', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(7, 'en', 'grade.submitted', 'Grade submitted successfully', 'grading', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(8, 'es', 'grade.submitted', 'Calificaci??n enviada exitosamente', 'grading', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(9, 'ar', 'dashboard.welcome', '?????????? ????????????', 'dashboard', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(10, 'ar', 'course.assignments', '????????????????', 'courses', '2025-11-20 13:43:01', '2025-11-20 13:43:01');

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

--
-- Table structure for table `login_attempts`
--

DROP TABLE IF EXISTS `login_attempts`;
CREATE TABLE IF NOT EXISTS `login_attempts` (
  `attempt_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `attempt_status` enum('success','failed','blocked') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `failure_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `attempted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`attempt_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_email` (`email`),
  KEY `idx_ip` (`ip_address`),
  KEY `idx_date` (`attempted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `login_attempts`
--

INSERT INTO `login_attempts` (`attempt_id`, `user_id`, `email`, `ip_address`, `user_agent`, `attempt_status`, `failure_reason`, `attempted_at`) VALUES
(1, 7, 'alice.student@campus.edu', '192.168.1.100', NULL, 'success', NULL, '2025-11-20 13:43:00'),
(2, 8, 'bob.student@campus.edu', '192.168.1.101', NULL, 'success', NULL, '2025-11-20 13:43:00'),
(3, NULL, 'wrong@email.com', '192.168.1.200', NULL, 'failed', 'Invalid email', '2025-11-20 13:43:00'),
(4, 9, 'carol.student@campus.edu', '192.168.1.102', NULL, 'failed', 'Wrong password', '2025-11-20 13:43:00'),
(5, 9, 'carol.student@campus.edu', '192.168.1.102', NULL, 'success', NULL, '2025-11-20 13:43:00'),
(6, NULL, 'admin@campus.edu', '203.0.113.45', NULL, 'failed', 'Wrong password', '2025-11-20 13:43:00'),
(7, NULL, 'admin@campus.edu', '203.0.113.45', NULL, 'blocked', 'Too many failed attempts', '2025-11-20 13:43:00');

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

--
-- Table structure for table `material_downloads`
--

DROP TABLE IF EXISTS `material_downloads`;
CREATE TABLE IF NOT EXISTS `material_downloads` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `material_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `downloaded_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_material_downloads_material` (`material_id`),
  KEY `idx_material_downloads_user` (`user_id`),
  KEY `idx_material_downloads_time` (`downloaded_at`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `material_downloads`
--

INSERT INTO `material_downloads` (`id`, `material_id`, `user_id`, `downloaded_at`) VALUES
(1, 16, 7, '2026-02-27 20:09:46'),
(2, 21, 7, '2026-03-10 20:09:46');

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

--
-- Table structure for table `material_views`
--

DROP TABLE IF EXISTS `material_views`;
CREATE TABLE IF NOT EXISTS `material_views` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `material_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `viewed_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_material_views_material` (`material_id`),
  KEY `idx_material_views_user` (`user_id`),
  KEY `idx_material_views_time` (`viewed_at`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `material_views`
--

INSERT INTO `material_views` (`id`, `material_id`, `user_id`, `viewed_at`) VALUES
(1, 15, 7, '2026-02-17 20:09:46'),
(2, 16, 7, '2026-02-25 20:09:46'),
(3, 17, 7, '2026-03-06 20:09:46'),
(4, 18, 7, '2026-02-28 20:09:46'),
(5, 20, 7, '2026-03-02 20:09:46');

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

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

DROP TABLE IF EXISTS `messages`;
CREATE TABLE IF NOT EXISTS `messages` (
  `message_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `sender_id` bigint UNSIGNED NOT NULL,
  `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `message_type` enum('direct','group','announcement') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'direct',
  `parent_message_id` bigint UNSIGNED DEFAULT NULL,
  `reply_to_id` bigint UNSIGNED DEFAULT NULL,
  `read_status` tinyint(1) DEFAULT '0',
  `sent_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `edited_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`message_id`),
  KEY `parent_message_id` (`parent_message_id`),
  KEY `idx_sender` (`sender_id`),
  KEY `idx_sent` (`sent_at`),
  KEY `idx_sender_type` (`sender_id`,`message_type`),
  KEY `idx_sent_read` (`sent_at`,`read_status`),
  KEY `fk_messages_reply_to` (`reply_to_id`)
) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `messages`
--

INSERT INTO `messages` (`message_id`, `sender_id`, `subject`, `body`, `message_type`, `parent_message_id`, `reply_to_id`, `read_status`, `sent_at`, `edited_at`) VALUES
(1, 2, 'Welcome to CS101', 'Welcome to Introduction to Programming! I look forward to working with you this semester.', 'announcement', NULL, NULL, 0, '2025-11-20 13:43:00', NULL),
(2, 7, 'Question about Assignment 1', 'Professor Smith, I have a question about the first assignment. Can we use external libraries?', 'direct', NULL, NULL, 1, '2025-11-20 13:43:00', NULL),
(3, 2, 'RE: Question about Assignment 1', 'For this assignment, please use only built-in Python functions.', 'direct', NULL, NULL, 0, '2025-11-20 13:43:00', NULL),
(4, 3, 'CS201 Project Groups', 'Please form groups of 3-4 students for the final project.', 'announcement', NULL, NULL, 0, '2025-11-20 13:43:00', NULL),
(5, 22, 'Grade Discussion', 'I would like to discuss my quiz score from last week.', 'direct', NULL, NULL, 0, '2025-02-08 16:20:00', NULL),
(6, 57, NULL, 'Hey instructor, I have a question about Assignment 1.', 'direct', NULL, NULL, 0, '2026-03-03 18:12:53', NULL),
(7, 58, 'CS101 Study Group', 'Welcome to the CS101 Study Group!', 'group', NULL, NULL, 0, '2026-03-03 18:13:00', NULL),
(8, 58, NULL, 'Sure, what is your question about Assignment 1?', 'direct', 6, NULL, 0, '2026-03-03 18:16:50', NULL),
(9, 57, NULL, '__DELETED__', 'direct', 7, NULL, 0, '2026-03-03 18:18:28', NULL),
(10, 57, NULL, 'This message will be deleted for everyone', 'direct', 6, NULL, 0, '2026-03-03 18:18:53', NULL),
(11, 57, NULL, '__DELETED__', 'direct', 6, NULL, 0, '2026-03-03 18:20:17', NULL),
(12, 59, NULL, 'Hi TA, please check lab grades.', 'direct', NULL, NULL, 0, '2026-03-03 18:23:55', NULL),
(13, 59, 'Staff Meeting Room', 'Staff meeting discussion', 'group', NULL, NULL, 0, '2026-03-03 18:23:56', NULL),
(14, 60, NULL, 'Sure, I will check them right away.', 'direct', 12, NULL, 0, '2026-03-03 18:23:59', NULL),
(15, 59, NULL, 'Temporary message for deletion test', 'direct', 12, NULL, 0, '2026-03-03 18:24:01', NULL),
(16, 59, NULL, '__DELETED__', 'direct', 12, NULL, 0, '2026-03-03 18:24:02', NULL),
(17, 57, NULL, 'Hi professor, I have a question about the midterm format.', 'direct', 6, NULL, 0, '2026-03-03 18:34:10', NULL),
(18, 58, 'CS201 Project Team', 'Welcome to our project discussion group!', 'group', NULL, NULL, 0, '2026-03-03 18:34:10', NULL),
(19, 58, NULL, 'The midterm will be multiple choice and short answer. Focus on chapters 3-8.', 'direct', 6, NULL, 0, '2026-03-03 18:34:10', NULL),
(20, 57, '{\"fileId\":1}', 'Here is my draft for review', 'direct', 6, NULL, 0, '2026-03-03 18:34:10', NULL),
(21, 57, NULL, 'Hi professor, I have a question about the midterm format.', 'direct', 6, NULL, 0, '2026-03-05 19:16:29', NULL),
(22, 58, 'CS201 Project Team', 'Welcome to our project discussion group!', 'group', NULL, NULL, 0, '2026-03-05 19:16:29', NULL),
(23, 58, NULL, 'The midterm will be multiple choice and short answer. Focus on chapters 3-8.', 'direct', 6, NULL, 0, '2026-03-05 19:16:30', NULL),
(24, 57, '{\"fileId\":1}', 'Here is my draft for review', 'direct', 6, NULL, 0, '2026-03-05 19:16:30', NULL),
(25, 57, NULL, 'Hello', 'direct', 21, NULL, 0, '2026-03-10 14:21:19', NULL),
(26, 58, NULL, 'Hi', 'direct', 21, NULL, 0, '2026-03-10 14:21:23', NULL),
(27, 57, NULL, 'Why it is sent 2 times for me ?', 'direct', 21, NULL, 0, '2026-03-10 14:21:40', NULL),
(28, 58, NULL, 'Me too idk', 'direct', 21, NULL, 0, '2026-03-10 14:21:45', NULL),
(29, 57, NULL, '__DELETED__', 'direct', 21, NULL, 0, '2026-03-10 14:21:57', NULL),
(30, 58, NULL, 'Oh it is deleted succeffully', 'direct', 21, NULL, 0, '2026-03-10 14:22:21', NULL),
(31, 57, NULL, 'IK wow', 'direct', 21, NULL, 0, '2026-03-10 14:22:27', NULL),
(32, 58, NULL, 'Helelo', 'direct', 21, NULL, 0, '2026-03-10 14:23:00', NULL),
(33, 58, '{\"fileId\":2}', 'How to replay thoo', 'direct', 21, NULL, 0, '2026-03-10 14:23:37', NULL),
(34, 57, NULL, 'Idk', 'direct', 21, NULL, 0, '2026-03-10 14:23:43', NULL),
(35, 57, NULL, 'Hello', 'direct', 21, NULL, 0, '2026-03-10 14:24:55', NULL),
(36, 58, NULL, 'Hi', 'direct', 21, NULL, 0, '2026-03-10 14:24:58', NULL),
(37, 57, NULL, '__DELETED__', 'direct', 21, NULL, 0, '2026-03-10 14:25:06', NULL),
(38, 57, NULL, 'Delete for me', 'direct', 21, NULL, 0, '2026-03-10 14:25:16', NULL),
(39, 57, NULL, 'How to replay', 'direct', 21, NULL, 0, '2026-03-10 14:25:44', NULL),
(40, 57, NULL, '12', 'direct', 21, NULL, 0, '2026-03-10 14:25:54', NULL),
(41, 57, NULL, 'How to know if itis readed or not', 'direct', 21, NULL, 0, '2026-03-10 14:26:19', NULL),
(42, 57, NULL, 'اهلا', 'direct', 21, NULL, 0, '2026-03-10 14:34:11', NULL),
(43, 58, NULL, 'هلا', 'direct', 21, NULL, 0, '2026-03-10 14:34:15', NULL),
(44, 58, NULL, 'ريبلاي', 'direct', 21, NULL, 0, '2026-03-10 14:34:25', NULL),
(45, 57, NULL, 'طب ليه مش بل=ايت', 'direct', 21, NULL, 0, '2026-03-10 14:34:37', NULL),
(46, 57, NULL, 'Replay to this', 'direct', 21, NULL, 0, '2026-03-10 14:34:58', NULL),
(47, 58, NULL, 'Replayed', 'direct', 21, NULL, 0, '2026-03-10 14:35:08', NULL),
(48, 58, NULL, 'why not showing that i replayed ?', 'direct', 21, NULL, 0, '2026-03-10 14:35:16', NULL),
(49, 57, NULL, 'Hi', 'direct', 21, NULL, 0, '2026-03-10 14:37:42', NULL),
(50, 57, NULL, 'Hi', 'direct', 21, NULL, 0, '2026-03-10 14:37:57', NULL),
(51, 58, NULL, 'Hello', 'direct', 21, NULL, 0, '2026-03-10 14:38:00', NULL),
(52, 57, NULL, 'Replay to me', 'direct', 21, NULL, 0, '2026-03-10 14:38:04', NULL),
(53, 58, NULL, 'Replayed', 'direct', 21, NULL, 0, '2026-03-10 14:38:09', NULL),
(54, 57, NULL, 'Still not visulaized', 'direct', 21, NULL, 0, '2026-03-10 14:38:17', NULL),
(55, 57, NULL, '__DELETED__', 'direct', 21, NULL, 0, '2026-03-10 14:38:22', NULL),
(56, 57, NULL, 'DELETE FOR ME ONLY', 'direct', 21, NULL, 0, '2026-03-10 14:38:47', NULL),
(57, 57, NULL, 'hellp', 'direct', 6, NULL, 0, '2026-03-10 14:56:31', NULL),
(58, 57, NULL, 'Hello', 'direct', 6, NULL, 0, '2026-03-10 14:56:46', NULL),
(59, 58, NULL, 'Hi', 'direct', 6, NULL, 0, '2026-03-10 14:56:52', NULL),
(60, 57, NULL, 'لا', 'direct', 6, NULL, 0, '2026-03-10 14:59:44', NULL),
(61, 58, NULL, 'طب ما كدا فرونت اند بس', 'direct', 6, NULL, 0, '2026-03-10 14:59:53', NULL),
(62, 57, NULL, 'Hi', 'direct', 6, NULL, 0, '2026-03-10 15:37:30', NULL),
(63, 57, NULL, '__DELETED__', 'direct', 6, NULL, 0, '2026-03-10 15:37:34', NULL),
(64, 58, NULL, 'Hello Tarek', 'direct', 6, NULL, 0, '2026-03-10 15:37:40', NULL),
(65, 58, NULL, 'GN', 'direct', 6, NULL, 0, '2026-03-10 15:37:58', NULL),
(66, 57, NULL, '__DELETED__', 'direct', 6, NULL, 0, '2026-03-10 15:38:17', NULL),
(67, 58, NULL, 'WRW', 'direct', 6, NULL, 0, '2026-03-10 15:38:20', NULL),
(68, 58, NULL, 'GA', 'direct', 6, NULL, 0, '2026-03-10 15:38:57', NULL),
(69, 57, NULL, '??', 'direct', 6, 68, 0, '2026-03-10 15:39:01', NULL),
(70, 58, NULL, '??', 'direct', 6, 69, 0, '2026-03-10 15:39:04', NULL),
(71, 57, NULL, 'Gn', 'direct', 6, NULL, 0, '2026-03-10 15:39:22', NULL),
(72, 58, NULL, 'GN', 'direct', 6, NULL, 0, '2026-03-10 15:39:25', NULL),
(73, 58, NULL, 'REPLAY TO ME', 'direct', 6, NULL, 0, '2026-03-10 15:39:30', NULL),
(74, 57, NULL, 'Replaying', 'direct', 6, 73, 0, '2026-03-10 15:39:39', NULL),
(75, 58, NULL, 'Delete the message after me for all', 'direct', 6, NULL, 0, '2026-03-10 15:39:53', NULL),
(76, 58, NULL, '__DELETED__', 'direct', 6, NULL, 0, '2026-03-10 15:39:55', NULL),
(77, 58, NULL, 'Delete the message for only me', 'direct', 6, NULL, 0, '2026-03-10 15:40:12', NULL),
(78, 57, NULL, 'Hello from API Dog test!', 'direct', NULL, NULL, 0, '2026-03-11 17:37:56', NULL),
(79, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-14 15:17:52', NULL),
(80, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-14 15:36:09', NULL),
(81, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-14 15:40:49', NULL),
(82, 57, NULL, 'Hello!', 'direct', 6, NULL, 0, '2026-03-14 16:00:19', NULL),
(83, 57, NULL, 'HELLO', 'direct', 6, NULL, 0, '2026-03-14 16:00:25', NULL),
(84, 58, NULL, 'HELLO', 'direct', 6, NULL, 0, '2026-03-14 16:00:30', NULL),
(85, 57, NULL, '<3', 'direct', 6, NULL, 0, '2026-03-14 16:00:34', NULL),
(86, 58, NULL, '_||__', 'direct', 6, NULL, 0, '2026-03-14 16:00:40', NULL),
(87, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-14 16:06:12', NULL),
(88, 59, NULL, 'Hello!', 'direct', 78, NULL, 0, '2026-03-14 17:45:59', NULL),
(89, 59, NULL, 'Hello!', 'direct', 78, NULL, 0, '2026-03-14 17:46:19', NULL),
(90, 60, NULL, 'Hello!', 'direct', 12, NULL, 0, '2026-03-14 17:47:20', NULL),
(91, 59, NULL, 'Hello!', 'direct', 12, NULL, 0, '2026-03-14 17:59:08', NULL),
(92, 60, NULL, 'eh', 'direct', 12, NULL, 0, '2026-03-14 18:00:03', NULL),
(93, 60, NULL, 'sure', 'direct', 12, NULL, 0, '2026-03-14 18:00:08', NULL),
(94, 59, NULL, 'why not', 'direct', 12, NULL, 0, '2026-03-14 18:00:11', NULL),
(95, 60, NULL, '?', 'direct', 12, NULL, 0, '2026-03-14 18:14:57', NULL),
(96, 60, NULL, 'اخيرا', 'direct', 12, NULL, 0, '2026-03-14 18:23:55', NULL),
(97, 60, NULL, 'حصل', 'direct', 12, NULL, 0, '2026-03-14 18:24:17', NULL),
(98, 59, NULL, 'ايه الكلام', 'direct', 12, 97, 0, '2026-03-14 18:30:20', NULL),
(99, 60, NULL, 'ايه يا قلبي', 'direct', 12, NULL, 0, '2026-03-14 18:30:30', NULL),
(100, 60, NULL, '__DELETED__', 'direct', 12, NULL, 0, '2026-03-14 18:30:33', NULL),
(101, 59, NULL, 'طب دي', 'direct', 12, NULL, 0, '2026-03-14 18:30:47', NULL),
(102, 59, NULL, 'دي', 'direct', 12, NULL, 0, '2026-03-14 18:30:57', NULL),
(103, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-16 20:19:10', NULL),
(104, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-16 20:20:16', NULL),
(105, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-16 20:32:57', NULL),
(106, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-16 20:45:23', NULL),
(107, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-16 20:53:59', NULL),
(108, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-16 22:31:35', NULL),
(109, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-16 22:35:22', NULL),
(110, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-16 23:59:12', NULL),
(111, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-17 00:01:52', NULL),
(112, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-17 00:21:53', NULL),
(113, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-17 00:34:46', NULL),
(114, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-17 00:50:31', NULL),
(115, 57, NULL, 'Hello from API Dog test!', 'direct', 78, NULL, 0, '2026-03-17 00:57:17', NULL);

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

--
-- Table structure for table `message_participants`
--

DROP TABLE IF EXISTS `message_participants`;
CREATE TABLE IF NOT EXISTS `message_participants` (
  `participant_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `message_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `read_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`participant_id`),
  UNIQUE KEY `unique_message_user` (`message_id`,`user_id`),
  KEY `idx_message` (`message_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=238 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `message_participants`
--

INSERT INTO `message_participants` (`participant_id`, `message_id`, `user_id`, `read_at`, `deleted_at`) VALUES
(1, 1, 7, '2025-02-02 08:30:00', NULL),
(2, 1, 8, '2025-02-02 09:15:00', NULL),
(3, 1, 9, NULL, NULL),
(4, 2, 2, '2025-02-03 12:20:00', NULL),
(5, 3, 7, NULL, NULL),
(6, 3, 8, NULL, NULL),
(7, 4, 23, NULL, NULL),
(8, 4, 8, '2025-02-04 11:00:00', NULL),
(9, 5, 22, '2025-02-08 16:20:00', NULL),
(10, 5, 8, NULL, NULL),
(11, 6, 57, '2026-03-05 19:16:30', NULL),
(12, 6, 58, '2026-03-15 23:11:07', NULL),
(13, 7, 58, '2026-03-03 18:13:00', NULL),
(14, 7, 57, '2026-03-03 18:18:38', NULL),
(15, 7, 60, NULL, NULL),
(16, 8, 58, '2026-03-03 18:16:50', NULL),
(17, 8, 57, NULL, '2026-03-05 19:16:30'),
(19, 9, 57, '2026-03-03 18:18:28', '2026-03-03 18:18:39'),
(20, 9, 58, NULL, NULL),
(21, 9, 60, NULL, NULL),
(22, 10, 57, '2026-03-03 18:18:53', NULL),
(23, 10, 58, '2026-03-15 23:11:07', NULL),
(24, 11, 57, '2026-03-03 18:20:17', NULL),
(25, 11, 58, '2026-03-15 23:11:07', NULL),
(26, 12, 59, '2026-03-03 18:23:55', NULL),
(27, 12, 60, '2026-03-14 17:59:58', NULL),
(28, 13, 59, '2026-03-03 18:23:56', NULL),
(29, 13, 57, NULL, NULL),
(30, 13, 58, NULL, NULL),
(31, 13, 60, '2026-03-14 18:24:30', NULL),
(32, 14, 60, '2026-03-03 18:23:59', NULL),
(33, 14, 59, '2026-03-03 18:24:00', NULL),
(34, 15, 59, '2026-03-03 18:24:01', '2026-03-03 18:24:03'),
(35, 15, 60, '2026-03-14 17:59:58', NULL),
(36, 16, 59, '2026-03-03 18:24:02', NULL),
(37, 16, 60, '2026-03-14 17:59:58', NULL),
(38, 17, 57, '2026-03-03 18:34:10', NULL),
(39, 17, 58, '2026-03-15 23:11:07', NULL),
(40, 18, 58, '2026-03-03 18:34:10', NULL),
(41, 18, 57, NULL, NULL),
(42, 18, 60, NULL, NULL),
(43, 19, 58, '2026-03-03 18:34:10', NULL),
(44, 19, 57, NULL, NULL),
(45, 20, 57, '2026-03-03 18:34:10', NULL),
(46, 20, 58, '2026-03-15 23:11:07', NULL),
(47, 21, 57, '2026-03-05 19:16:29', NULL),
(48, 21, 58, '2026-03-15 23:11:07', NULL),
(49, 22, 58, '2026-03-05 19:16:29', NULL),
(50, 22, 57, NULL, NULL),
(51, 22, 60, '2026-03-14 18:14:59', NULL),
(52, 23, 58, '2026-03-05 19:16:30', NULL),
(53, 23, 57, NULL, NULL),
(54, 24, 57, '2026-03-05 19:16:30', NULL),
(55, 24, 58, '2026-03-15 23:11:07', NULL),
(56, 25, 57, '2026-03-10 14:21:19', NULL),
(57, 25, 58, NULL, NULL),
(58, 26, 58, '2026-03-10 14:21:23', NULL),
(59, 26, 57, NULL, NULL),
(60, 27, 57, '2026-03-10 14:21:40', NULL),
(61, 27, 58, NULL, NULL),
(62, 28, 58, '2026-03-10 14:21:45', NULL),
(63, 28, 57, NULL, NULL),
(64, 29, 57, '2026-03-10 14:21:57', NULL),
(65, 29, 58, NULL, NULL),
(66, 30, 58, '2026-03-10 14:22:21', NULL),
(67, 30, 57, NULL, NULL),
(68, 31, 57, '2026-03-10 14:22:27', '2026-03-10 14:22:33'),
(69, 31, 58, NULL, NULL),
(70, 32, 58, '2026-03-10 14:23:00', NULL),
(71, 32, 57, NULL, NULL),
(72, 33, 58, '2026-03-10 14:23:37', NULL),
(73, 33, 57, NULL, NULL),
(74, 34, 57, '2026-03-10 14:23:43', NULL),
(75, 34, 58, NULL, NULL),
(76, 35, 57, '2026-03-10 14:24:55', NULL),
(77, 35, 58, NULL, NULL),
(78, 36, 58, '2026-03-10 14:24:58', NULL),
(79, 36, 57, NULL, NULL),
(80, 37, 57, '2026-03-10 14:25:06', NULL),
(81, 37, 58, NULL, NULL),
(82, 38, 57, '2026-03-10 14:25:16', '2026-03-10 14:25:20'),
(83, 38, 58, NULL, NULL),
(84, 39, 57, '2026-03-10 14:25:44', NULL),
(85, 39, 58, NULL, NULL),
(86, 40, 57, '2026-03-10 14:25:54', NULL),
(87, 40, 58, NULL, NULL),
(88, 41, 57, '2026-03-10 14:26:19', NULL),
(89, 41, 58, NULL, NULL),
(90, 42, 57, '2026-03-10 14:34:11', NULL),
(91, 42, 58, NULL, NULL),
(92, 43, 58, '2026-03-10 14:34:15', NULL),
(93, 43, 57, NULL, NULL),
(94, 44, 58, '2026-03-10 14:34:25', NULL),
(95, 44, 57, NULL, NULL),
(96, 45, 57, '2026-03-10 14:34:37', NULL),
(97, 45, 58, NULL, NULL),
(98, 46, 57, '2026-03-10 14:34:58', NULL),
(99, 46, 58, NULL, NULL),
(100, 47, 58, '2026-03-10 14:35:08', NULL),
(101, 47, 57, NULL, NULL),
(102, 48, 58, '2026-03-10 14:35:16', NULL),
(103, 48, 57, NULL, NULL),
(104, 49, 57, '2026-03-10 14:37:42', NULL),
(105, 49, 58, NULL, NULL),
(106, 50, 57, '2026-03-10 14:37:57', NULL),
(107, 50, 58, NULL, NULL),
(108, 51, 58, '2026-03-10 14:38:00', NULL),
(109, 51, 57, NULL, NULL),
(110, 52, 57, '2026-03-10 14:38:04', NULL),
(111, 52, 58, NULL, NULL),
(112, 53, 58, '2026-03-10 14:38:09', NULL),
(113, 53, 57, NULL, NULL),
(114, 54, 57, '2026-03-10 14:38:17', NULL),
(115, 54, 58, NULL, NULL),
(116, 55, 57, '2026-03-10 14:38:22', NULL),
(117, 55, 58, NULL, NULL),
(118, 56, 57, '2026-03-10 14:38:47', '2026-03-10 14:38:51'),
(119, 56, 58, NULL, NULL),
(120, 57, 57, '2026-03-10 14:56:31', NULL),
(121, 57, 58, '2026-03-15 23:11:07', NULL),
(122, 58, 57, '2026-03-10 14:56:46', NULL),
(123, 58, 58, '2026-03-15 23:11:07', NULL),
(124, 59, 58, '2026-03-10 14:56:52', NULL),
(125, 59, 57, NULL, NULL),
(126, 60, 57, '2026-03-10 14:59:44', NULL),
(127, 60, 58, '2026-03-15 23:11:07', NULL),
(128, 61, 58, '2026-03-10 14:59:53', NULL),
(129, 61, 57, NULL, NULL),
(130, 62, 57, '2026-03-10 15:37:30', NULL),
(131, 62, 58, '2026-03-15 23:11:07', NULL),
(132, 63, 57, '2026-03-10 15:37:34', NULL),
(133, 63, 58, '2026-03-15 23:11:07', NULL),
(134, 64, 58, '2026-03-10 15:37:40', NULL),
(135, 64, 57, NULL, NULL),
(136, 65, 58, '2026-03-10 15:37:58', NULL),
(137, 65, 57, NULL, NULL),
(138, 66, 57, '2026-03-10 15:38:17', NULL),
(139, 66, 58, '2026-03-15 23:11:07', NULL),
(140, 67, 58, '2026-03-10 15:38:20', NULL),
(141, 67, 57, NULL, NULL),
(142, 68, 58, '2026-03-10 15:38:57', NULL),
(143, 68, 57, NULL, NULL),
(144, 69, 57, '2026-03-10 15:39:01', NULL),
(145, 69, 58, '2026-03-15 23:11:07', NULL),
(146, 70, 58, '2026-03-10 15:39:04', NULL),
(147, 70, 57, NULL, NULL),
(148, 71, 57, '2026-03-10 15:39:22', NULL),
(149, 71, 58, '2026-03-15 23:11:07', NULL),
(150, 72, 58, '2026-03-10 15:39:25', NULL),
(151, 72, 57, NULL, NULL),
(152, 73, 58, '2026-03-10 15:39:30', NULL),
(153, 73, 57, NULL, NULL),
(154, 74, 57, '2026-03-10 15:39:39', NULL),
(155, 74, 58, '2026-03-15 23:11:07', NULL),
(156, 75, 58, '2026-03-10 15:39:53', NULL),
(157, 75, 57, NULL, NULL),
(158, 76, 58, '2026-03-10 15:39:55', NULL),
(159, 76, 57, NULL, NULL),
(160, 77, 58, '2026-03-10 15:40:12', '2026-03-10 15:40:18'),
(161, 77, 57, NULL, NULL),
(162, 78, 57, '2026-03-11 17:37:57', NULL),
(163, 78, 59, '2026-03-14 18:31:12', NULL),
(164, 79, 57, '2026-03-14 15:17:53', NULL),
(165, 79, 59, '2026-03-14 18:31:12', NULL),
(166, 80, 57, '2026-03-14 15:36:10', NULL),
(167, 80, 59, '2026-03-14 18:31:12', NULL),
(168, 81, 57, '2026-03-14 15:40:50', NULL),
(169, 81, 59, '2026-03-14 18:31:12', NULL),
(170, 82, 57, '2026-03-14 16:00:20', NULL),
(171, 82, 58, '2026-03-15 23:11:07', NULL),
(172, 83, 57, '2026-03-14 16:00:26', NULL),
(173, 83, 58, '2026-03-15 23:11:07', NULL),
(174, 84, 58, '2026-03-14 16:00:31', NULL),
(175, 84, 57, NULL, NULL),
(176, 85, 57, '2026-03-14 16:00:34', NULL),
(177, 85, 58, '2026-03-15 23:11:07', NULL),
(178, 86, 58, '2026-03-14 16:00:41', NULL),
(179, 86, 57, NULL, NULL),
(180, 87, 57, '2026-03-14 16:06:12', NULL),
(181, 87, 59, '2026-03-14 18:31:12', NULL),
(182, 88, 59, '2026-03-14 17:45:59', NULL),
(183, 88, 57, NULL, NULL),
(184, 89, 59, '2026-03-14 17:46:20', NULL),
(185, 89, 57, NULL, NULL),
(186, 90, 60, '2026-03-14 17:47:20', NULL),
(187, 90, 59, '2026-03-14 17:59:09', NULL),
(188, 91, 59, '2026-03-14 17:59:09', NULL),
(189, 91, 60, '2026-03-14 17:59:58', NULL),
(190, 92, 60, '2026-03-14 18:00:03', NULL),
(191, 92, 59, '2026-03-14 18:07:02', NULL),
(192, 93, 60, '2026-03-14 18:00:09', NULL),
(193, 93, 59, '2026-03-14 18:07:02', NULL),
(194, 94, 59, '2026-03-14 18:00:12', NULL),
(195, 94, 60, '2026-03-14 18:14:18', NULL),
(196, 95, 60, '2026-03-14 18:14:57', NULL),
(197, 95, 59, '2026-03-14 18:27:19', NULL),
(198, 96, 60, '2026-03-14 18:23:55', NULL),
(199, 96, 59, '2026-03-14 18:27:19', NULL),
(200, 97, 60, '2026-03-14 18:24:18', NULL),
(201, 97, 59, '2026-03-14 18:27:19', NULL),
(202, 98, 59, '2026-03-14 18:30:20', NULL),
(203, 98, 60, '2026-03-14 18:30:26', NULL),
(204, 99, 60, '2026-03-14 18:30:31', NULL),
(205, 99, 59, '2026-03-15 15:48:30', NULL),
(206, 100, 60, '2026-03-14 18:30:34', NULL),
(207, 100, 59, '2026-03-15 15:48:30', NULL),
(208, 101, 59, '2026-03-14 18:30:48', NULL),
(209, 101, 60, NULL, NULL),
(210, 102, 59, '2026-03-14 18:30:58', NULL),
(211, 102, 60, NULL, NULL),
(212, 103, 57, '2026-03-16 20:19:11', NULL),
(213, 103, 59, NULL, NULL),
(214, 104, 57, '2026-03-16 20:20:16', NULL),
(215, 104, 59, NULL, NULL),
(216, 105, 57, '2026-03-16 20:32:58', NULL),
(217, 105, 59, NULL, NULL),
(218, 106, 57, '2026-03-16 20:45:24', NULL),
(219, 106, 59, NULL, NULL),
(220, 107, 57, '2026-03-16 20:53:59', NULL),
(221, 107, 59, NULL, NULL),
(222, 108, 57, '2026-03-16 22:31:36', NULL),
(223, 108, 59, NULL, NULL),
(224, 109, 57, '2026-03-16 22:35:23', NULL),
(225, 109, 59, NULL, NULL),
(226, 110, 57, '2026-03-16 23:59:12', NULL),
(227, 110, 59, NULL, NULL),
(228, 111, 57, '2026-03-17 00:01:52', NULL),
(229, 111, 59, NULL, NULL),
(230, 112, 57, '2026-03-17 00:21:53', NULL),
(231, 112, 59, NULL, NULL),
(232, 113, 57, '2026-03-17 00:34:46', NULL),
(233, 113, 59, NULL, NULL),
(234, 114, 57, '2026-03-17 00:50:31', NULL),
(235, 114, 59, NULL, NULL),
(236, 115, 57, '2026-03-17 00:57:17', NULL),
(237, 115, 59, NULL, NULL);

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

--
-- Table structure for table `milestone_definitions`
--

DROP TABLE IF EXISTS `milestone_definitions`;
CREATE TABLE IF NOT EXISTS `milestone_definitions` (
  `milestone_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `badge_id` int UNSIGNED NOT NULL,
  `milestone_type` enum('xp','level','course_completion','grade','streak') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `threshold_value` int NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`milestone_id`),
  KEY `idx_badge` (`badge_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `milestone_definitions`
--

INSERT INTO `milestone_definitions` (`milestone_id`, `badge_id`, `milestone_type`, `threshold_value`, `description`) VALUES
(1, 6, 'level', 5, 'Reach level 5'),
(2, 3, 'streak', 7, 'Maintain 7-day learning streak'),
(3, 2, 'grade', 100, 'Score 100% on any assessment'),
(4, 7, 'grade', 95, 'Maintain 95% average across all courses'),
(5, 8, 'streak', 30, 'Maintain 30-day consistent learning streak');

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

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

DROP TABLE IF EXISTS `notifications`;
CREATE TABLE IF NOT EXISTS `notifications` (
  `notification_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `notification_type` enum('announcement','grade','assignment','message','deadline','system') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `related_entity_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `related_entity_id` bigint UNSIGNED DEFAULT NULL,
  `announcement_id` bigint UNSIGNED DEFAULT NULL,
  `is_read` tinyint(1) DEFAULT '0',
  `read_at` timestamp NULL DEFAULT NULL,
  `priority` enum('low','medium','high','urgent') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `action_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`notification_id`),
  KEY `announcement_id` (`announcement_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_read` (`is_read`),
  KEY `idx_type` (`notification_type`),
  KEY `idx_user_read_type` (`user_id`,`is_read`,`notification_type`),
  KEY `idx_user_date` (`user_id`,`created_at`)
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `notifications` (`notification_id`, `user_id`, `notification_type`, `title`, `body`, `related_entity_type`, `related_entity_id`, `announcement_id`, `is_read`, `read_at`, `priority`, `action_url`, `created_at`) VALUES
(1, 21, '', 'Assignment Due Soon', 'Assignment 1: Programming Basics is due tomorrow.', 'assignment', 1, NULL, 0, NULL, 'medium', NULL, '2025-01-31 08:00:00'),
(2, 7, 'assignment', 'New Assignment Posted', 'Assignment 1 is now available', NULL, NULL, NULL, 1, NULL, 'medium', NULL, '2025-02-01 08:00:00'),
(3, 7, 'grade', 'Grade Posted', 'Your grade for Assignment 1 has been posted', NULL, NULL, NULL, 0, NULL, 'medium', NULL, '2025-02-16 08:00:00'),
(4, 21, 'announcement', 'New Announcement', 'Dr. Ibrahim Ali posted a new announcement in CS101.', 'announcement', 1, NULL, 1, NULL, 'medium', NULL, '2025-01-20 09:05:00'),
(5, 8, 'grade', 'Grade Posted', 'Your grade for Assignment 1 has been posted', NULL, NULL, NULL, 1, NULL, 'medium', NULL, '2025-02-16 08:15:00'),
(6, 9, 'deadline', 'Assignment Due Soon', 'Assignment 1 due in 2 days', NULL, NULL, NULL, 0, NULL, 'high', NULL, '2025-02-13 07:00:00'),
(7, 21, 'message', 'Message Received', 'Dr. Ibrahim Ali replied to your message about Assignment 1.', 'message', 2, NULL, 1, NULL, 'medium', NULL, '2025-01-28 15:50:00'),
(8, 22, 'grade', 'Grade Posted', 'Your grade for Quiz 1 has been posted.', 'quiz', 1, NULL, 0, NULL, 'medium', NULL, '2025-02-03 11:00:00'),
(10, 58, 'announcement', 'Test Notification', 'This is a test notification from admin', NULL, NULL, NULL, 0, NULL, 'high', NULL, '2026-03-03 00:10:09'),
(14, 58, 'announcement', 'Important Announcement', 'All students must submit assignments by Friday', NULL, NULL, NULL, 0, NULL, 'high', '/assignments', '2026-03-03 00:23:24'),
(16, 58, 'announcement', 'Important Announcement', 'All students must submit assignments by Friday', NULL, NULL, NULL, 0, NULL, 'high', '/assignments', '2026-03-03 18:34:09'),
(22, 58, 'announcement', 'Important Announcement', 'All students must submit assignments by Friday', NULL, NULL, NULL, 0, NULL, 'high', '/assignments', '2026-03-05 19:16:29'),
(23, 57, 'grade', 'New Grade Posted', 'Your grade for Assignment 1 in CS101 has been posted.', NULL, NULL, NULL, 1, '2026-03-11 17:20:11', 'medium', NULL, '2026-03-11 16:43:26'),
(24, 57, 'announcement', 'New Announcement', 'Check the latest announcement in CS101.', NULL, NULL, NULL, 1, '2026-03-11 17:20:11', 'high', NULL, '2026-03-11 16:43:26'),
(25, 57, 'assignment', 'Assignment Due Soon', 'Assignment 2 in CS101 is due tomorrow.', NULL, NULL, NULL, 1, NULL, 'high', NULL, '2026-03-11 16:43:26'),
(26, 57, 'system', 'System Update', 'EduVerse has been updated with new features.', NULL, NULL, NULL, 1, NULL, 'low', NULL, '2026-03-11 16:43:26'),
(27, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-14 15:17:52', 'medium', NULL, '2026-03-11 17:37:56'),
(28, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-14 15:36:10', 'medium', NULL, '2026-03-14 15:17:52'),
(29, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-14 15:40:49', 'medium', NULL, '2026-03-14 15:36:09'),
(30, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-14 16:06:12', 'medium', NULL, '2026-03-14 15:40:49'),
(31, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-16 20:19:10', 'medium', NULL, '2026-03-14 16:06:11'),
(32, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-16 20:20:16', 'medium', NULL, '2026-03-16 20:19:10'),
(33, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-16 20:32:57', 'medium', NULL, '2026-03-16 20:20:15'),
(34, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-16 20:45:23', 'medium', NULL, '2026-03-16 20:32:57'),
(35, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-16 20:53:59', 'medium', NULL, '2026-03-16 20:45:23'),
(36, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-16 22:31:35', 'medium', NULL, '2026-03-16 20:53:59'),
(37, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-16 22:35:23', 'medium', NULL, '2026-03-16 22:31:35'),
(38, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-16 23:59:12', 'medium', NULL, '2026-03-16 22:35:22'),
(39, 57, 'system', 'New Study Group Member', 'A new member has joined your study group: Test Study Group.', 'study_group', 11, NULL, 1, '2026-03-16 23:59:12', 'medium', NULL, '2026-03-16 23:52:50'),
(40, 57, 'system', 'Study Group Member Left', 'A member has left your study group: Test Study Group.', 'study_group', 11, NULL, 1, '2026-03-16 23:59:12', 'medium', NULL, '2026-03-16 23:52:50'),
(41, 58, 'message', 'New Office Hour Booking', 'A student has booked an appointment for your slot on 2026-04-20. Topic: Help with HW3', NULL, NULL, NULL, 0, NULL, 'medium', NULL, '2026-03-16 23:52:50'),
(42, 57, 'system', 'Appointment Confirmed', 'Your office hour appointment on 2026-04-20 has been confirmed via instructor.', NULL, NULL, NULL, 1, '2026-03-16 23:59:12', 'medium', NULL, '2026-03-16 23:52:51'),
(43, 57, 'system', 'New Study Group Member', 'A new member has joined your study group: Test Study Group.', 'study_group', 12, NULL, 1, '2026-03-16 23:59:12', 'medium', NULL, '2026-03-16 23:54:21'),
(44, 57, 'system', 'Study Group Member Left', 'A member has left your study group: Test Study Group.', 'study_group', 12, NULL, 1, '2026-03-16 23:59:12', 'medium', NULL, '2026-03-16 23:54:21'),
(45, 58, 'message', 'New Office Hour Booking', 'A student has booked an appointment for your slot on 2026-04-20. Topic: Help with HW3', NULL, NULL, NULL, 0, NULL, 'medium', NULL, '2026-03-16 23:54:21'),
(46, 57, 'system', 'Appointment Confirmed', 'Your office hour appointment on 2026-04-20 has been confirmed via instructor.', NULL, NULL, NULL, 1, '2026-03-16 23:59:12', 'medium', NULL, '2026-03-16 23:54:21'),
(47, 58, 'system', 'Appointment Cancelled', 'An office hour appointment on 2026-04-20 has been cancelled.', NULL, NULL, NULL, 0, NULL, 'medium', NULL, '2026-03-16 23:54:21'),
(48, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-17 00:01:52', 'medium', NULL, '2026-03-16 23:59:12'),
(49, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-17 00:21:53', 'medium', NULL, '2026-03-17 00:01:52'),
(50, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-17 00:34:46', 'medium', NULL, '2026-03-17 00:21:52'),
(51, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-17 00:50:31', 'medium', NULL, '2026-03-17 00:34:45'),
(52, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 1, '2026-03-17 00:57:17', 'medium', NULL, '2026-03-17 00:50:31'),
(53, 57, 'system', 'Test from API Dog', 'This is a test notification.', NULL, NULL, NULL, 0, NULL, 'medium', NULL, '2026-03-17 00:57:17'),
(54, 57, 'system', 'Appointment Confirmed', 'Your office hour appointment on 2026-04-20 has been confirmed via instructor.', NULL, NULL, NULL, 0, NULL, 'medium', NULL, '2026-03-17 00:57:34'),
(55, 58, 'system', 'Appointment Cancelled', 'An office hour appointment on 2026-04-20 has been cancelled.', NULL, NULL, NULL, 0, NULL, 'medium', NULL, '2026-03-17 00:57:35'),
(56, 66, 'system', 'New Study Group Member', 'A new member has joined your study group: Data Structures Study Group.', 'study_group', 14, NULL, 0, NULL, 'medium', NULL, '2026-03-17 01:03:05'),
(57, 66, 'system', 'Study Group Member Left', 'A member has left your study group: Data Structures Study Group.', 'study_group', 14, NULL, 0, NULL, 'medium', NULL, '2026-03-17 01:03:27'),
(58, 57, 'system', 'Appointment Confirmed', 'Your office hour appointment on 2026-04-20 has been confirmed via instructor.', NULL, NULL, NULL, 0, NULL, 'medium', NULL, '2026-03-17 01:13:47'),
(59, 58, 'system', 'Appointment Cancelled', 'An office hour appointment on 2026-04-20 has been cancelled.', NULL, NULL, NULL, 0, NULL, 'medium', NULL, '2026-03-17 01:13:47');

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

--
-- Table structure for table `notification_preferences`
--

DROP TABLE IF EXISTS `notification_preferences`;
CREATE TABLE IF NOT EXISTS `notification_preferences` (
  `preference_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `email_enabled` tinyint(1) DEFAULT '1',
  `push_enabled` tinyint(1) DEFAULT '1',
  `sms_enabled` tinyint(1) DEFAULT '0',
  `announcement_email` tinyint(1) DEFAULT '1',
  `grade_email` tinyint(1) DEFAULT '1',
  `assignment_email` tinyint(1) DEFAULT '1',
  `message_email` tinyint(1) DEFAULT '1',
  `deadline_reminder_days` int DEFAULT '2',
  `quiet_hours_start` time DEFAULT NULL,
  `quiet_hours_end` time DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`preference_id`),
  UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `notification_preferences`
--

INSERT INTO `notification_preferences` (`preference_id`, `user_id`, `email_enabled`, `push_enabled`, `sms_enabled`, `announcement_email`, `grade_email`, `assignment_email`, `message_email`, `deadline_reminder_days`, `quiet_hours_start`, `quiet_hours_end`, `created_at`, `updated_at`) VALUES
(1, 7, 1, 1, 0, 1, 1, 1, 1, 2, '22:00:00', '07:00:00', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(2, 8, 1, 0, 0, 1, 1, 0, 1, 3, '23:00:00', '08:00:00', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 9, 0, 1, 0, 0, 1, 1, 0, 1, '21:00:00', '06:00:00', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 10, 1, 1, 0, 1, 0, 1, 1, 2, '22:00:00', '07:00:00', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(5, 11, 1, 1, 1, 1, 1, 1, 1, 5, '23:00:00', '09:00:00', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(6, 12, 1, 0, 0, 1, 1, 0, 0, 2, '22:00:00', '07:00:00', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(7, 57, 1, 1, 0, 1, 1, 1, 0, 3, NULL, NULL, '2026-03-03 00:10:14', '2026-03-17 00:57:16');

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

--
-- Table structure for table `office_hour_appointments`
--

DROP TABLE IF EXISTS `office_hour_appointments`;
CREATE TABLE IF NOT EXISTS `office_hour_appointments` (
  `appointment_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `slot_id` bigint UNSIGNED NOT NULL,
  `student_id` bigint UNSIGNED NOT NULL,
  `appointment_date` date NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `topic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` enum('booked','confirmed','cancelled','completed','no_show') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'booked',
  `cancelled_by` bigint UNSIGNED DEFAULT NULL,
  `cancelled_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`appointment_id`),
  KEY `fk_appointment_slot` (`slot_id`),
  KEY `fk_appointment_student` (`student_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `office_hour_appointments`
--

INSERT INTO `office_hour_appointments` (`appointment_id`, `slot_id`, `student_id`, `appointment_date`, `start_time`, `end_time`, `topic`, `notes`, `status`, `cancelled_by`, `cancelled_at`, `created_at`, `updated_at`) VALUES
(1, 5, 57, '2026-04-20', '10:00:00', '12:00:00', 'Help with HW3', 'Algorithm questions', 'cancelled', 57, '2026-03-17 01:13:48', '2026-03-16 23:43:33', '2026-03-17 01:13:47'),
(2, 6, 57, '2026-04-20', '10:00:00', '12:00:00', 'Help with HW3', 'Algorithm questions', 'cancelled', 57, '2026-03-16 23:43:56', '2026-03-16 23:43:55', '2026-03-16 23:43:55'),
(3, 7, 57, '2026-04-20', '10:00:00', '12:00:00', 'Help with HW3', 'Algorithm questions', 'cancelled', 57, '2026-03-16 23:45:38', '2026-03-16 23:45:37', '2026-03-16 23:45:37'),
(4, 8, 57, '2026-04-20', '10:00:00', '12:00:00', 'Help with HW3', 'Algorithm questions', 'cancelled', 57, '2026-03-16 23:52:51', '2026-03-16 23:52:50', '2026-03-16 23:52:51'),
(5, 9, 57, '2026-04-20', '10:00:00', '12:00:00', 'Help with HW3', 'Algorithm questions', 'cancelled', 57, '2026-03-16 23:54:21', '2026-03-16 23:54:21', '2026-03-16 23:54:21');

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

--
-- Table structure for table `office_hour_slots`
--

DROP TABLE IF EXISTS `office_hour_slots`;
CREATE TABLE IF NOT EXISTS `office_hour_slots` (
  `slot_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `instructor_id` bigint UNSIGNED NOT NULL,
  `day_of_week` enum('monday','tuesday','wednesday','thursday','friday','saturday','sunday') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mode` enum('in_person','online','hybrid') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'in_person',
  `meeting_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `max_appointments` int DEFAULT '4',
  `is_recurring` tinyint(1) DEFAULT '1',
  `effective_from` date DEFAULT NULL,
  `effective_until` date DEFAULT NULL,
  `status` enum('active','cancelled','suspended') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`slot_id`),
  KEY `fk_office_hours_instructor` (`instructor_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `office_hour_slots`
--

INSERT INTO `office_hour_slots` (`slot_id`, `instructor_id`, `day_of_week`, `start_time`, `end_time`, `location`, `mode`, `meeting_url`, `max_appointments`, `is_recurring`, `effective_from`, `effective_until`, `status`, `notes`, `created_at`, `updated_at`) VALUES
(5, 58, 'monday', '10:00:00', '12:00:00', 'Room 400', 'in_person', NULL, 4, 1, NULL, NULL, 'active', NULL, '2026-03-16 23:43:33', '2026-03-16 23:43:33'),
(6, 58, 'monday', '10:00:00', '12:00:00', 'Room 400', 'in_person', NULL, 4, 1, NULL, NULL, 'active', NULL, '2026-03-16 23:43:55', '2026-03-16 23:43:55'),
(7, 58, 'monday', '10:00:00', '12:00:00', 'Room 400', 'in_person', NULL, 4, 1, NULL, NULL, 'cancelled', NULL, '2026-03-16 23:45:37', '2026-03-16 23:45:37'),
(8, 58, 'monday', '10:00:00', '12:00:00', 'Room 400', 'in_person', NULL, 4, 1, NULL, NULL, 'cancelled', NULL, '2026-03-16 23:52:50', '2026-03-16 23:52:51'),
(9, 58, 'monday', '10:00:00', '12:00:00', 'Room 400', 'in_person', NULL, 4, 1, NULL, NULL, 'cancelled', NULL, '2026-03-16 23:54:21', '2026-03-16 23:54:21'),
(10, 58, 'monday', '10:00:00', '12:00:00', 'Room 303', 'in_person', NULL, 5, 1, NULL, NULL, 'active', NULL, '2026-03-17 00:57:34', '2026-03-17 00:57:34'),
(11, 58, 'monday', '10:00:00', '12:00:00', 'Room 303', 'in_person', NULL, 5, 1, NULL, NULL, 'active', NULL, '2026-03-17 01:13:47', '2026-03-17 01:13:47');

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

--
-- Table structure for table `offline_sync_queue`
--

DROP TABLE IF EXISTS `offline_sync_queue`;
CREATE TABLE IF NOT EXISTS `offline_sync_queue` (
  `sync_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `entity_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `entity_id` bigint UNSIGNED DEFAULT NULL,
  `action` enum('create','update','delete') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `data_snapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `sync_status` enum('pending','synced','failed','conflict') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `attempt_count` int DEFAULT '0',
  `error_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `client_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `synced_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`sync_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`sync_status`),
  KEY `idx_entity` (`entity_type`,`entity_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `offline_sync_queue`
--

INSERT INTO `offline_sync_queue` (`sync_id`, `user_id`, `entity_type`, `entity_id`, `action`, `data_snapshot`, `sync_status`, `attempt_count`, `error_message`, `client_timestamp`, `synced_at`, `created_at`) VALUES
(1, 7, 'assignment_submission', 5, 'create', '{\"assignment_id\": 2, \"submission_text\": \"x = 5\\ny = 10\\nprint(x + y)\"}', 'synced', 1, NULL, '2025-02-14 16:30:00', '2025-02-14 16:31:15', '2025-11-20 13:43:00'),
(2, 8, 'activity_log', NULL, 'create', '{\"activity_type\": \"view\", \"entity_type\": \"course_material\", \"entity_id\": 3}', 'synced', 1, NULL, '2025-02-14 17:45:00', '2025-02-14 17:46:03', '2025-11-20 13:43:00'),
(3, 9, 'quiz_answer', 15, 'update', '{\"answer_text\": \"Updated answer\", \"question_id\": 4}', 'pending', 0, NULL, '2025-02-15 08:20:00', NULL, '2025-11-20 13:43:00'),
(4, 10, 'forum_post', NULL, 'create', '{\"title\": \"New question\", \"content\": \"How do I...\"}', 'failed', 2, NULL, '2025-02-15 09:00:00', NULL, '2025-11-20 13:43:00');

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

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

DROP TABLE IF EXISTS `password_resets`;
CREATE TABLE IF NOT EXISTS `password_resets` (
  `reset_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `reset_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `expires_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `used` tinyint(1) DEFAULT '0',
  `used_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`reset_id`),
  KEY `idx_token` (`reset_token`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `password_resets` (`reset_id`, `user_id`, `reset_token`, `expires_at`, `used`, `used_at`, `created_at`) VALUES
(6, 59, '82d37db17f4603125601d3d8d0826fa52429f091ab9aebe30edd73b8296838c0', '2026-03-02 14:27:06', 0, NULL, '2026-03-02 13:27:06');

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

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

DROP TABLE IF EXISTS `payment_transactions`;
CREATE TABLE IF NOT EXISTS `payment_transactions` (
  `transaction_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `currency` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'USD',
  `payment_method` enum('credit_card','paypal','bank_transfer') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_status` enum('pending','completed','failed','refunded') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_gateway_ref` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `paid_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`transaction_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_status` (`transaction_status`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_transactions`
--

INSERT INTO `payment_transactions` (`transaction_id`, `user_id`, `course_id`, `amount`, `currency`, `payment_method`, `transaction_status`, `payment_gateway_ref`, `paid_at`, `created_at`) VALUES
(1, 7, NULL, 299.99, 'USD', 'credit_card', 'completed', 'stripe_ch_1234567890', '2025-01-10 13:30:00', '2025-11-20 13:43:01'),
(2, 8, NULL, 299.99, 'USD', 'paypal', 'completed', 'paypal_txn_9876543210', '2025-01-11 08:15:00', '2025-11-20 13:43:01'),
(3, 9, 2, 399.99, 'USD', 'credit_card', 'completed', 'stripe_ch_0987654321', '2025-01-12 12:20:00', '2025-11-20 13:43:01'),
(4, 10, NULL, 299.99, 'USD', 'credit_card', 'failed', 'stripe_ch_1111111111', '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(5, 11, 3, 349.99, 'USD', 'bank_transfer', 'pending', 'bank_ref_555555', '2025-11-20 13:43:01', '2025-11-20 13:43:01');

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

--
-- Table structure for table `peer_reviews`
--

DROP TABLE IF EXISTS `peer_reviews`;
CREATE TABLE IF NOT EXISTS `peer_reviews` (
  `review_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `submission_id` bigint UNSIGNED NOT NULL,
  `reviewer_id` bigint UNSIGNED NOT NULL,
  `reviewee_id` bigint UNSIGNED NOT NULL,
  `review_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `rating` decimal(3,2) DEFAULT NULL,
  `criteria_scores` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `status` enum('pending','submitted','acknowledged') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `submitted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`review_id`),
  KEY `idx_submission` (`submission_id`),
  KEY `idx_reviewer` (`reviewer_id`),
  KEY `idx_reviewee` (`reviewee_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `peer_reviews`
--

INSERT INTO `peer_reviews` (`review_id`, `submission_id`, `reviewer_id`, `reviewee_id`, `review_text`, `rating`, `criteria_scores`, `status`, `submitted_at`, `created_at`) VALUES
(1, 16, 22, 21, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46'),
(2, 16, 23, 21, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46'),
(3, 17, 23, 22, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46'),
(4, 17, 24, 22, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46'),
(5, 18, 24, 23, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46'),
(6, 18, 25, 23, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46'),
(7, 19, 25, 24, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46'),
(8, 19, 21, 24, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46'),
(9, 20, 21, 25, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46'),
(10, 20, 22, 25, NULL, NULL, NULL, 'pending', NULL, '2026-03-16 23:38:46');

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

--
-- Table structure for table `performance_metrics`
--

DROP TABLE IF EXISTS `performance_metrics`;
CREATE TABLE IF NOT EXISTS `performance_metrics` (
  `metric_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED NOT NULL,
  `metric_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `metric_value` decimal(10,2) NOT NULL,
  `calculation_date` date NOT NULL,
  `trend` enum('improving','stable','declining') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`metric_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_date` (`calculation_date`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `performance_metrics`
--

INSERT INTO `performance_metrics` (`metric_id`, `user_id`, `course_id`, `metric_name`, `metric_value`, `calculation_date`, `trend`, `created_at`) VALUES
(7, 57, 1, 'assignment_average', 80.00, '2026-03-11', 'improving', '2026-03-11 18:12:04'),
(8, 57, 1, 'quiz_average', 75.00, '2026-03-11', 'stable', '2026-03-11 18:12:04'),
(9, 57, 2, 'assignment_average', 85.00, '2026-03-11', 'improving', '2026-03-11 18:12:04'),
(10, 57, 3, 'overall_grade', 91.25, '2026-03-11', 'improving', '2026-03-11 18:12:04'),
(11, 57, 4, 'assignment_average', 70.00, '2026-03-11', 'declining', '2026-03-11 18:12:04');

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

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

DROP TABLE IF EXISTS `permissions`;
CREATE TABLE IF NOT EXISTS `permissions` (
  `permission_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `permission_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `permission_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `module` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`permission_id`),
  UNIQUE KEY `permission_name` (`permission_name`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `permissions` (`permission_id`, `permission_name`, `permission_description`, `module`, `created_at`) VALUES
(1, 'view_courses', 'View course information', 'courses', '2025-11-20 13:42:59'),
(2, 'enroll_courses', 'Enroll in courses', 'courses', '2025-11-20 13:42:59'),
(3, 'create_courses', 'Create new courses', 'courses', '2025-11-20 13:42:59'),
(4, 'manage_grades', 'Manage student grades', 'grading', '2025-11-20 13:42:59'),
(5, 'take_attendance', 'Mark student attendance', 'attendance', '2025-11-20 13:42:59'),
(6, 'view_reports', 'View analytics reports', 'reports', '2025-11-20 13:42:59'),
(7, 'manage_users', 'Manage user accounts', 'users', '2025-11-20 13:42:59'),
(8, 'system_settings', 'Access system settings', 'admin', '2025-11-20 13:42:59');

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

--
-- Table structure for table `points_rules`
--

DROP TABLE IF EXISTS `points_rules`;
CREATE TABLE IF NOT EXISTS `points_rules` (
  `rule_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `action_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `points_value` int NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `multiplier` decimal(3,2) DEFAULT '1.00',
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`rule_id`),
  UNIQUE KEY `action_type` (`action_type`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `points_rules`
--

INSERT INTO `points_rules` (`rule_id`, `action_type`, `points_value`, `description`, `multiplier`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'quiz_completion', 10, 'Complete a quiz', 1.00, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(2, 'assignment_submission', 15, 'Submit an assignment on time', 1.00, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 'perfect_attendance', 5, 'Attend a class session', 1.00, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 'perfect_score', 50, 'Get 100% on assignment/quiz', 1.50, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(5, 'early_submission', 20, 'Submit assignment early', 1.00, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(6, 'daily_login', 2, 'Log in to the platform', 1.00, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(7, 'forum_post', 5, 'Create a helpful forum post', 1.00, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(8, 'peer_review', 10, 'Complete a peer review', 1.00, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00');

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

--
-- Table structure for table `programs`
--

DROP TABLE IF EXISTS `programs`;
CREATE TABLE IF NOT EXISTS `programs` (
  `program_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `department_id` bigint UNSIGNED NOT NULL,
  `program_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `program_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `degree_type` enum('bachelor','master','phd','diploma','certificate') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `duration_years` int DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` enum('active','inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`program_id`),
  UNIQUE KEY `unique_program_code` (`department_id`,`program_code`),
  KEY `idx_department` (`department_id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `programs`
--

INSERT INTO `programs` (`program_id`, `department_id`, `program_name`, `program_code`, `degree_type`, `duration_years`, `description`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Updated Program', 'BCS', 'bachelor', 4, 'Undergraduate program in Computer Science', 'active', '2025-11-20 13:42:59', '2026-03-02 23:28:59'),
(2, 1, 'Master of Computer Science', 'MCS', 'master', 2, 'Graduate program in Computer Science', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(3, 2, 'Bachelor of Mathematics', 'BMATH', 'bachelor', 4, 'Undergraduate program in Mathematics', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(4, 4, 'Bachelor of Business Administration', 'BBA', 'bachelor', 4, 'Undergraduate business program', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(5, 5, 'Bachelor of Engineering', 'BE', 'bachelor', 4, 'Undergraduate engineering program', 'active', '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(6, 3, 'MBA', 'MBA', 'master', 2, 'Master of Business Administration', 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00'),
(7, 4, 'BS Data Science', 'BS-DS', 'bachelor', 4, 'Bachelor of Science in Data Science', 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00'),
(8, 4, 'Certificate Data Analytics', 'CERT-DA', 'certificate', 1, 'Certificate in Data Analytics', 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00'),
(9, 5, 'BA English Literature', 'BA-ENG', 'bachelor', 4, 'Bachelor of Arts in English Literature', 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00'),
(10, 5, 'BA Arabic Language', 'BA-AR', 'bachelor', 4, 'Bachelor of Arts in Arabic Language and Culture', 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00'),
(11, 6, 'BS Mathematics', 'BS-MATH', 'bachelor', 4, 'Bachelor of Science in Mathematics', 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00'),
(12, 6, 'BS Physics', 'BS-PHYS', 'bachelor', 4, 'Bachelor of Science in Physics', 'active', '2024-09-01 08:00:00', '2024-09-01 08:00:00'),
(15, 1, 'Test Prog Z2', 'TPZ2', 'bachelor', 4, NULL, 'active', '2026-03-02 13:31:14', '2026-03-02 13:31:14'),
(16, 1, 'AutoProg', 'AP1', 'bachelor', 4, NULL, 'active', '2026-03-02 13:49:20', '2026-03-02 13:49:20'),
(17, 1, 'Test Program', 'TP01', 'bachelor', 4, 'A test program', 'active', '2026-03-02 23:28:59', '2026-03-02 23:28:59'),
(18, 1, 'API Dog Test Program', 'TESTP01', 'bachelor', 4, NULL, 'active', '2026-03-11 17:37:43', '2026-03-11 17:37:43');

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

--
-- Table structure for table `quizzes`
--

DROP TABLE IF EXISTS `quizzes`;
CREATE TABLE IF NOT EXISTS `quizzes` (
  `quiz_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `instructions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `quiz_type` enum('practice','graded','midterm','final') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'graded',
  `time_limit_minutes` int DEFAULT NULL,
  `max_attempts` int DEFAULT '1',
  `passing_score` decimal(5,2) DEFAULT NULL,
  `randomize_questions` tinyint(1) DEFAULT '0',
  `show_correct_answers` tinyint(1) DEFAULT '1',
  `show_answers_after` enum('immediate','after_due','never') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'after_due',
  `available_from` timestamp NULL DEFAULT NULL,
  `available_until` timestamp NULL DEFAULT NULL,
  `weight` decimal(5,2) DEFAULT '0.00',
  `status` enum('draft','published','closed','archived') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'draft',
  `created_by` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`quiz_id`),
  KEY `created_by` (`created_by`),
  KEY `idx_course` (`course_id`),
  KEY `idx_available` (`available_from`,`available_until`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `quizzes`
--

INSERT INTO `quizzes` (`quiz_id`, `course_id`, `title`, `description`, `instructions`, `quiz_type`, `time_limit_minutes`, `max_attempts`, `passing_score`, `randomize_questions`, `show_correct_answers`, `show_answers_after`, `available_from`, `available_until`, `weight`, `status`, `created_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'Updated Quiz Title', 'Quick assessment of fundamental programming concepts', 'Answer all questions', 'graded', 45, 1, 12.00, 1, 1, 'after_due', NULL, NULL, 10.00, 'published', 8, '2025-01-25 08:00:00', '2026-03-07 18:26:59', NULL),
(2, 1, 'Quiz 2: Control Flow', 'Test knowledge of conditionals and loops', 'Answer all questions', 'graded', 20, 1, 12.00, 1, 1, 'after_due', NULL, NULL, 10.00, 'draft', 8, '2025-02-01 08:00:00', '2025-02-01 08:00:00', NULL),
(3, 2, 'Quiz 1: Arrays and Lists', 'Understanding arrays', NULL, 'graded', 60, 1, 75.00, 0, 1, 'after_due', '2025-02-14 22:00:00', '2025-02-25 21:59:59', 15.00, 'draft', 3, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(4, 3, 'Quiz 1: Array and Linked Lists', 'Assessment of array and linked list concepts', 'Answer all questions', 'graded', 20, 1, 15.00, 1, 0, 'after_due', NULL, NULL, 10.00, 'draft', 10, '2025-02-03 08:00:00', '2025-02-03 08:00:00', NULL),
(5, 5, 'Quiz 1: OOP Principles', 'Test understanding of object-oriented programming', 'Answer all questions', 'graded', 25, 1, 12.00, 1, 1, 'after_due', NULL, NULL, 10.00, 'draft', 12, '2025-02-05 08:00:00', '2025-02-05 08:00:00', NULL),
(6, 9, 'Quiz 1: Statistical Concepts', 'Assessment of probability and statistics fundamentals', 'Answer all questions', 'graded', 30, 1, 12.00, 0, 1, 'after_due', NULL, NULL, 10.00, 'draft', 16, '2025-02-07 08:00:00', '2025-02-07 08:00:00', NULL),
(7, 1, 'Updated Merge Quiz', 'Testing', NULL, 'practice', 30, 3, 60.00, 1, 1, 'after_due', '2026-03-01 00:00:00', '2026-12-31 23:59:59', 0.00, 'draft', 58, '2026-03-02 14:10:15', '2026-03-02 14:10:25', '2026-03-02 14:10:25'),
(8, 1, 'Midterm Quiz: Arrays and Data Structures', 'This quiz covers chapters 1-5', 'Answer all questions. No partial credit.', 'graded', 60, 2, 70.00, 0, 1, 'after_due', '2026-03-15 09:00:00', '2026-03-22 23:59:59', 15.00, 'draft', 59, '2026-03-02 14:34:32', '2026-03-02 14:34:32', NULL),
(9, 1, 'Midterm Quiz: Arrays and Data Structures', 'This quiz covers chapters 1-5', 'Answer all questions. No partial credit.', 'graded', 60, 2, 70.00, 0, 1, 'after_due', '2026-03-15 09:00:00', '2026-03-22 23:59:59', 15.00, 'draft', 59, '2026-03-02 14:34:35', '2026-03-02 14:34:35', NULL),
(10, 1, 'PM Test Quiz Fixed', 'A quiz from test', 'Answer all', 'graded', 30, 2, 60.00, 1, 1, 'after_due', '2026-03-01 00:00:00', '2026-06-30 23:59:59', 10.00, 'draft', 58, '2026-03-02 23:44:03', '2026-03-02 23:44:03', NULL),
(11, 1, 'Updated Quiz', 'A quiz from test script', 'Answer all questions', 'graded', 45, 2, 60.00, 1, 1, 'after_due', '2026-03-01 00:00:00', '2026-06-30 23:59:59', 10.00, 'draft', 58, '2026-03-02 23:47:22', '2026-03-02 23:47:22', NULL),
(12, 1, 'Midterm Quiz: Data Structures', 'Covers arrays, linked lists, and trees', 'Answer all questions. Time limit applies.', 'graded', 45, 2, 60.00, 1, 1, 'after_due', '2026-04-01 09:00:00', '2026-04-15 23:59:59', 15.00, 'draft', 58, '2026-03-02 23:52:00', '2026-03-02 23:52:00', NULL),
(13, 1, 'Midterm Quiz: Data Structures', 'Covers arrays, linked lists, and trees', 'Answer all questions. Time limit applies.', 'graded', 45, 2, 60.00, 1, 1, 'after_due', '2026-04-01 09:00:00', '2026-04-15 23:59:59', 15.00, 'draft', 58, '2026-03-03 00:23:21', '2026-03-03 00:23:21', NULL),
(14, 1, 'Midterm Quiz: Data Structures', 'Covers arrays, linked lists, and trees', 'Answer all questions. Time limit applies.', 'graded', 45, 2, 60.00, 1, 1, 'after_due', '2026-04-01 09:00:00', '2026-04-15 23:59:59', 15.00, 'draft', 58, '2026-03-03 18:34:06', '2026-03-03 18:34:06', NULL),
(15, 1, 'Midterm Quiz: Data Structures', 'Covers arrays, linked lists, and trees', 'Answer all questions. Time limit applies.', 'graded', 45, 2, 60.00, 1, 1, 'after_due', '2026-04-01 09:00:00', '2026-04-15 23:59:59', 15.00, 'published', 58, '2026-03-05 19:16:26', '2026-03-07 18:27:08', NULL),
(16, 1, 'API Dog Test Quiz', 'Test quiz from API Dog', NULL, 'graded', NULL, 1, NULL, 0, 1, 'after_due', NULL, NULL, 0.00, 'draft', 59, '2026-03-11 17:37:53', '2026-03-11 17:37:53', NULL),
(17, 1, 'API Dog Test Quiz', 'Test quiz from API Dog', NULL, 'graded', NULL, 1, NULL, 0, 1, 'after_due', NULL, NULL, 0.00, 'draft', 59, '2026-03-14 15:36:06', '2026-03-14 15:36:06', NULL),
(18, 1, 'API Dog Test Quiz', 'Test quiz from API Dog', NULL, 'graded', NULL, 1, NULL, 0, 1, 'after_due', NULL, NULL, 0.00, 'draft', 59, '2026-03-14 15:40:46', '2026-03-14 15:40:46', NULL),
(19, 1, 'API Dog Test Quiz', 'Test quiz from API Dog', NULL, 'graded', NULL, 1, NULL, 0, 1, 'after_due', NULL, NULL, 0.00, 'draft', 59, '2026-03-14 16:06:09', '2026-03-14 16:06:09', NULL);

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

--
-- Table structure for table `quiz_answers`
--

DROP TABLE IF EXISTS `quiz_answers`;
CREATE TABLE IF NOT EXISTS `quiz_answers` (
  `answer_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `attempt_id` bigint UNSIGNED NOT NULL,
  `question_id` bigint UNSIGNED NOT NULL,
  `answer_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `selected_option` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `is_correct` tinyint(1) DEFAULT NULL,
  `points_earned` decimal(5,2) DEFAULT '0.00',
  `answered_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`answer_id`),
  UNIQUE KEY `unique_attempt_question` (`attempt_id`,`question_id`),
  KEY `question_id` (`question_id`),
  KEY `idx_attempt` (`attempt_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `quiz_attempts`
--

DROP TABLE IF EXISTS `quiz_attempts`;
CREATE TABLE IF NOT EXISTS `quiz_attempts` (
  `attempt_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `quiz_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `attempt_number` int NOT NULL,
  `started_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `submitted_at` timestamp NULL DEFAULT NULL,
  `score` decimal(5,2) DEFAULT NULL,
  `time_taken_minutes` int DEFAULT NULL,
  `status` enum('in_progress','submitted','graded','abandoned') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'in_progress',
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`attempt_id`),
  KEY `idx_quiz` (`quiz_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`status`),
  KEY `idx_user_quiz_status` (`user_id`,`quiz_id`,`status`),
  KEY `idx_quiz_date` (`quiz_id`,`started_at`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `quiz_attempts`
--

INSERT INTO `quiz_attempts` (`attempt_id`, `quiz_id`, `user_id`, `attempt_number`, `started_at`, `submitted_at`, `score`, `time_taken_minutes`, `status`, `ip_address`) VALUES
(5, 1, 57, 1, '2026-03-02 14:09:06', '2026-03-02 14:10:20', 0.00, 1, 'graded', NULL),
(6, 10, 57, 1, '2026-03-02 23:44:03', '2026-03-02 23:44:03', 0.00, 0, 'graded', NULL),
(7, 11, 57, 1, '2026-03-02 23:47:22', '2026-03-02 23:47:22', 0.00, 0, 'graded', NULL);

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

--
-- Table structure for table `quiz_difficulty_levels`
--

DROP TABLE IF EXISTS `quiz_difficulty_levels`;
CREATE TABLE IF NOT EXISTS `quiz_difficulty_levels` (
  `difficulty_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `level_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `difficulty_value` int NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`difficulty_id`),
  UNIQUE KEY `level_name` (`level_name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `quiz_difficulty_levels`
--

INSERT INTO `quiz_difficulty_levels` (`difficulty_id`, `level_name`, `difficulty_value`, `description`) VALUES
(1, 'Easy', 1, 'Basic level questions'),
(2, 'Medium', 2, 'Intermediate level questions'),
(3, 'Hard', 3, 'Advanced level questions'),
(5, 'Very Hard', 5, 'Expert level - synthesis and evaluation');

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

--
-- Table structure for table `quiz_questions`
--

DROP TABLE IF EXISTS `quiz_questions`;
CREATE TABLE IF NOT EXISTS `quiz_questions` (
  `question_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `quiz_id` bigint UNSIGNED NOT NULL,
  `question_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `question_type` enum('mcq','true_false','short_answer','essay','matching') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `correct_answer` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `explanation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `points` decimal(5,2) DEFAULT '1.00',
  `difficulty_level_id` int UNSIGNED DEFAULT NULL,
  `order_index` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`question_id`),
  KEY `difficulty_level_id` (`difficulty_level_id`),
  KEY `idx_quiz` (`quiz_id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `quiz_questions`
--

INSERT INTO `quiz_questions` (`question_id`, `quiz_id`, `question_text`, `question_type`, `options`, `correct_answer`, `explanation`, `points`, `difficulty_level_id`, `order_index`, `created_at`, `updated_at`) VALUES
(1, 1, 'Updated: What is the time complexity of binary search?', '', NULL, NULL, NULL, 15.00, NULL, 0, '2025-01-25 08:00:00', '2026-03-05 19:16:27'),
(2, 1, 'Which of the following is not a data type?', '', NULL, NULL, NULL, 4.00, NULL, 1, '2025-01-25 08:00:00', '2026-03-05 19:16:27'),
(3, 1, 'What does IDE stand for?', '', NULL, NULL, NULL, 4.00, NULL, 2, '2025-01-25 08:00:00', '2026-03-05 19:16:27'),
(4, 1, 'True or False: Comments improve code readability.', 'true_false', NULL, NULL, NULL, 4.00, NULL, 3, '2025-01-25 08:00:00', '2026-03-05 19:16:27'),
(5, 3, 'What is the time complexity of accessing an element in an array by index?', 'mcq', '[\"O(1)\", \"O(n)\", \"O(log n)\", \"O(n^2)\"]', '0', 'Array access by index is constant time', 15.00, 2, 1, '2025-11-20 13:42:59', '2025-11-20 13:42:59'),
(6, 2, 'What is the output of the loop: for(int i=0; i<3; i++)?', '', NULL, NULL, NULL, 4.00, NULL, 1, '2025-02-01 08:00:00', '2026-03-01 14:55:40'),
(7, 2, 'Which statement is used to skip an iteration in a loop?', '', NULL, NULL, NULL, 4.00, NULL, 2, '2025-02-01 08:00:00', '2026-03-01 14:55:40'),
(8, 2, 'What is the purpose of an if-else statement?', '', NULL, NULL, NULL, 4.00, NULL, 3, '2025-02-01 08:00:00', '2026-03-01 14:55:40'),
(9, 2, 'True or False: A switch statement can only handle integers.', 'true_false', NULL, NULL, NULL, 4.00, NULL, 4, '2025-02-01 08:00:00', '2026-03-01 14:55:40'),
(10, 2, 'Describe the difference between while and do-while loops.', 'short_answer', NULL, NULL, NULL, 4.00, NULL, 5, '2025-02-01 08:00:00', '2026-03-01 14:55:40'),
(11, 3, 'What is the time complexity of array access?', '', NULL, NULL, NULL, 5.00, NULL, 1, '2025-01-26 08:00:00', '2026-03-01 14:55:40'),
(12, 3, 'Explain how a linked list differs from an array.', 'short_answer', NULL, NULL, NULL, 5.00, NULL, 2, '2025-01-26 08:00:00', '2026-03-01 14:55:40'),
(13, 3, 'What is the advantage of a linked list over an array?', '', NULL, NULL, NULL, 5.00, NULL, 3, '2025-01-26 08:00:00', '2026-03-01 14:55:40'),
(14, 3, 'True or False: Linked lists allow constant-time access to elements.', 'true_false', NULL, NULL, NULL, 5.00, NULL, 4, '2025-01-26 08:00:00', '2026-03-01 14:55:40'),
(15, 4, 'What is encapsulation?', '', NULL, NULL, NULL, 5.00, NULL, 1, '2025-02-03 08:00:00', '2026-03-01 14:55:40'),
(16, 4, 'Describe inheritance with an example.', 'short_answer', NULL, NULL, NULL, 5.00, NULL, 2, '2025-02-03 08:00:00', '2026-03-01 14:55:40'),
(17, 4, 'What are the four pillars of OOP?', '', NULL, NULL, NULL, 5.00, NULL, 3, '2025-02-03 08:00:00', '2026-03-01 14:55:40'),
(18, 4, 'True or False: A class can inherit from multiple classes in Java.', 'true_false', NULL, NULL, NULL, 5.00, NULL, 4, '2025-02-03 08:00:00', '2026-03-01 14:55:40'),
(19, 4, 'What is the difference between a class and an object?', 'short_answer', NULL, NULL, NULL, 5.00, NULL, 5, '2025-02-03 08:00:00', '2026-03-01 14:55:40'),
(21, 10, 'What is binary search complexity?', 'mcq', '[\"O(1)\",\"O(log n)\",\"O(n)\",\"O(n log n)\"]', 'O(log n)', 'Binary search halves the space', 10.00, 1, 0, '2026-03-02 23:44:03', '2026-03-02 23:44:19'),
(22, 11, 'Updated: What is binary search complexity?', 'mcq', '[\"O(1)\",\"O(log n)\",\"O(n)\",\"O(n log n)\"]', 'O(log n)', 'Binary search halves the search space each step', 15.00, 1, 0, '2026-03-02 23:47:22', '2026-03-02 23:47:22'),
(23, 1, 'What is the time complexity of binary search?', 'mcq', '[\"O(1)\",\"O(log n)\",\"O(n)\",\"O(n log n)\"]', 'O(log n)', 'Binary search divides the search space in half each iteration', 10.00, 1, 1, '2026-03-02 23:52:00', '2026-03-02 23:52:00'),
(24, 1, 'What is the time complexity of binary search?', 'mcq', '[\"O(1)\",\"O(log n)\",\"O(n)\",\"O(n log n)\"]', 'O(log n)', 'Binary search divides the search space in half each iteration', 10.00, 1, 1, '2026-03-03 00:23:22', '2026-03-03 00:23:22'),
(25, 1, 'What is the time complexity of binary search?', 'mcq', '[\"O(1)\",\"O(log n)\",\"O(n)\",\"O(n log n)\"]', 'O(log n)', 'Binary search divides the search space in half each iteration', 10.00, 1, 1, '2026-03-03 18:34:06', '2026-03-03 18:34:06'),
(26, 1, 'What is the time complexity of binary search?', 'mcq', '[\"O(1)\",\"O(log n)\",\"O(n)\",\"O(n log n)\"]', 'O(log n)', 'Binary search divides the search space in half each iteration', 10.00, 1, 1, '2026-03-05 19:16:27', '2026-03-05 19:16:27');

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

--
-- Table structure for table `report_templates`
--

DROP TABLE IF EXISTS `report_templates`;
CREATE TABLE IF NOT EXISTS `report_templates` (
  `template_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `template_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `template_type` enum('student','course','attendance','grade','analytics','custom') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `template_structure` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` bigint UNSIGNED NOT NULL,
  `is_system_template` tinyint(1) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`template_id`),
  KEY `created_by` (`created_by`),
  KEY `idx_type` (`template_type`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `report_templates`
--

INSERT INTO `report_templates` (`template_id`, `template_name`, `template_type`, `template_structure`, `description`, `created_by`, `is_system_template`, `created_at`, `updated_at`) VALUES
(1, 'Student Progress Report', 'student', '{\"sections\": [\"enrollment\", \"grades\", \"attendance\", \"participation\"]}', 'Comprehensive student progress report', 1, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(2, 'Course Analytics Report', 'course', '{\"sections\": [\"enrollment_stats\", \"grade_distribution\", \"attendance_rate\", \"engagement\"]}', 'Detailed course performance analytics', 1, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 'Attendance Summary', 'attendance', '{\"sections\": [\"daily_attendance\", \"student_records\", \"trends\"]}', 'Attendance tracking report', 1, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 'Grade Distribution Report', 'grade', '{\"sections\": [\"grade_breakdown\", \"statistics\", \"comparison\"]}', 'Grade distribution and statistics', 1, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00');

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

--
-- Table structure for table `rewards`
--

DROP TABLE IF EXISTS `rewards`;
CREATE TABLE IF NOT EXISTS `rewards` (
  `reward_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `reward_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reward_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `reward_type` enum('badge','title','avatar','theme','feature_unlock','certificate') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reward_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `points_cost` int DEFAULT '0',
  `achievement_id` int UNSIGNED DEFAULT NULL,
  `is_available` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`reward_id`),
  KEY `achievement_id` (`achievement_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `rewards`
--

INSERT INTO `rewards` (`reward_id`, `reward_name`, `reward_description`, `reward_type`, `reward_value`, `points_cost`, `achievement_id`, `is_available`, `created_at`) VALUES
(1, 'Premium Badge', 'Unlock a premium profile badge', 'badge', NULL, 500, NULL, 1, '2025-11-20 13:43:00'),
(2, 'Custom Title', 'Get a custom profile title', 'title', NULL, 300, NULL, 1, '2025-11-20 13:43:00');

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

--
-- Table structure for table `reward_redemptions`
--

DROP TABLE IF EXISTS `reward_redemptions`;
CREATE TABLE IF NOT EXISTS `reward_redemptions` (
  `redemption_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `reward_id` int UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `points_spent` int NOT NULL,
  `redemption_status` enum('pending','approved','delivered','rejected','cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `delivery_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `approved_by` bigint UNSIGNED DEFAULT NULL,
  `approved_at` timestamp NULL DEFAULT NULL,
  `redeemed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`redemption_id`),
  KEY `approved_by` (`approved_by`),
  KEY `idx_reward` (`reward_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`redemption_status`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `reward_redemptions`
--

INSERT INTO `reward_redemptions` (`redemption_id`, `reward_id`, `user_id`, `points_spent`, `redemption_status`, `delivery_details`, `approved_by`, `approved_at`, `redeemed_at`) VALUES
(1, 1, 7, 500, 'delivered', '{\"reward_type\": \"badge\", \"badge_id\": 7}', 1, '2025-02-10 08:00:00', '2025-02-10 07:30:00'),
(2, 2, 8, 300, 'approved', '{\"reward_type\": \"title\", \"title\": \"Quiz Master\"}', 1, '2025-02-12 12:00:00', '2025-02-12 11:45:00'),
(3, 1, 9, 250, 'pending', '{\"reward_type\": \"badge\", \"badge_id\": 3}', NULL, NULL, '2025-02-14 14:20:00');

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

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

DROP TABLE IF EXISTS `roles`;
CREATE TABLE IF NOT EXISTS `roles` (
  `role_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `role_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `role_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`role_id`),
  UNIQUE KEY `role_name` (`role_name`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` (`role_id`, `role_name`, `role_description`, `created_at`) VALUES
(1, 'student', 'Regular student user', '2025-11-20 13:42:59'),
(2, 'instructor', 'Course instructor', '2025-11-20 13:42:59'),
(3, 'teaching_assistant', 'Teaching Assistant', '2025-11-20 13:42:59'),
(4, 'admin', 'System Administrator', '2025-11-20 13:42:59'),
(5, 'department_head', 'Department Head', '2025-11-20 13:42:59'),
(6, 'it_admin', 'IT Administrator', '2026-03-02 13:17:36');

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

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

DROP TABLE IF EXISTS `role_permissions`;
CREATE TABLE IF NOT EXISTS `role_permissions` (
  `role_permission_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `role_id` int UNSIGNED NOT NULL,
  `permission_id` int UNSIGNED NOT NULL,
  `granted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`role_permission_id`),
  UNIQUE KEY `unique_role_permission` (`role_id`,`permission_id`),
  KEY `permission_id` (`permission_id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `role_permissions` (`role_permission_id`, `role_id`, `permission_id`, `granted_at`) VALUES
(3, 2, 1, '2025-11-20 13:42:59'),
(4, 2, 3, '2025-11-20 13:42:59'),
(5, 2, 4, '2025-11-20 13:42:59'),
(6, 2, 5, '2025-11-20 13:42:59'),
(7, 2, 6, '2025-11-20 13:42:59'),
(8, 3, 1, '2025-11-20 13:42:59'),
(9, 3, 4, '2025-11-20 13:42:59'),
(10, 3, 5, '2025-11-20 13:42:59'),
(11, 4, 1, '2025-11-20 13:42:59'),
(12, 4, 2, '2025-11-20 13:42:59'),
(13, 4, 3, '2025-11-20 13:42:59'),
(14, 4, 4, '2025-11-20 13:42:59'),
(15, 4, 5, '2025-11-20 13:42:59'),
(16, 4, 6, '2025-11-20 13:42:59'),
(17, 4, 7, '2025-11-20 13:42:59'),
(18, 4, 8, '2025-11-20 13:42:59'),
(19, 5, 1, '2025-11-20 13:42:59'),
(20, 5, 3, '2025-11-20 13:42:59'),
(21, 5, 4, '2025-11-20 13:42:59'),
(22, 5, 6, '2025-11-20 13:42:59'),
(23, 1, 1, '2026-03-10 18:15:14'),
(24, 1, 2, '2026-03-10 18:15:14');

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

--
-- Table structure for table `rubrics`
--

DROP TABLE IF EXISTS `rubrics`;
CREATE TABLE IF NOT EXISTS `rubrics` (
  `rubric_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `rubric_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `criteria` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `total_points` decimal(5,2) DEFAULT '100.00',
  `created_by` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`rubric_id`),
  KEY `created_by` (`created_by`),
  KEY `idx_course` (`course_id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `rubrics`
--

INSERT INTO `rubrics` (`rubric_id`, `course_id`, `rubric_name`, `description`, `criteria`, `total_points`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 1, 'Programming Assignment Rubric', 'Rubric for evaluating programming assignments', NULL, 100.00, 2, '2026-03-11 16:43:58', '2026-03-11 16:43:58'),
(2, 2, 'Data Structures Project Rubric', 'Rubric for DS projects', '{\"criteria\": [{\"name\": \"Implementation\", \"points\": 50}, {\"name\": \"Efficiency\", \"points\": 25}, {\"name\": \"Documentation\", \"points\": 15}, {\"name\": \"Presentation\", \"points\": 10}]}', 100.00, 3, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 1, 'Test Rubric Z', 'A rubric', NULL, 100.00, 58, '2026-03-02 13:34:36', '2026-03-02 13:34:36'),
(4, 1, 'AutoRubric', 'Test rubric', NULL, 100.00, 58, '2026-03-02 13:51:17', '2026-03-02 13:51:17'),
(5, 1, 'MergeTest', 'Post-merge', NULL, 100.00, 58, '2026-03-02 14:04:57', '2026-03-02 14:04:57'),
(6, 1, 'Essay Grading Rubric', 'Rubric for evaluating research essays', '[{\"name\":\"Content\",\"maxPoints\":40,\"description\":\"Quality of content\"},{\"name\":\"Grammar\",\"maxPoints\":30,\"description\":\"Writing quality\"},{\"name\":\"Format\",\"maxPoints\":30,\"description\":\"Proper formatting\"}]', 100.00, 58, '2026-03-02 23:32:57', '2026-03-02 23:32:57'),
(7, 1, 'Test Rubric PM', 'Test rubric from postman test', '[{\"name\":\"Content\",\"maxPoints\":40},{\"name\":\"Grammar\",\"maxPoints\":30},{\"name\":\"Format\",\"maxPoints\":30}]', 100.00, 58, '2026-03-02 23:42:38', '2026-03-02 23:42:38'),
(8, 1, 'Test Rubric PM', 'Test rubric from postman test', '[{\"name\":\"Content\",\"maxPoints\":40},{\"name\":\"Grammar\",\"maxPoints\":30},{\"name\":\"Format\",\"maxPoints\":30}]', 100.00, 58, '2026-03-02 23:47:21', '2026-03-02 23:47:21'),
(9, 1, 'Essay Grading Rubric', 'Rubric for evaluating research essays', '[{\"name\":\"Content\",\"maxPoints\":40,\"description\":\"Quality of content\"},{\"name\":\"Grammar\",\"maxPoints\":30,\"description\":\"Writing quality\"},{\"name\":\"Format\",\"maxPoints\":30,\"description\":\"Proper formatting\"}]', 100.00, 58, '2026-03-02 23:51:57', '2026-03-02 23:51:57'),
(10, 1, 'Essay Grading Rubric', 'Rubric for evaluating research essays', '[{\"name\":\"Content\",\"maxPoints\":40,\"description\":\"Quality of content\"},{\"name\":\"Grammar\",\"maxPoints\":30,\"description\":\"Writing quality\"},{\"name\":\"Format\",\"maxPoints\":30,\"description\":\"Proper formatting\"}]', 100.00, 58, '2026-03-03 00:23:19', '2026-03-03 00:23:19'),
(11, 1, 'Essay Grading Rubric', 'Rubric for evaluating research essays', '[{\"name\":\"Content\",\"maxPoints\":40,\"description\":\"Quality of content\"},{\"name\":\"Grammar\",\"maxPoints\":30,\"description\":\"Writing quality\"},{\"name\":\"Format\",\"maxPoints\":30,\"description\":\"Proper formatting\"}]', 100.00, 58, '2026-03-03 18:34:03', '2026-03-03 18:34:03'),
(12, 1, 'Essay Grading Rubric', 'Rubric for evaluating research essays', '[{\"name\":\"Content\",\"maxPoints\":40,\"description\":\"Quality of content\"},{\"name\":\"Grammar\",\"maxPoints\":30,\"description\":\"Writing quality\"},{\"name\":\"Format\",\"maxPoints\":30,\"description\":\"Proper formatting\"}]', 100.00, 58, '2026-03-05 19:16:24', '2026-03-05 19:16:24'),
(13, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-11 17:37:55', '2026-03-11 17:37:55'),
(14, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-14 15:36:08', '2026-03-14 15:36:08'),
(15, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-14 15:40:48', '2026-03-14 15:40:48'),
(16, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-14 16:06:10', '2026-03-14 16:06:10'),
(17, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-16 20:19:09', '2026-03-16 20:19:09'),
(18, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-16 20:20:14', '2026-03-16 20:20:14'),
(19, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-16 20:32:56', '2026-03-16 20:32:56'),
(20, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-16 20:45:22', '2026-03-16 20:45:22'),
(21, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-16 20:53:57', '2026-03-16 20:53:57'),
(22, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-16 22:31:34', '2026-03-16 22:31:34'),
(23, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-16 22:35:21', '2026-03-16 22:35:21'),
(24, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-16 23:59:10', '2026-03-16 23:59:10'),
(25, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-17 00:01:50', '2026-03-17 00:01:50'),
(26, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-17 00:21:51', '2026-03-17 00:21:51'),
(27, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-17 00:34:44', '2026-03-17 00:34:44'),
(28, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-17 00:50:29', '2026-03-17 00:50:29'),
(29, 1, 'API Dog Test Rubric', NULL, NULL, 100.00, 58, '2026-03-17 00:57:15', '2026-03-17 00:57:15');

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

--
-- Table structure for table `scheduled_notifications`
--

DROP TABLE IF EXISTS `scheduled_notifications`;
CREATE TABLE IF NOT EXISTS `scheduled_notifications` (
  `scheduled_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `notification_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `scheduled_for` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `status` enum('pending','sent','failed','cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `created_by` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `sent_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`scheduled_id`),
  KEY `created_by` (`created_by`),
  KEY `idx_user` (`user_id`),
  KEY `idx_scheduled` (`scheduled_for`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `scheduled_notifications`
--

INSERT INTO `scheduled_notifications` (`scheduled_id`, `user_id`, `notification_type`, `title`, `body`, `scheduled_for`, `status`, `created_by`, `created_at`, `sent_at`) VALUES
(1, 7, 'deadline_reminder', 'Assignment Due Tomorrow', 'Assignment 2 is due tomorrow at 11:59 PM', '2025-02-27 07:00:00', 'pending', 2, '2025-11-20 13:43:00', NULL),
(2, 8, 'deadline_reminder', 'Quiz Available', 'Quiz 2 is now available. Due date: March 10', '2025-03-01 06:00:00', 'pending', 2, '2025-11-20 13:43:00', NULL),
(3, 9, 'course_update', 'New Material Posted', 'Lecture 5 slides have been uploaded', '2025-02-20 08:00:00', 'sent', 2, '2025-11-20 13:43:00', NULL),
(4, 10, 'grade_available', 'Grade Posted', 'Your grade for Assignment 1 is now available', '2025-02-16 08:00:00', 'sent', 2, '2025-11-20 13:43:00', NULL);

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

--
-- Table structure for table `search_history`
--

DROP TABLE IF EXISTS `search_history`;
CREATE TABLE IF NOT EXISTS `search_history` (
  `history_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `search_query` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `search_filters` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `results_count` int DEFAULT '0',
  `selected_result_id` bigint UNSIGNED DEFAULT NULL,
  `selected_result_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`history_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_query` (`search_query`(255)),
  KEY `idx_date` (`created_at`)
) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `search_history`
--

INSERT INTO `search_history` (`history_id`, `user_id`, `search_query`, `search_filters`, `results_count`, `selected_result_id`, `selected_result_type`, `created_at`) VALUES
(1, 7, 'python loops', '{\"entity_types\": [\"material\", \"post\"]}', 8, 5, 'post', '2025-11-20 13:43:00'),
(2, 7, 'assignment 1', '{\"course_id\": 1}', 3, 1, 'assignment', '2025-11-20 13:43:00'),
(3, 8, 'hello world', '{}', 12, 3, 'assignment', '2025-11-20 13:43:00'),
(4, 9, 'data structures', '{\"entity_types\": [\"course\", \"material\"]}', 15, NULL, NULL, '2025-11-20 13:43:00'),
(5, 10, 'syllabus', '{\"course_id\": 1}', 2, 1, 'material', '2025-11-20 13:43:00');

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

--
-- Table structure for table `search_index`
--

DROP TABLE IF EXISTS `search_index`;
CREATE TABLE IF NOT EXISTS `search_index` (
  `index_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `entity_type` enum('course','material','user','announcement','assignment','quiz','file','post') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `entity_id` bigint UNSIGNED NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `keywords` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `search_vector` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `visibility` enum('public','students','instructors','private') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'students',
  `campus_id` bigint UNSIGNED DEFAULT NULL,
  `course_id` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`index_id`),
  KEY `idx_entity` (`entity_type`,`entity_id`),
  KEY `idx_campus` (`campus_id`),
  KEY `idx_course` (`course_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `search_index`
--

INSERT INTO `search_index` (`index_id`, `entity_type`, `entity_id`, `title`, `content`, `keywords`, `metadata`, `search_vector`, `visibility`, `campus_id`, `course_id`, `created_at`, `updated_at`) VALUES
(1, 'course', 1, 'Introduction to Programming', 'Basic programming concepts using Python. Learn variables, loops, functions, and more.', 'python, programming, cs101, beginner, coding', NULL, NULL, 'students', 1, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(2, 'material', 2, 'Lecture 1: Introduction to Programming', 'Overview of programming concepts, what is programming, why learn Python, basic syntax', 'lecture, introduction, python basics, programming concepts', NULL, NULL, 'students', 1, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 'assignment', 1, 'Assignment 1: Hello World', 'Create your first Python program that prints Hello World', 'assignment, hello world, python, beginner', NULL, NULL, 'students', 1, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 'announcement', 1, 'Course Start', 'Welcome to CS101! Please review the syllabus', 'welcome, syllabus, course start', NULL, NULL, 'students', 1, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(5, 'post', 1, 'Help with loops', 'Can someone explain how for loops work in Python?', 'loops, for loop, help, question, python', NULL, NULL, 'students', 1, 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(6, 'course', 2, 'Data Structures and Algorithms', 'Learn about arrays, linked lists, trees, and graphs', 'data structures algorithms trees graphs', NULL, NULL, 'students', NULL, 2, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(7, 'course', 3, 'Database Systems', 'Introduction to relational databases and SQL', 'database sql relational queries', NULL, NULL, 'students', NULL, 3, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(8, 'material', 2, 'Lecture 2: Arrays and Lists', 'Understanding arrays and linked lists in programming', 'arrays lists data structures', NULL, NULL, 'students', NULL, 1, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(9, 'user', 57, 'Tarek Student', 'Student enrolled in CS courses', 'student tarek cs', NULL, NULL, 'public', NULL, NULL, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(10, 'user', 58, 'Tarek Instructor', 'Instructor for CS courses', 'instructor tarek cs', NULL, NULL, 'public', NULL, NULL, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(11, 'assignment', 2, 'Assignment 2: Data Structures', 'Implement a linked list and binary tree', 'linked list binary tree implementation', NULL, NULL, 'students', NULL, 2, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(12, 'quiz', 1, 'Quiz 1: Programming Basics', 'Test your knowledge of variables, loops, and functions', 'variables loops functions basics', NULL, NULL, 'students', NULL, 1, '2026-03-11 18:12:04', '2026-03-11 18:12:04');

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

--
-- Table structure for table `security_logs`
--

DROP TABLE IF EXISTS `security_logs`;
CREATE TABLE IF NOT EXISTS `security_logs` (
  `log_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `event_type` enum('login','logout','failed_login','password_change','permission_change','suspicious_activity','login_success','login_failure','role_change','account_locked','ip_blocked','session_hijack','brute_force') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `severity` enum('low','medium','high','critical') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `metadata` json DEFAULT NULL,
  `is_resolved` tinyint(1) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`log_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_event` (`event_type`),
  KEY `idx_severity` (`severity`),
  KEY `idx_date` (`created_at`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `security_logs`
--

INSERT INTO `security_logs` (`log_id`, `user_id`, `event_type`, `severity`, `ip_address`, `location`, `user_agent`, `details`, `metadata`, `is_resolved`, `created_at`) VALUES
(1, 7, 'login', 'low', '192.168.1.100', NULL, NULL, 'Successful login', NULL, 1, '2025-11-20 13:43:00'),
(2, 8, 'login', 'low', '192.168.1.101', NULL, NULL, 'Successful login', NULL, 1, '2025-11-20 13:43:00'),
(3, NULL, 'failed_login', 'medium', '192.168.1.200', NULL, NULL, 'Failed login attempt for email: unknown@test.com', NULL, 1, '2025-11-20 13:43:00'),
(4, 7, 'password_change', 'low', '192.168.1.100', NULL, NULL, 'User changed password', NULL, 1, '2025-11-20 13:43:00'),
(5, NULL, 'failed_login', 'high', '203.0.113.45', NULL, NULL, 'Multiple failed login attempts detected', NULL, 0, '2025-11-20 13:43:00'),
(6, 1, 'permission_change', 'medium', '192.168.1.1', NULL, NULL, 'Admin modified user role permissions', NULL, 1, '2025-11-20 13:43:00');

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

--
-- Table structure for table `semesters`
--

DROP TABLE IF EXISTS `semesters`;
CREATE TABLE IF NOT EXISTS `semesters` (
  `semester_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `semester_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `semester_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `registration_start` date DEFAULT NULL,
  `registration_end` date DEFAULT NULL,
  `status` enum('upcoming','active','completed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'upcoming',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`semester_id`),
  UNIQUE KEY `semester_code` (`semester_code`),
  KEY `idx_code` (`semester_code`),
  KEY `idx_dates` (`start_date`,`end_date`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `semesters`
--

INSERT INTO `semesters` (`semester_id`, `semester_name`, `semester_code`, `start_date`, `end_date`, `registration_start`, `registration_end`, `status`, `created_at`) VALUES
(1, 'Fall 2026 Updated', 'FALL2024', '2024-09-01', '2024-12-20', '2024-08-15', '2024-08-31', 'completed', '2024-08-01 00:00:00'),
(2, 'Spring 2025', 'SPR2025', '2025-01-15', '2025-05-30', '2024-12-15', '2025-01-10', 'completed', '2024-12-01 00:00:00'),
(3, 'Summer 2025', 'SU2025', '2025-06-01', '2025-08-15', '2025-05-01', '2025-05-25', 'upcoming', '2025-11-20 13:42:59'),
(4, 'Fall 2025', 'F2025', '2025-09-01', '2026-06-30', '2025-08-01', '2025-08-25', 'active', '2025-11-26 18:54:24'),
(7, 'Fall 2027', 'F2027', '2027-09-01', '2027-12-20', '2027-08-01', '2027-08-25', 'upcoming', '2025-11-26 19:28:01'),
(12, 'Fall 2026', 'F26', '2026-09-01', '2026-12-15', '2026-08-01', '2026-08-30', 'upcoming', '2026-03-02 13:29:55'),
(13, 'Auto Sem', 'AS1', '2027-01-01', '2027-05-01', '2026-12-01', '2026-12-31', 'upcoming', '2026-03-02 13:49:23'),
(14, 'Fall 2026', 'F2026', '2026-09-01', '2026-12-31', '2026-08-01', '2026-08-25', 'upcoming', '2026-03-02 23:29:09');

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

--
-- Table structure for table `server_monitoring`
--

DROP TABLE IF EXISTS `server_monitoring`;
CREATE TABLE IF NOT EXISTS `server_monitoring` (
  `monitor_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `server_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `cpu_usage` decimal(5,2) DEFAULT NULL,
  `memory_usage` decimal(5,2) DEFAULT NULL,
  `disk_usage` decimal(5,2) DEFAULT NULL,
  `status` enum('healthy','warning','critical','down') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'healthy',
  `uptime_seconds` bigint DEFAULT NULL,
  `checked_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`monitor_id`),
  KEY `idx_server` (`server_name`),
  KEY `idx_status` (`status`),
  KEY `idx_checked` (`checked_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `sessions`
--

DROP TABLE IF EXISTS `sessions`;
CREATE TABLE IF NOT EXISTS `sessions` (
  `session_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `session_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `device_type` enum('web','mobile_ios','mobile_android','tablet','desktop') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'web',
  `expires_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `remember_me` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`session_id`),
  UNIQUE KEY `session_token` (`session_token`),
  KEY `idx_token` (`session_token`),
  KEY `idx_user` (`user_id`),
  KEY `idx_expires` (`expires_at`)
) ENGINE=InnoDB AUTO_INCREMENT=676 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`session_id`, `user_id`, `session_token`, `ip_address`, `user_agent`, `device_type`, `expires_at`, `created_at`, `remember_me`) VALUES
(3, 17, '[REDACTED], NULL, NULL, 'web', '2025-12-01 23:24:53', '2025-11-24 23:24:53', 0),
(6, 18, '[REDACTED], NULL, NULL, 'web', '2025-12-01 23:33:35', '2025-11-24 23:33:35', 0),
(13, 19, '[REDACTED], '127.0.0.1', 'Thunder Client (https://www.thunderclient.com)', 'desktop', '2025-12-02 18:00:41', '2025-11-25 18:00:41', 0),
(60, 25, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-03 16:17:54', '2025-11-26 16:17:54', 0),
(61, 25, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-03 17:53:32', '2025-11-26 17:53:32', 0),
(62, 29, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-03 18:04:07', '2025-11-26 18:04:07', 0),
(63, 29, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-03 19:21:46', '2025-11-26 19:21:46', 0),
(68, 30, '[REDACTED], '192.168.1.3', 'Dart/3.9 (dart:io)', 'desktop', '2025-12-04 00:37:42', '2025-11-27 00:37:42', 0),
(70, 29, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-04 16:58:16', '2025-11-27 16:58:16', 0),
(71, 29, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-04 17:39:26', '2025-11-27 17:39:26', 0),
(72, 29, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-04 19:50:18', '2025-11-27 19:50:17', 0),
(73, 29, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-07 15:47:58', '2025-11-30 15:47:57', 0),
(74, 25, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-07 16:05:00', '2025-11-30 16:04:59', 0),
(75, 29, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-07 16:05:43', '2025-11-30 16:05:43', 0),
(76, 34, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-07 16:08:53', '2025-11-30 16:08:53', 0),
(77, 29, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2025-12-07 16:39:24', '2025-11-30 16:39:24', 0),
(78, 36, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-04 19:04:12', '2026-02-25 19:04:12', 0),
(79, 36, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-04 20:11:14', '2026-02-25 20:11:14', 0),
(80, 56, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-08 16:33:48', '2026-03-01 16:33:48', 0),
(81, 56, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-08 21:03:23', '2026-03-01 21:03:23', 0),
(82, 56, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-08 21:15:15', '2026-03-01 21:15:15', 0),
(83, 56, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-08 21:20:39', '2026-03-01 21:20:39', 0),
(84, 56, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:15:42', '2026-03-02 13:15:42', 0),
(85, 56, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:16:00', '2026-03-02 13:16:00', 0),
(86, 56, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:17:12', '2026-03-02 13:17:12', 0),
(87, 56, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:17:35', '2026-03-02 13:17:35', 0),
(88, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:01', '2026-03-02 13:19:01', 0),
(89, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:02', '2026-03-02 13:19:02', 0),
(90, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:03', '2026-03-02 13:19:03', 0),
(91, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:05', '2026-03-02 13:19:05', 0),
(92, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:06', '2026-03-02 13:19:06', 0),
(93, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:35', '2026-03-02 13:19:35', 0),
(94, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:36', '2026-03-02 13:19:36', 0),
(95, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:37', '2026-03-02 13:19:37', 0),
(96, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:38', '2026-03-02 13:19:38', 0),
(97, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:39', '2026-03-02 13:19:39', 0),
(98, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:40', '2026-03-02 13:19:40', 0),
(100, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:45', '2026-03-02 13:19:45', 0),
(102, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:19:49', '2026-03-02 13:19:49', 0),
(103, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:20:10', '2026-03-02 13:20:10', 0),
(104, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:20:11', '2026-03-02 13:20:11', 0),
(105, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:20:12', '2026-03-02 13:20:12', 0),
(106, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:21:13', '2026-03-02 13:21:13', 0),
(107, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:21:14', '2026-03-02 13:21:14', 0),
(108, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:21:15', '2026-03-02 13:21:15', 0),
(109, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:21:16', '2026-03-02 13:21:16', 0),
(110, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:21:17', '2026-03-02 13:21:17', 0),
(111, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:26:22', '2026-03-02 13:26:22', 0),
(112, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:26:23', '2026-03-02 13:26:23', 0),
(113, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:26:24', '2026-03-02 13:26:24', 0),
(114, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:26:25', '2026-03-02 13:26:25', 0),
(115, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:26:26', '2026-03-02 13:26:26', 0),
(116, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:26:55', '2026-03-02 13:26:55', 0),
(117, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:26:56', '2026-03-02 13:26:56', 0),
(118, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:26:57', '2026-03-02 13:26:57', 0),
(119, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:26:58', '2026-03-02 13:26:58', 0),
(120, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:27:00', '2026-03-02 13:27:00', 0),
(121, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:27:02', '2026-03-02 13:27:02', 0),
(123, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:27:05', '2026-03-02 13:27:05', 0),
(124, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:27:38', '2026-03-02 13:27:38', 0),
(125, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:28:22', '2026-03-02 13:28:22', 0),
(126, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:28:23', '2026-03-02 13:28:23', 0),
(127, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:28:24', '2026-03-02 13:28:24', 0),
(128, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:28:25', '2026-03-02 13:28:25', 0),
(129, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:28:26', '2026-03-02 13:28:26', 0),
(130, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:29:46', '2026-03-02 13:29:46', 0),
(131, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:29:47', '2026-03-02 13:29:47', 0),
(132, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:29:48', '2026-03-02 13:29:48', 0),
(133, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:29:49', '2026-03-02 13:29:49', 0),
(134, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:29:50', '2026-03-02 13:29:50', 0),
(135, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:31:08', '2026-03-02 13:31:08', 0),
(136, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:31:10', '2026-03-02 13:31:10', 0),
(137, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:31:11', '2026-03-02 13:31:11', 0),
(138, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:31:12', '2026-03-02 13:31:12', 0),
(139, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:31:13', '2026-03-02 13:31:13', 0),
(140, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:32:15', '2026-03-02 13:32:15', 0),
(141, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:32:16', '2026-03-02 13:32:16', 0),
(142, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:32:17', '2026-03-02 13:32:17', 0),
(143, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:32:18', '2026-03-02 13:32:18', 0),
(144, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:32:19', '2026-03-02 13:32:19', 0),
(145, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:34:31', '2026-03-02 13:34:31', 0),
(146, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:34:32', '2026-03-02 13:34:32', 0),
(147, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:34:33', '2026-03-02 13:34:33', 0),
(148, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:34:34', '2026-03-02 13:34:34', 0),
(149, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:34:35', '2026-03-02 13:34:35', 0),
(150, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:34:56', '2026-03-02 13:34:56', 0),
(151, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:34:59', '2026-03-02 13:34:59', 0),
(152, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:45:07', '2026-03-02 13:45:07', 0),
(153, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:45:17', '2026-03-02 13:45:17', 0),
(154, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:48:49', '2026-03-02 13:48:49', 0),
(155, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:48:50', '2026-03-02 13:48:50', 0),
(156, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:48:51', '2026-03-02 13:48:51', 0),
(157, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:48:52', '2026-03-02 13:48:52', 0),
(158, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:48:53', '2026-03-02 13:48:53', 0),
(159, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:48:54', '2026-03-02 13:48:54', 0),
(160, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:48:57', '2026-03-02 13:48:57', 0),
(161, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:50:03', '2026-03-02 13:50:03', 0),
(162, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:50:05', '2026-03-02 13:50:05', 0),
(163, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:50:06', '2026-03-02 13:50:06', 0),
(164, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:50:07', '2026-03-02 13:50:07', 0),
(165, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:50:08', '2026-03-02 13:50:08', 0),
(166, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:51:03', '2026-03-02 13:51:03', 0),
(167, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:51:04', '2026-03-02 13:51:04', 0),
(168, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:51:05', '2026-03-02 13:51:05', 0),
(169, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:51:07', '2026-03-02 13:51:07', 0),
(170, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:51:08', '2026-03-02 13:51:08', 0),
(171, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:53:52', '2026-03-02 13:53:52', 0),
(172, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:54:11', '2026-03-02 13:54:11', 0),
(173, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:54:13', '2026-03-02 13:54:13', 0),
(174, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:54:38', '2026-03-02 13:54:38', 0),
(175, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:54:39', '2026-03-02 13:54:39', 0),
(176, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:54:40', '2026-03-02 13:54:40', 0),
(177, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 13:55:38', '2026-03-02 13:55:38', 0),
(178, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:04:10', '2026-03-02 14:04:10', 0),
(179, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:04:12', '2026-03-02 14:04:12', 0),
(180, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:04:13', '2026-03-02 14:04:13', 0),
(181, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:04:14', '2026-03-02 14:04:14', 0),
(182, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:04:15', '2026-03-02 14:04:15', 0),
(183, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:04:16', '2026-03-02 14:04:16', 0),
(184, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:04:19', '2026-03-02 14:04:19', 0),
(185, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:05:36', '2026-03-02 14:05:36', 0),
(186, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:05:37', '2026-03-02 14:05:37', 0),
(187, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:05:38', '2026-03-02 14:05:38', 0),
(188, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:05:40', '2026-03-02 14:05:40', 0),
(189, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:05:41', '2026-03-02 14:05:41', 0),
(190, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:06:46', '2026-03-02 14:06:46', 0),
(191, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:07:06', '2026-03-02 14:07:06', 0),
(192, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:07:16', '2026-03-02 14:07:16', 0),
(193, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:07:26', '2026-03-02 14:07:26', 0),
(194, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:07:59', '2026-03-02 14:07:59', 0);
INSERT INTO `sessions` (`session_id`, `user_id`, `session_token`, `ip_address`, `user_agent`, `device_type`, `expires_at`, `created_at`, `remember_me`) VALUES
(195, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:08:00', '2026-03-02 14:08:00', 0),
(196, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:08:01', '2026-03-02 14:08:01', 0),
(197, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:08:57', '2026-03-02 14:08:57', 0),
(198, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:08:58', '2026-03-02 14:08:58', 0),
(199, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:08:59', '2026-03-02 14:08:59', 0),
(200, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:10:13', '2026-03-02 14:10:13', 0),
(201, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:10:14', '2026-03-02 14:10:14', 0),
(202, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:10:52', '2026-03-02 14:10:52', 0),
(203, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-09 14:11:10', '2026-03-02 14:11:10', 0),
(204, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-09 14:29:47', '2026-03-02 14:29:47', 0),
(205, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-09 14:31:28', '2026-03-02 14:31:28', 0),
(206, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2026-03-09 23:25:33', '2026-03-02 23:25:33', 0),
(207, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2026-03-09 23:26:40', '2026-03-02 23:26:40', 0),
(208, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2026-03-09 23:26:55', '2026-03-02 23:26:55', 0),
(209, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2026-03-09 23:27:10', '2026-03-02 23:27:10', 0),
(210, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.49.1', 'desktop', '2026-03-09 23:27:25', '2026-03-02 23:27:25', 0),
(211, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:42:37', '2026-03-02 23:42:37', 0),
(212, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:42:37', '2026-03-02 23:42:37', 0),
(213, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:42:37', '2026-03-02 23:42:37', 0),
(214, 60, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:42:38', '2026-03-02 23:42:38', 0),
(215, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:42:38', '2026-03-02 23:42:38', 0),
(216, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:43:30', '2026-03-02 23:43:30', 0),
(217, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:43:30', '2026-03-02 23:43:30', 0),
(218, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:44:03', '2026-03-02 23:44:03', 0),
(219, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:44:03', '2026-03-02 23:44:03', 0),
(220, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:44:19', '2026-03-02 23:44:19', 0),
(221, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:47:20', '2026-03-02 23:47:20', 0),
(222, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:47:20', '2026-03-02 23:47:20', 0),
(223, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:47:21', '2026-03-02 23:47:21', 0),
(224, 60, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:47:21', '2026-03-02 23:47:21', 0),
(225, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-09 23:47:21', '2026-03-02 23:47:21', 0),
(226, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-09 23:49:40', '2026-03-02 23:49:40', 0),
(227, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-09 23:49:59', '2026-03-02 23:49:59', 0),
(228, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-09 23:50:11', '2026-03-02 23:50:11', 0),
(229, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-09 23:50:43', '2026-03-02 23:50:43', 0),
(230, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-09 23:51:00', '2026-03-02 23:51:00', 0),
(231, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 00:09:51', '2026-03-03 00:09:51', 0),
(232, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 00:09:52', '2026-03-03 00:09:52', 0),
(233, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 00:09:53', '2026-03-03 00:09:53', 0),
(234, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 00:10:40', '2026-03-03 00:10:40', 0),
(235, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 00:10:41', '2026-03-03 00:10:41', 0),
(236, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 00:21:58', '2026-03-03 00:21:58', 0),
(237, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 00:21:58', '2026-03-03 00:21:58', 0),
(238, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 00:21:58', '2026-03-03 00:21:58', 0),
(239, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 00:21:58', '2026-03-03 00:21:59', 0),
(240, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 00:21:59', '2026-03-03 00:21:59', 0),
(241, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:11:08', '2026-03-03 18:11:08', 0),
(242, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:11:14', '2026-03-03 18:11:14', 0),
(243, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:11:24', '2026-03-03 18:11:24', 0),
(244, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:11:25', '2026-03-03 18:11:25', 0),
(245, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:11:26', '2026-03-03 18:11:26', 0),
(246, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:11:27', '2026-03-03 18:11:27', 0),
(247, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:11:28', '2026-03-03 18:11:28', 0),
(248, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:14:42', '2026-03-03 18:14:42', 0),
(249, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:14:43', '2026-03-03 18:14:43', 0),
(250, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:14:44', '2026-03-03 18:14:44', 0),
(251, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:14:45', '2026-03-03 18:14:45', 0),
(252, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:14:46', '2026-03-03 18:14:46', 0),
(253, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:16:36', '2026-03-03 18:16:36', 0),
(254, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:16:37', '2026-03-03 18:16:37', 0),
(255, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:16:38', '2026-03-03 18:16:38', 0),
(256, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:16:39', '2026-03-03 18:16:39', 0),
(257, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:16:40', '2026-03-03 18:16:40', 0),
(258, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:18:22', '2026-03-03 18:18:22', 0),
(259, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:18:23', '2026-03-03 18:18:23', 0),
(260, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:18:25', '2026-03-03 18:18:25', 0),
(261, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:18:26', '2026-03-03 18:18:26', 0),
(262, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:18:27', '2026-03-03 18:18:27', 0),
(263, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:20:11', '2026-03-03 18:20:11', 0),
(264, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:20:13', '2026-03-03 18:20:13', 0),
(265, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:20:14', '2026-03-03 18:20:14', 0),
(266, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:20:15', '2026-03-03 18:20:15', 0),
(267, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:20:16', '2026-03-03 18:20:16', 0),
(268, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:21:43', '2026-03-03 18:21:43', 0),
(269, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:21:44', '2026-03-03 18:21:44', 0),
(270, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:21:45', '2026-03-03 18:21:45', 0),
(271, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:21:46', '2026-03-03 18:21:46', 0),
(272, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:21:47', '2026-03-03 18:21:47', 0),
(273, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:23:19', '2026-03-03 18:23:19', 0),
(274, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:23:20', '2026-03-03 18:23:20', 0),
(275, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:23:21', '2026-03-03 18:23:21', 0),
(276, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:23:22', '2026-03-03 18:23:22', 0),
(277, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:23:23', '2026-03-03 18:23:23', 0),
(278, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:26:47', '2026-03-03 18:26:47', 0),
(279, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:26:48', '2026-03-03 18:26:48', 0),
(280, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:26:49', '2026-03-03 18:26:49', 0),
(281, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:26:50', '2026-03-03 18:26:50', 0),
(282, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:26:51', '2026-03-03 18:26:51', 0),
(283, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 18:31:56', '2026-03-03 18:31:56', 0),
(284, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 18:31:56', '2026-03-03 18:31:56', 0),
(285, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 18:31:56', '2026-03-03 18:31:56', 0),
(286, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 18:31:56', '2026-03-03 18:31:56', 0),
(287, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-10 18:31:57', '2026-03-03 18:31:57', 0),
(288, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:41:38', '2026-03-03 18:41:38', 0),
(289, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:41:39', '2026-03-03 18:41:39', 0),
(290, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:41:40', '2026-03-03 18:41:40', 0),
(291, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:44:34', '2026-03-03 18:44:34', 0),
(292, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:44:35', '2026-03-03 18:44:35', 0),
(293, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:44:36', '2026-03-03 18:44:36', 0),
(294, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:44:37', '2026-03-03 18:44:37', 0),
(295, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-10 18:44:38', '2026-03-03 18:44:38', 0),
(296, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 02:09:25', '2026-03-04 02:09:25', 0),
(297, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 14:12:10', '2026-03-04 14:12:10', 0),
(298, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 14:16:33', '2026-03-04 14:16:33', 0),
(299, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 14:43:56', '2026-03-04 14:43:56', 0),
(300, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 14:45:07', '2026-03-04 14:45:07', 0),
(301, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 14:46:14', '2026-03-04 14:46:14', 0),
(302, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 14:46:50', '2026-03-04 14:46:50', 0),
(303, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 14:48:16', '2026-03-04 14:48:16', 0),
(304, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 15:05:09', '2026-03-04 15:05:09', 0),
(305, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 15:06:09', '2026-03-04 15:06:09', 0),
(306, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-11 15:08:34', '2026-03-04 15:08:34', 0),
(307, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-12 19:14:37', '2026-03-05 19:14:37', 0),
(308, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-12 19:14:37', '2026-03-05 19:14:37', 0),
(309, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-12 19:14:37', '2026-03-05 19:14:37', 0),
(310, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-12 19:14:37', '2026-03-05 19:14:37', 0),
(311, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-12 19:14:37', '2026-03-05 19:14:37', 0),
(312, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 19:25:49', '2026-03-07 19:25:49', 0),
(313, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 19:26:10', '2026-03-07 19:26:10', 0),
(314, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 19:26:31', '2026-03-07 19:26:31', 0),
(315, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 19:28:07', '2026-03-07 19:28:07', 0),
(316, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 19:29:06', '2026-03-07 19:29:06', 0),
(317, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 19:29:46', '2026-03-07 19:29:46', 0),
(318, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 19:33:30', '2026-03-07 19:33:30', 0),
(319, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 19:33:57', '2026-03-07 19:33:57', 0),
(320, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 19:34:14', '2026-03-07 19:34:14', 0),
(321, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-14 20:03:40', '2026-03-07 20:03:40', 0),
(322, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-14 20:12:50', '2026-03-07 20:12:50', 0),
(323, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 13:22:33', '2026-03-10 13:22:33', 0),
(324, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 13:28:13', '2026-03-10 13:28:13', 0),
(325, 57, '[REDACTED], '127.0.0.1', 'axios/1.13.2', 'desktop', '2026-03-17 13:59:40', '2026-03-10 13:59:40', 0),
(326, 57, '[REDACTED], '127.0.0.1', 'axios/1.13.2', 'desktop', '2026-03-17 14:05:07', '2026-03-10 14:05:07', 0),
(327, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 14:05:53', '2026-03-10 14:05:53', 0);
INSERT INTO `sessions` (`session_id`, `user_id`, `session_token`, `ip_address`, `user_agent`, `device_type`, `expires_at`, `created_at`, `remember_me`) VALUES
(328, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 14:10:25', '2026-03-10 14:10:25', 0),
(329, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:14:35', '2026-03-10 14:14:35', 0),
(330, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:14:39', '2026-03-10 14:14:39', 0),
(331, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:20:59', '2026-03-10 14:20:59', 0),
(332, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:21:12', '2026-03-10 14:21:12', 0),
(333, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:24:46', '2026-03-10 14:24:46', 0),
(334, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:24:49', '2026-03-10 14:24:49', 0),
(335, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:27:53', '2026-03-10 14:27:53', 0),
(336, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:27:54', '2026-03-10 14:27:54', 0),
(337, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:33:54', '2026-03-10 14:33:54', 0),
(338, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:33:58', '2026-03-10 14:33:58', 0),
(339, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:37:33', '2026-03-10 14:37:33', 0),
(340, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:37:35', '2026-03-10 14:37:35', 0),
(341, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:37:47', '2026-03-10 14:37:47', 0),
(342, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:56:11', '2026-03-10 14:56:11', 0),
(343, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 14:56:11', '2026-03-10 14:56:11', 0),
(344, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 15:37:13', '2026-03-10 15:37:13', 0),
(345, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 15:37:15', '2026-03-10 15:37:15', 0),
(346, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 15:41:54', '2026-03-10 15:41:54', 0),
(347, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 15:43:01', '2026-03-10 15:43:01', 0),
(348, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 17:20:13', '2026-03-10 17:20:13', 0),
(349, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 17:24:25', '2026-03-10 17:24:25', 0),
(350, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 17:24:40', '2026-03-10 17:24:40', 0),
(351, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 17:25:41', '2026-03-10 17:25:41', 0),
(352, 59, '[REDACTED], '127.0.0.1', 'curl/8.14.1', 'desktop', '2026-03-17 18:06:26', '2026-03-10 18:06:26', 0),
(353, 57, '[REDACTED], '127.0.0.1', 'curl/8.14.1', 'desktop', '2026-03-17 18:06:27', '2026-03-10 18:06:27', 0),
(354, 57, '[REDACTED], '127.0.0.1', 'curl/8.14.1', 'desktop', '2026-03-17 18:06:53', '2026-03-10 18:06:53', 0),
(355, 59, '[REDACTED], '127.0.0.1', 'curl/8.14.1', 'desktop', '2026-03-17 18:14:03', '2026-03-10 18:14:03', 0),
(356, 57, '[REDACTED], '127.0.0.1', 'curl/8.14.1', 'desktop', '2026-03-17 18:14:03', '2026-03-10 18:14:03', 0),
(357, 57, '[REDACTED], '127.0.0.1', 'curl/8.14.1', 'desktop', '2026-03-17 18:14:22', '2026-03-10 18:14:22', 0),
(358, 57, '[REDACTED], '127.0.0.1', 'curl/8.14.1', 'desktop', '2026-03-17 18:14:23', '2026-03-10 18:14:23', 0),
(359, 61, '[REDACTED], '127.0.0.1', 'curl/8.14.1', 'desktop', '2026-03-17 18:15:13', '2026-03-10 18:15:13', 0),
(360, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 18:59:51', '2026-03-10 18:59:51', 0),
(361, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:01:30', '2026-03-10 19:01:30', 0),
(362, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:03:35', '2026-03-10 19:03:35', 0),
(363, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:03:58', '2026-03-10 19:03:58', 0),
(364, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:03:59', '2026-03-10 19:03:59', 0),
(365, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:04:26', '2026-03-10 19:04:26', 0),
(366, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:04:28', '2026-03-10 19:04:28', 0),
(367, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:05:06', '2026-03-10 19:05:06', 0),
(368, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:05:28', '2026-03-10 19:05:28', 0),
(369, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:05:32', '2026-03-10 19:05:32', 0),
(370, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:05:59', '2026-03-10 19:05:59', 0),
(371, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 19:06:02', '2026-03-10 19:06:02', 0),
(372, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:02:27', '2026-03-10 20:02:26', 0),
(373, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:02:36', '2026-03-10 20:02:36', 0),
(374, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:02:49', '2026-03-10 20:02:49', 0),
(375, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:02:51', '2026-03-10 20:02:51', 0),
(376, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:02:53', '2026-03-10 20:02:53', 0),
(377, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:03:35', '2026-03-10 20:03:34', 0),
(378, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:03:37', '2026-03-10 20:03:36', 0),
(379, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:03:58', '2026-03-10 20:03:57', 0),
(380, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:04:25', '2026-03-10 20:04:24', 0),
(381, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:04:41', '2026-03-10 20:04:40', 0),
(382, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:05:01', '2026-03-10 20:05:01', 0),
(383, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:05:25', '2026-03-10 20:05:24', 0),
(384, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:05:49', '2026-03-10 20:05:48', 0),
(385, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-17 20:07:29', '2026-03-10 20:07:29', 0),
(386, 63, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 20:13:57', '2026-03-10 20:13:56', 0),
(387, 64, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 20:14:13', '2026-03-10 20:14:13', 0),
(388, 65, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 20:14:30', '2026-03-10 20:14:30', 0),
(389, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 20:14:45', '2026-03-10 20:14:44', 0),
(390, 67, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 20:15:00', '2026-03-10 20:15:00', 0),
(391, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:15:51', '2026-03-10 20:15:51', 0),
(392, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:15:51', '2026-03-10 20:15:51', 0),
(393, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:15:52', '2026-03-10 20:15:51', 0),
(394, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:15:52', '2026-03-10 20:15:51', 0),
(395, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:15:52', '2026-03-10 20:15:51', 0),
(396, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:23:40', '2026-03-10 20:23:40', 0),
(397, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:23:40', '2026-03-10 20:23:40', 0),
(398, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:23:40', '2026-03-10 20:23:40', 0),
(399, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:23:41', '2026-03-10 20:23:40', 0),
(400, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-03-17 20:23:41', '2026-03-10 20:23:40', 0),
(401, 64, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 21:15:30', '2026-03-10 21:15:30', 0),
(402, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 21:27:46', '2026-03-10 21:27:46', 0),
(403, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 21:54:03', '2026-03-10 21:54:03', 0),
(404, 64, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-17 22:00:16', '2026-03-10 22:00:15', 0),
(405, 59, '[REDACTED], '127.0.0.1', 'Apidog/1.0.0 (https://apidog.com)', 'desktop', '2026-04-10 17:05:22', '2026-03-11 17:05:21', 1),
(406, 58, '[REDACTED], '127.0.0.1', 'Apidog/1.0.0 (https://apidog.com)', 'desktop', '2026-04-10 17:05:44', '2026-03-11 17:05:44', 1),
(407, 60, '[REDACTED], '127.0.0.1', 'Apidog/1.0.0 (https://apidog.com)', 'desktop', '2026-04-10 17:06:29', '2026-03-11 17:06:28', 1),
(408, 61, '[REDACTED], '127.0.0.1', 'Apidog/1.0.0 (https://apidog.com)', 'desktop', '2026-04-10 17:06:37', '2026-03-11 17:06:37', 1),
(409, 57, '[REDACTED], '127.0.0.1', 'Apidog/1.0.0 (https://apidog.com)', 'desktop', '2026-04-10 17:11:58', '2026-03-11 17:11:57', 1),
(410, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:19:26', '2026-03-11 17:19:26', 1),
(411, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:19:26', '2026-03-11 17:19:26', 1),
(412, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:19:26', '2026-03-11 17:19:26', 1),
(413, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:19:27', '2026-03-11 17:19:26', 1),
(414, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:19:27', '2026-03-11 17:19:26', 1),
(416, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:37:10', '2026-03-11 17:37:09', 1),
(417, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:37:10', '2026-03-11 17:37:10', 1),
(418, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:37:10', '2026-03-11 17:37:10', 1),
(419, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:37:10', '2026-03-11 17:37:10', 1),
(420, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 17:37:11', '2026-03-11 17:37:10', 1),
(421, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:14:38', '2026-03-11 18:14:37', 1),
(422, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:14:39', '2026-03-11 18:14:39', 1),
(423, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:14:40', '2026-03-11 18:14:40', 1),
(424, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:18:38', '2026-03-11 18:18:38', 1),
(425, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:18:39', '2026-03-11 18:18:39', 1),
(426, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:18:40', '2026-03-11 18:18:40', 1),
(427, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:21:52', '2026-03-11 18:21:52', 1),
(428, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:22:30', '2026-03-11 18:22:29', 1),
(429, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:22:31', '2026-03-11 18:22:30', 1),
(430, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:22:32', '2026-03-11 18:22:31', 1),
(431, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:23:41', '2026-03-11 18:23:41', 1),
(432, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:23:42', '2026-03-11 18:23:42', 1),
(433, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-04-10 18:23:43', '2026-03-11 18:23:43', 1),
(435, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 18:28:57', '2026-03-11 18:28:56', 1),
(436, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 18:28:57', '2026-03-11 18:28:56', 1),
(437, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 18:28:57', '2026-03-11 18:28:57', 1),
(438, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 18:28:57', '2026-03-11 18:28:57', 1),
(439, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-10 18:28:58', '2026-03-11 18:28:57', 1),
(441, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:17:20', '2026-03-14 15:17:20', 1),
(442, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:17:20', '2026-03-14 15:17:20', 1),
(443, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:17:20', '2026-03-14 15:17:20', 1),
(444, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:17:21', '2026-03-14 15:17:20', 1),
(445, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:17:21', '2026-03-14 15:17:20', 1),
(447, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:16', '2026-03-14 15:35:15', 1),
(448, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:16', '2026-03-14 15:35:16', 1),
(449, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:16', '2026-03-14 15:35:16', 1),
(450, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:16', '2026-03-14 15:35:16', 1),
(451, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:17', '2026-03-14 15:35:16', 1),
(453, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:25', '2026-03-14 15:35:25', 1),
(454, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:25', '2026-03-14 15:35:25', 1),
(455, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:26', '2026-03-14 15:35:25', 1),
(456, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:26', '2026-03-14 15:35:25', 1),
(457, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:35:26', '2026-03-14 15:35:26', 1),
(459, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:40:11', '2026-03-14 15:40:11', 1),
(460, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:40:11', '2026-03-14 15:40:11', 1),
(461, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:40:11', '2026-03-14 15:40:11', 1),
(462, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:40:12', '2026-03-14 15:40:11', 1),
(463, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 15:40:12', '2026-03-14 15:40:11', 1),
(464, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 15:50:08', '2026-03-14 15:50:08', 0),
(465, 59, '[REDACTED], '127.0.0.1', 'node', 'desktop', '2026-04-13 15:50:40', '2026-03-14 15:50:39', 1),
(466, 59, '[REDACTED], '127.0.0.1', 'node', 'desktop', '2026-04-13 15:52:10', '2026-03-14 15:52:09', 1),
(467, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 15:52:58', '2026-03-14 15:52:57', 0),
(469, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 15:58:11', '2026-03-14 15:58:10', 0);
INSERT INTO `sessions` (`session_id`, `user_id`, `session_token`, `ip_address`, `user_agent`, `device_type`, `expires_at`, `created_at`, `remember_me`) VALUES
(470, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 15:59:56', '2026-03-14 15:59:55', 0),
(471, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 15:59:58', '2026-03-14 15:59:58', 0),
(472, 59, '[REDACTED], '127.0.0.1', 'node', 'desktop', '2026-04-13 16:01:37', '2026-03-14 16:01:37', 1),
(473, 59, '[REDACTED], '127.0.0.1', 'node', 'desktop', '2026-04-13 16:04:02', '2026-03-14 16:04:01', 1),
(474, 57, '[REDACTED], '127.0.0.1', 'node', 'desktop', '2026-04-13 16:04:02', '2026-03-14 16:04:01', 1),
(476, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 16:05:56', '2026-03-14 16:05:55', 1),
(477, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 16:05:56', '2026-03-14 16:05:55', 1),
(478, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 16:05:56', '2026-03-14 16:05:56', 1),
(479, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 16:05:56', '2026-03-14 16:05:56', 1),
(480, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-13 16:05:56', '2026-03-14 16:05:56', 1),
(481, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 17:45:36', '2026-03-14 17:45:35', 0),
(482, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 17:46:33', '2026-03-14 17:46:33', 0),
(483, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 17:47:02', '2026-03-14 17:47:02', 0),
(484, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 17:47:39', '2026-03-14 17:47:39', 0),
(485, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 17:59:53', '2026-03-14 17:59:52', 0),
(486, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 18:24:11', '2026-03-14 18:24:10', 0),
(487, 60, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-21 18:27:05', '2026-03-14 18:27:04', 0),
(488, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 14:12:25', '2026-03-15 14:12:24', 0),
(489, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 14:13:15', '2026-03-15 14:13:14', 0),
(490, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 15:14:34', '2026-03-15 15:14:33', 0),
(491, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 15:22:00', '2026-03-15 15:22:00', 0),
(493, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 21:40:59', '2026-03-15 21:40:59', 0),
(494, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-14 21:42:02', '2026-03-15 21:42:02', 1),
(495, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 21:58:41', '2026-03-15 21:58:40', 0),
(496, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 22:02:13', '2026-03-15 22:02:12', 0),
(497, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 22:13:12', '2026-03-15 22:13:11', 0),
(498, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 22:20:01', '2026-03-15 22:20:01', 0),
(499, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 22:59:59', '2026-03-15 22:59:59', 0),
(500, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 23:04:59', '2026-03-15 23:04:59', 0),
(501, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 23:10:10', '2026-03-15 23:10:10', 0),
(502, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-14 23:20:29', '2026-03-15 23:20:28', 1),
(503, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.51.1', 'desktop', '2026-04-14 23:20:46', '2026-03-15 23:20:45', 1),
(504, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-22 23:42:41', '2026-03-15 23:42:41', 0),
(505, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', '2026-03-23 00:07:25', '2026-03-16 00:07:24', 0),
(506, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 19:09:00', '2026-03-16 19:09:00', 0),
(507, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 19:52:44', '2026-03-16 19:52:44', 0),
(508, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 19:52:57', '2026-03-16 19:52:56', 0),
(509, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 19:53:09', '2026-03-16 19:53:09', 0),
(510, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 19:53:37', '2026-03-16 19:53:37', 0),
(511, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 19:55:53', '2026-03-16 19:55:53', 0),
(512, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 19:58:35', '2026-03-16 19:58:34', 0),
(513, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 19:58:54', '2026-03-16 19:58:54', 0),
(514, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 19:59:46', '2026-03-16 19:59:45', 0),
(515, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 20:06:48', '2026-03-16 20:06:47', 0),
(516, 67, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 20:07:55', '2026-03-16 20:07:55', 0),
(518, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:18:22', '2026-03-16 20:18:21', 1),
(519, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:18:22', '2026-03-16 20:18:21', 1),
(520, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:18:22', '2026-03-16 20:18:22', 1),
(521, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:18:22', '2026-03-16 20:18:22', 1),
(522, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:18:54', '2026-03-16 20:18:53', 1),
(524, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:20:00', '2026-03-16 20:19:59', 1),
(525, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:20:00', '2026-03-16 20:20:00', 1),
(526, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:20:00', '2026-03-16 20:20:00', 1),
(527, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:20:00', '2026-03-16 20:20:00', 1),
(528, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:20:01', '2026-03-16 20:20:00', 1),
(529, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 20:29:01', '2026-03-16 20:29:01', 0),
(531, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:32:41', '2026-03-16 20:32:40', 1),
(532, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:32:41', '2026-03-16 20:32:40', 1),
(533, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:32:41', '2026-03-16 20:32:40', 1),
(534, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:32:41', '2026-03-16 20:32:41', 1),
(535, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:32:41', '2026-03-16 20:32:41', 1),
(536, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 20:34:32', '2026-03-16 20:34:32', 0),
(537, 67, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 20:34:43', '2026-03-16 20:34:43', 0),
(539, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:44:47', '2026-03-16 20:44:47', 1),
(540, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:44:47', '2026-03-16 20:44:47', 1),
(541, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:44:47', '2026-03-16 20:44:47', 1),
(542, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:44:48', '2026-03-16 20:44:47', 1),
(543, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:44:48', '2026-03-16 20:44:47', 1),
(545, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:45:06', '2026-03-16 20:45:06', 1),
(546, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:45:06', '2026-03-16 20:45:06', 1),
(547, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:45:06', '2026-03-16 20:45:06', 1),
(548, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:45:07', '2026-03-16 20:45:06', 1),
(549, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:45:07', '2026-03-16 20:45:06', 1),
(551, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:53:42', '2026-03-16 20:53:42', 1),
(552, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:53:42', '2026-03-16 20:53:42', 1),
(553, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:53:43', '2026-03-16 20:53:42', 1),
(554, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:53:43', '2026-03-16 20:53:42', 1),
(555, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 20:53:43', '2026-03-16 20:53:42', 1),
(556, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:55:53', '2026-03-16 20:55:53', 0),
(557, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:55:53', '2026-03-16 20:55:53', 0),
(558, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:55:53', '2026-03-16 20:55:53', 0),
(559, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:55:54', '2026-03-16 20:55:53', 0),
(560, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:55:54', '2026-03-16 20:55:53', 0),
(561, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:56:24', '2026-03-16 20:56:24', 0),
(562, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:56:24', '2026-03-16 20:56:24', 0),
(563, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:56:24', '2026-03-16 20:56:24', 0),
(564, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:56:25', '2026-03-16 20:56:24', 0),
(565, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-03-23 20:56:25', '2026-03-16 20:56:24', 0),
(566, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 20:56:46', '2026-03-16 20:56:45', 0),
(567, 67, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 20:58:11', '2026-03-16 20:58:10', 0),
(568, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 22:02:14', '2026-03-16 22:02:13', 0),
(569, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.26200; en-US) PowerShell/7.5.4', 'desktop', '2026-03-23 22:03:43', '2026-03-16 22:03:43', 0),
(570, 61, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'desktop', '2026-03-23 22:04:58', '2026-03-16 22:04:57', 0),
(571, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'desktop', '2026-03-23 22:04:58', '2026-03-16 22:04:57', 0),
(572, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'desktop', '2026-03-23 22:04:58', '2026-03-16 22:04:57', 0),
(573, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 22:16:02', '2026-03-16 22:16:02', 0),
(574, 67, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-23 22:19:25', '2026-03-16 22:19:24', 0),
(576, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:31:18', '2026-03-16 22:31:18', 1),
(577, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:31:19', '2026-03-16 22:31:18', 1),
(578, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:31:19', '2026-03-16 22:31:18', 1),
(579, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:31:19', '2026-03-16 22:31:18', 1),
(580, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:31:19', '2026-03-16 22:31:19', 1),
(582, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:35:07', '2026-03-16 22:35:06', 1),
(583, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:35:07', '2026-03-16 22:35:06', 1),
(584, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:35:07', '2026-03-16 22:35:07', 1),
(585, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:35:07', '2026-03-16 22:35:07', 1),
(586, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 22:35:07', '2026-03-16 22:35:07', 1),
(587, 57, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'desktop', '2026-03-23 23:36:36', '2026-03-16 23:36:36', 0),
(588, 58, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'desktop', '2026-03-23 23:36:37', '2026-03-16 23:36:36', 0),
(589, 59, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.7705', 'desktop', '2026-03-23 23:36:37', '2026-03-16 23:36:36', 0),
(590, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:38:46', '2026-03-16 23:38:46', 0),
(591, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:38:46', '2026-03-16 23:38:46', 0),
(592, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:38:47', '2026-03-16 23:38:46', 0),
(593, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:38:47', '2026-03-16 23:38:46', 0),
(594, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:38:59', '2026-03-16 23:38:58', 0),
(595, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:38:59', '2026-03-16 23:38:58', 0),
(596, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:38:59', '2026-03-16 23:38:58', 0),
(597, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:38:59', '2026-03-16 23:38:58', 0),
(598, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:40:05', '2026-03-16 23:40:04', 0),
(599, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:40:05', '2026-03-16 23:40:04', 0),
(600, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:40:05', '2026-03-16 23:40:04', 0),
(601, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:40:05', '2026-03-16 23:40:04', 0),
(602, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:41:31', '2026-03-16 23:41:31', 0),
(603, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:41:31', '2026-03-16 23:41:31', 0),
(604, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:41:31', '2026-03-16 23:41:31', 0),
(605, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:41:32', '2026-03-16 23:41:31', 0),
(606, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:43:33', '2026-03-16 23:43:32', 0),
(607, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:43:33', '2026-03-16 23:43:33', 0),
(608, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:43:33', '2026-03-16 23:43:33', 0),
(609, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:43:33', '2026-03-16 23:43:33', 0),
(610, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:43:55', '2026-03-16 23:43:55', 0),
(611, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:43:55', '2026-03-16 23:43:55', 0),
(612, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:43:55', '2026-03-16 23:43:55', 0),
(613, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:43:55', '2026-03-16 23:43:55', 0),
(614, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:45:37', '2026-03-16 23:45:36', 0),
(615, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:45:37', '2026-03-16 23:45:36', 0),
(616, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:45:37', '2026-03-16 23:45:37', 0),
(617, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:45:37', '2026-03-16 23:45:37', 0),
(618, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:52:50', '2026-03-16 23:52:50', 0),
(619, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:52:50', '2026-03-16 23:52:50', 0),
(620, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:52:51', '2026-03-16 23:52:50', 0),
(621, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:52:51', '2026-03-16 23:52:50', 0),
(622, 57, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:54:21', '2026-03-16 23:54:20', 0);
INSERT INTO `sessions` (`session_id`, `user_id`, `session_token`, `ip_address`, `user_agent`, `device_type`, `expires_at`, `created_at`, `remember_me`) VALUES
(623, 58, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:54:21', '2026-03-16 23:54:20', 0),
(624, 59, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:54:21', '2026-03-16 23:54:20', 0),
(625, 61, '[REDACTED], '127.0.0.1', NULL, '', '2026-03-23 23:54:21', '2026-03-16 23:54:21', 0),
(627, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 23:58:54', '2026-03-16 23:58:54', 1),
(628, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 23:58:54', '2026-03-16 23:58:54', 1),
(629, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 23:58:55', '2026-03-16 23:58:54', 1),
(630, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 23:58:55', '2026-03-16 23:58:54', 1),
(631, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-15 23:58:55', '2026-03-16 23:58:54', 1),
(633, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:01:35', '2026-03-17 00:01:34', 1),
(634, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:01:35', '2026-03-17 00:01:34', 1),
(635, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:01:35', '2026-03-17 00:01:35', 1),
(636, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:01:35', '2026-03-17 00:01:35', 1),
(637, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:01:35', '2026-03-17 00:01:35', 1),
(639, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:21:35', '2026-03-17 00:21:35', 1),
(640, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:21:35', '2026-03-17 00:21:35', 1),
(641, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:21:35', '2026-03-17 00:21:35', 1),
(642, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:21:36', '2026-03-17 00:21:35', 1),
(643, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:21:36', '2026-03-17 00:21:35', 1),
(644, 63, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-24 00:22:59', '2026-03-17 00:22:59', 0),
(646, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:34:18', '2026-03-17 00:34:18', 1),
(647, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:34:18', '2026-03-17 00:34:18', 1),
(648, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:34:18', '2026-03-17 00:34:18', 1),
(649, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:34:19', '2026-03-17 00:34:18', 1),
(650, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:34:19', '2026-03-17 00:34:18', 1),
(651, 66, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-24 00:36:58', '2026-03-17 00:36:57', 0),
(653, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:50:14', '2026-03-17 00:50:14', 1),
(654, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:50:14', '2026-03-17 00:50:14', 1),
(655, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:50:15', '2026-03-17 00:50:14', 1),
(656, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:50:15', '2026-03-17 00:50:14', 1),
(657, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:50:15', '2026-03-17 00:50:14', 1),
(659, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:56:59', '2026-03-17 00:56:59', 1),
(660, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:57:00', '2026-03-17 00:56:59', 1),
(661, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:57:00', '2026-03-17 00:56:59', 1),
(662, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:57:00', '2026-03-17 00:57:00', 1),
(663, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 00:57:00', '2026-03-17 00:57:00', 1),
(664, 63, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-24 01:02:55', '2026-03-17 01:02:54', 0),
(665, 63, '[REDACTED], '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'desktop', '2026-03-24 01:09:56', '2026-03-17 01:09:56', 0),
(666, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:11:58', '2026-03-17 01:11:57', 1),
(667, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:11:58', '2026-03-17 01:11:57', 1),
(668, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:11:58', '2026-03-17 01:11:57', 1),
(669, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:11:58', '2026-03-17 01:11:58', 1),
(670, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:11:58', '2026-03-17 01:11:58', 1),
(671, 59, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:13:45', '2026-03-17 01:13:45', 1),
(672, 58, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:13:45', '2026-03-17 01:13:45', 1),
(673, 57, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:13:46', '2026-03-17 01:13:45', 1),
(674, 60, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:13:46', '2026-03-17 01:13:45', 1),
(675, 61, '[REDACTED], '127.0.0.1', 'PostmanRuntime/7.52.0', 'desktop', '2026-04-16 01:13:46', '2026-03-17 01:13:45', 1);

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

--
-- Table structure for table `ssl_certificates`
--

DROP TABLE IF EXISTS `ssl_certificates`;
CREATE TABLE IF NOT EXISTS `ssl_certificates` (
  `cert_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `campus_id` bigint UNSIGNED NOT NULL,
  `domain_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `certificate_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `private_key_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `issuer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `valid_from` date NOT NULL,
  `valid_until` date NOT NULL,
  `status` enum('active','expiring_soon','expired','revoked') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `auto_renew` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`cert_id`),
  KEY `idx_campus` (`campus_id`),
  KEY `idx_status` (`status`),
  KEY `idx_expiry` (`valid_until`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ssl_certificates`
--

INSERT INTO `ssl_certificates` (`cert_id`, `campus_id`, `domain_name`, `certificate_path`, `private_key_path`, `issuer`, `valid_from`, `valid_until`, `status`, `auto_renew`, `created_at`, `updated_at`) VALUES
(1, 1, 'main.campus.edu', '/etc/ssl/certs/main_campus.crt', '/etc/ssl/private/main_campus.key', 'Let\'s Encrypt', '2025-01-01', '2025-12-31', 'active', 1, '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(2, 2, 'downtown.campus.edu', '/etc/ssl/certs/downtown.crt', '/etc/ssl/private/downtown.key', 'DigiCert', '2024-06-01', '2025-05-31', 'expiring_soon', 1, '2025-11-20 13:43:01', '2025-11-20 13:43:01'),
(3, 3, 'online.campus.edu', '/etc/ssl/certs/online.crt', '/etc/ssl/private/online.key', 'Let\'s Encrypt', '2025-02-01', '2026-01-31', 'active', 1, '2025-11-20 13:43:01', '2025-11-20 13:43:01');

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

--
-- Table structure for table `student_progress`
--

DROP TABLE IF EXISTS `student_progress`;
CREATE TABLE IF NOT EXISTS `student_progress` (
  `progress_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED NOT NULL,
  `enrollment_id` bigint UNSIGNED NOT NULL,
  `completion_percentage` decimal(5,2) DEFAULT '0.00',
  `materials_viewed` int DEFAULT '0',
  `total_materials` int DEFAULT '0',
  `assignments_completed` int DEFAULT '0',
  `total_assignments` int DEFAULT '0',
  `quizzes_completed` int DEFAULT '0',
  `total_quizzes` int DEFAULT '0',
  `average_score` decimal(5,2) DEFAULT NULL,
  `time_spent_minutes` int DEFAULT '0',
  `last_activity_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`progress_id`),
  UNIQUE KEY `unique_user_course` (`user_id`,`course_id`),
  KEY `enrollment_id` (`enrollment_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_user_course_completion` (`user_id`,`course_id`,`completion_percentage`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `student_progress`
--

INSERT INTO `student_progress` (`progress_id`, `user_id`, `course_id`, `enrollment_id`, `completion_percentage`, `materials_viewed`, `total_materials`, `assignments_completed`, `total_assignments`, `quizzes_completed`, `total_quizzes`, `average_score`, `time_spent_minutes`, `last_activity_at`, `updated_at`) VALUES
(6, 57, 1, 235, 65.00, 8, 12, 3, 5, 2, 4, 78.50, 420, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(7, 57, 2, 236, 45.00, 5, 10, 2, 4, 1, 3, 82.00, 280, '2026-03-10 18:12:04', '2026-03-11 18:12:04'),
(8, 57, 3, 237, 80.00, 10, 12, 4, 5, 3, 3, 91.25, 560, '2026-03-11 16:12:04', '2026-03-11 18:12:04'),
(9, 57, 4, 238, 30.00, 3, 10, 1, 4, 0, 2, 70.00, 150, '2026-03-08 18:12:04', '2026-03-11 18:12:04');

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

--
-- Table structure for table `student_tasks`
--

DROP TABLE IF EXISTS `student_tasks`;
CREATE TABLE IF NOT EXISTS `student_tasks` (
  `task_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `task_type` enum('assignment','quiz','lab','study','custom') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `assignment_id` bigint UNSIGNED DEFAULT NULL,
  `quiz_id` bigint UNSIGNED DEFAULT NULL,
  `lab_id` bigint UNSIGNED DEFAULT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `due_date` timestamp NULL DEFAULT NULL,
  `priority` enum('low','medium','high') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `status` enum('pending','in_progress','completed','overdue') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `completion_percentage` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`task_id`),
  KEY `assignment_id` (`assignment_id`),
  KEY `quiz_id` (`quiz_id`),
  KEY `lab_id` (`lab_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_status` (`status`),
  KEY `idx_due_date` (`due_date`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `student_tasks`
--

INSERT INTO `student_tasks` (`task_id`, `user_id`, `task_type`, `assignment_id`, `quiz_id`, `lab_id`, `title`, `description`, `due_date`, `priority`, `status`, `completion_percentage`, `created_at`, `updated_at`) VALUES
(5, 8, 'custom', NULL, NULL, NULL, 'Review lecture notes', 'Go through weeks 1-3', '2025-02-20 21:59:59', 'medium', 'in_progress', 75, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(6, 9, 'study', NULL, NULL, NULL, 'Prepare for midterm', 'Review all materials', '2025-03-15 21:59:59', 'high', 'in_progress', 40, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(7, 57, 'assignment', NULL, NULL, NULL, 'Complete Assignment 1', 'Finish the Hello World assignment', '2026-03-14 18:12:04', 'high', 'pending', 0, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(8, 57, 'quiz', NULL, NULL, NULL, 'Prepare for Quiz 2', 'Study chapters 3-5 for upcoming quiz', '2026-03-16 18:12:04', 'medium', 'completed', 100, '2026-03-11 18:12:04', '2026-03-11 18:19:15'),
(9, 57, 'study', NULL, NULL, NULL, 'Review Data Structures Notes', 'Review linked lists and trees', '2026-03-18 18:12:04', 'low', 'completed', 100, '2026-03-11 18:12:04', '2026-03-11 18:22:38'),
(10, 57, 'custom', NULL, NULL, NULL, 'Meet with study group', 'Library room 204 at 3pm', '2026-03-12 18:12:04', 'medium', 'pending', 0, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(11, 57, 'lab', NULL, NULL, NULL, 'Complete Lab 3 Report', 'Write up results from lab experiment', '2026-03-13 18:12:04', 'high', 'in_progress', 60, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(14, 57, 'study', NULL, NULL, NULL, 'Test', NULL, NULL, 'low', 'pending', 0, '2026-03-11 18:23:45', '2026-03-11 18:23:45'),
(15, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-14 15:17:54', '2026-03-14 15:17:54'),
(16, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-14 15:36:11', '2026-03-14 15:36:11'),
(17, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-14 15:40:51', '2026-03-14 15:40:51'),
(18, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-14 16:06:13', '2026-03-14 16:06:13'),
(19, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-16 20:19:12', '2026-03-16 20:19:12'),
(20, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-16 20:20:17', '2026-03-16 20:20:17'),
(21, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-16 20:32:59', '2026-03-16 20:32:59'),
(22, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-16 20:45:25', '2026-03-16 20:45:25'),
(23, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-16 20:54:01', '2026-03-16 20:54:01'),
(24, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-16 22:31:37', '2026-03-16 22:31:37'),
(25, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-16 22:35:24', '2026-03-16 22:35:24'),
(26, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-16 23:59:14', '2026-03-16 23:59:14'),
(27, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-17 00:01:54', '2026-03-17 00:01:54'),
(28, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-17 00:21:55', '2026-03-17 00:21:55'),
(29, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-17 00:34:48', '2026-03-17 00:34:48'),
(30, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-17 00:50:33', '2026-03-17 00:50:33'),
(31, 57, 'study', NULL, NULL, NULL, 'Study for Final Exam', 'Review all chapters', '2026-03-18 18:14:02', 'high', 'pending', 0, '2026-03-17 00:57:19', '2026-03-17 00:57:19');

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

--
-- Table structure for table `study_groups`
--

DROP TABLE IF EXISTS `study_groups`;
CREATE TABLE IF NOT EXISTS `study_groups` (
  `group_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `course_id` bigint UNSIGNED NOT NULL,
  `group_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_by` bigint UNSIGNED NOT NULL,
  `max_members` int DEFAULT '10',
  `current_members` int DEFAULT '1',
  `is_public` tinyint(1) DEFAULT '1',
  `meeting_schedule` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('active','inactive','archived') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`group_id`),
  KEY `idx_course` (`course_id`),
  KEY `idx_creator` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `study_groups`
--

INSERT INTO `study_groups` (`group_id`, `course_id`, `group_name`, `description`, `created_by`, `max_members`, `current_members`, `is_public`, `meeting_schedule`, `status`, `created_at`, `updated_at`) VALUES
(2, 2, 'Data Structures Masters', 'Advanced study group for CS201', 12, 5, 3, 1, 'Monday & Wednesday 5-7 PM', 'active', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(13, 1, 'Math Wizards', 'A group for hardcore math studying', 57, 10, 1, 1, NULL, 'active', '2026-03-17 00:57:33', '2026-03-17 00:57:33'),
(14, 1, 'Data Structures Study Group', 'Weekly study sessions for DS course', 66, 10, 1, 1, 'Every Monday 5-7 PM', 'active', '2026-03-17 01:02:13', '2026-03-17 01:03:27'),
(15, 1, 'Math Wizards', 'A group for hardcore math studying', 57, 10, 1, 1, NULL, 'active', '2026-03-17 01:13:46', '2026-03-17 01:13:46');

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

--
-- Table structure for table `study_group_members`
--

DROP TABLE IF EXISTS `study_group_members`;
CREATE TABLE IF NOT EXISTS `study_group_members` (
  `member_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `group_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `role` enum('creator','moderator','member') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'member',
  `joined_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`member_id`),
  UNIQUE KEY `unique_group_user` (`group_id`,`user_id`),
  KEY `idx_group` (`group_id`),
  KEY `idx_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `study_group_members`
--

INSERT INTO `study_group_members` (`member_id`, `group_id`, `user_id`, `role`, `joined_at`) VALUES
(5, 2, 12, 'creator', '2025-11-20 13:43:00'),
(6, 2, 13, 'member', '2025-11-20 13:43:00'),
(7, 2, 14, 'member', '2025-11-20 13:43:00'),
(23, 13, 57, 'creator', '2026-03-17 00:57:33'),
(24, 14, 66, 'creator', '2026-03-17 01:02:13'),
(26, 15, 57, 'creator', '2026-03-17 01:13:46');

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

--
-- Table structure for table `subscription_plans`
--

DROP TABLE IF EXISTS `subscription_plans`;
CREATE TABLE IF NOT EXISTS `subscription_plans` (
  `plan_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `plan_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `price` decimal(10,2) NOT NULL,
  `currency` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'USD',
  `billing_cycle` enum('monthly','quarterly','yearly') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'monthly',
  `features` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`plan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `support_tickets`
--

DROP TABLE IF EXISTS `support_tickets`;
CREATE TABLE IF NOT EXISTS `support_tickets` (
  `ticket_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `feedback_id` bigint UNSIGNED DEFAULT NULL,
  `ticket_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `category` enum('technical','academic','account','payment','general') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `priority` enum('low','medium','high','urgent') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `status` enum('open','in_progress','waiting_user','waiting_admin','resolved','closed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'open',
  `assigned_to` bigint UNSIGNED DEFAULT NULL,
  `resolution` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `first_response_at` timestamp NULL DEFAULT NULL,
  `resolved_at` timestamp NULL DEFAULT NULL,
  `closed_at` timestamp NULL DEFAULT NULL,
  `satisfaction_rating` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ticket_id`),
  UNIQUE KEY `ticket_number` (`ticket_number`),
  KEY `feedback_id` (`feedback_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_ticket_number` (`ticket_number`),
  KEY `idx_status` (`status`),
  KEY `idx_assigned` (`assigned_to`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `support_tickets`
--

INSERT INTO `support_tickets` (`ticket_id`, `user_id`, `feedback_id`, `ticket_number`, `subject`, `description`, `category`, `priority`, `status`, `assigned_to`, `resolution`, `first_response_at`, `resolved_at`, `closed_at`, `satisfaction_rating`, `created_at`, `updated_at`) VALUES
(1, 7, 1, 'TKT-2025-001', 'Cannot submit assignment', 'Student unable to upload file for assignment submission', 'technical', 'high', 'resolved', 1, NULL, '2025-02-10 08:30:00', '2025-02-10 12:45:00', NULL, 5, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(2, 10, 4, 'TKT-2025-002', 'Grade not updated', 'Quiz grade not reflected in gradebook', 'academic', 'medium', 'resolved', 1, NULL, '2025-02-12 07:15:00', '2025-02-12 14:20:00', NULL, 4, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 12, NULL, 'TKT-2025-003', 'Reset password not working', 'Password reset email not arriving', 'account', 'high', 'in_progress', 1, NULL, '2025-02-14 09:00:00', NULL, NULL, NULL, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 13, NULL, 'TKT-2025-004', 'Course enrollment issue', 'Cannot enroll in CS301 - shows full but seats available', 'academic', 'medium', 'open', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-20 13:43:00', '2025-11-20 13:43:00');

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

--
-- Table structure for table `system_alerts`
--

DROP TABLE IF EXISTS `system_alerts`;
CREATE TABLE IF NOT EXISTS `system_alerts` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `condition_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `threshold` float NOT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `system_alerts_ibfk_updated_by` (`updated_by`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `system_alerts`
--

INSERT INTO `system_alerts` (`id`, `name`, `description`, `condition_type`, `threshold`, `is_active`, `created_at`, `updated_by`) VALUES
(2, 'High CPU Alert', 'Triggers when CPU usage exceeds threshold updated', 'cpu_usage', 90, 1, '2026-03-16 22:20:56', NULL),
(4, 'High CPU Alert', 'Alert when CPU exceeds 90%', 'cpu_usage', 90, 1, '2026-03-16 22:35:34', NULL),
(5, 'High CPU Alert', 'Alert when CPU exceeds 90%', 'cpu_usage', 90, 1, '2026-03-16 23:59:25', NULL),
(6, 'High CPU Alert', 'Alert when CPU exceeds 90%', 'cpu_usage', 90, 1, '2026-03-17 00:02:05', NULL),
(7, 'High CPU Alert', 'Alert when CPU exceeds 90%', 'cpu_usage', 90, 1, '2026-03-17 00:22:06', NULL),
(8, 'High CPU Alert', 'Alert when CPU exceeds 90%', 'cpu_usage', 90, 1, '2026-03-17 00:34:59', NULL),
(9, 'High CPU Alert', 'Alert when CPU exceeds 90%', 'cpu_usage', 90, 1, '2026-03-17 00:50:43', NULL),
(10, 'High CPU Alert', 'Alert when CPU exceeds 90%', 'cpu_usage', 90, 1, '2026-03-17 00:57:30', NULL);

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

--
-- Table structure for table `system_errors`
--

DROP TABLE IF EXISTS `system_errors`;
CREATE TABLE IF NOT EXISTS `system_errors` (
  `error_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `error_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `error_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `error_type` enum('application','database','api','security','system') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `severity` enum('low','medium','high','critical') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `stack_trace` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `request_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `is_resolved` tinyint(1) DEFAULT '0',
  `resolved_by` bigint UNSIGNED DEFAULT NULL,
  `resolved_at` timestamp NULL DEFAULT NULL,
  `resolution_notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`error_id`),
  KEY `user_id` (`user_id`),
  KEY `resolved_by` (`resolved_by`),
  KEY `idx_type` (`error_type`),
  KEY `idx_severity` (`severity`),
  KEY `idx_resolved` (`is_resolved`),
  KEY `idx_date` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `system_settings`
--

DROP TABLE IF EXISTS `system_settings`;
CREATE TABLE IF NOT EXISTS `system_settings` (
  `setting_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `setting_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `setting_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `setting_type` enum('string','number','boolean','json') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'string',
  `category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `is_public` tinyint(1) DEFAULT '0',
  `updated_by` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`setting_id`),
  UNIQUE KEY `setting_key` (`setting_key`),
  KEY `system_settings_ibfk_updated_by` (`updated_by`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `system_settings`
--

INSERT INTO `system_settings` (`setting_id`, `setting_key`, `setting_value`, `setting_type`, `category`, `description`, `is_public`, `updated_by`, `created_at`, `updated_at`) VALUES
(1, 'platform_name', 'EduVerse Pro', 'string', 'general', 'Platform display name', 1, 61, '2026-03-16 19:39:07', '2026-03-17 00:57:27'),
(2, 'max_file_upload_size', '52428800', 'number', 'files', 'Maximum file upload size in bytes (50MB)', 0, NULL, '2026-03-16 19:39:07', '2025-11-20 13:43:00'),
(3, 'session_timeout_minutes', '120', 'number', 'security', 'Session timeout duration', 0, NULL, '2026-03-16 19:39:07', '2025-11-20 13:43:00'),
(4, 'enable_ai_features', 'true', 'boolean', 'features', 'Enable AI-powered features', 0, NULL, '2026-03-16 19:39:07', '2025-11-20 13:43:00'),
(5, 'enable_gamification', 'true', 'boolean', 'features', 'Enable gamification system', 1, NULL, '2026-03-16 19:39:07', '2025-11-20 13:43:00'),
(6, 'default_language', 'en', 'string', 'localization', 'Default platform language', 1, NULL, '2026-03-16 19:39:07', '2025-11-20 13:43:00'),
(7, 'enable_face_recognition', 'true', 'boolean', 'features', 'Enable face recognition for attendance', 0, NULL, '2026-03-16 19:39:07', '2025-11-20 13:43:00'),
(8, 'maintenance_mode', 'false', 'boolean', 'system', 'System maintenance mode', 0, NULL, '2026-03-16 19:39:07', '2025-11-20 13:43:00'),
(9, 'max_login_attempts', '5', 'number', 'security', 'Maximum failed login attempts before lockout', 0, NULL, '2026-03-16 19:39:07', '2025-11-20 13:43:00'),
(10, 'password_min_length', '8', 'number', 'security', 'Minimum password length', 0, NULL, '2026-03-16 19:39:07', '2025-11-20 13:43:00');

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

--
-- Table structure for table `task_completion`
--

DROP TABLE IF EXISTS `task_completion`;
CREATE TABLE IF NOT EXISTS `task_completion` (
  `completion_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `task_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `completed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `time_taken_minutes` int DEFAULT NULL,
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`completion_id`),
  UNIQUE KEY `task_id` (`task_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `task_completion`
--

INSERT INTO `task_completion` (`completion_id`, `task_id`, `user_id`, `completed_at`, `time_taken_minutes`, `notes`) VALUES
(3, 8, 57, '2026-03-11 18:19:15', 120, 'Finished studying all chapters'),
(4, 9, 57, '2026-03-11 18:22:38', 60, 'Done');

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

--
-- Table structure for table `ta_instructor_access`
--

DROP TABLE IF EXISTS `ta_instructor_access`;
CREATE TABLE IF NOT EXISTS `ta_instructor_access` (
  `access_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `instructor_id` bigint UNSIGNED NOT NULL,
  `ta_id` bigint UNSIGNED NOT NULL,
  `section_id` bigint UNSIGNED NOT NULL,
  `access_level` enum('view','grade','edit','full') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'grade',
  `can_upload_materials` tinyint(1) DEFAULT '0',
  `can_create_assignments` tinyint(1) DEFAULT '0',
  `can_grade_assignments` tinyint(1) DEFAULT '1',
  `can_manage_attendance` tinyint(1) DEFAULT '1',
  `can_send_announcements` tinyint(1) DEFAULT '0',
  `granted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `revoked_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`access_id`),
  KEY `idx_instructor` (`instructor_id`),
  KEY `idx_ta` (`ta_id`),
  KEY `idx_section` (`section_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `theme_preferences`
--

DROP TABLE IF EXISTS `theme_preferences`;
CREATE TABLE IF NOT EXISTS `theme_preferences` (
  `preference_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `theme_mode` enum('light','dark','auto') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'light',
  `primary_color` varchar(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '#007bff',
  `font_size` enum('small','medium','large') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `layout_density` enum('comfortable','compact') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'comfortable',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`preference_id`),
  UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `theme_preferences`
--

INSERT INTO `theme_preferences` (`preference_id`, `user_id`, `theme_mode`, `primary_color`, `font_size`, `layout_density`, `updated_at`) VALUES
(1, 7, 'dark', '#007bff', 'medium', 'comfortable', '2025-11-20 13:43:00'),
(2, 8, 'light', '#28a745', 'medium', 'compact', '2025-11-20 13:43:00'),
(3, 9, 'auto', '#007bff', 'large', 'comfortable', '2025-11-20 13:43:00'),
(4, 10, 'light', '#dc3545', 'small', 'comfortable', '2025-11-20 13:43:00'),
(5, 11, 'dark', '#ffc107', 'medium', 'compact', '2025-11-20 13:43:00'),
(6, 12, 'light', '#007bff', 'medium', 'comfortable', '2025-11-20 13:43:00');

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

--
-- Table structure for table `two_factor_auth`
--

DROP TABLE IF EXISTS `two_factor_auth`;
CREATE TABLE IF NOT EXISTS `two_factor_auth` (
  `auth_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `secret_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `enabled` tinyint(1) DEFAULT '0',
  `backup_codes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`auth_id`),
  UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
  `user_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `password_hash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `first_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `profile_picture_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bio` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `social_links` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `campus_id` bigint UNSIGNED DEFAULT NULL,
  `status` enum('active','inactive','suspended','pending') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `email_verified` tinyint(1) DEFAULT '0',
  `last_login_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `email` (`email`),
  KEY `idx_email` (`email`),
  KEY `idx_campus` (`campus_id`),
  KEY `idx_status` (`status`),
  KEY `idx_email_status` (`email`,`status`),
  KEY `idx_campus_status` (`campus_id`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `users` (`user_id`, `email`, `password_hash`, `first_name`, `last_name`, `phone`, `profile_picture_url`, `bio`, `social_links`, `campus_id`, `status`, `email_verified`, `last_login_at`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'admin@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'John', 'Admin', '+1-555-1001', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(2, 'prof.smith@campus.edu', '$2b$10$BtLRojkSErhQ3Tq8e519k.zWzNU9y8y8rFecMQFGboSBTgpXaeZTC', 'Robert', 'Smith', '+1-555-1002', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2026-03-02 14:33:23', '2026-03-02 14:33:23'),
(3, 'prof.johnson@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Emily', 'Johnson', '+1-555-1003', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(4, 'prof.williams@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Michael', 'Williams', '+1-555-1004', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(5, 'ta.brown@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Sarah', 'Brown', '+1-555-1005', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(6, 'ta.davis@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'James', 'Davis', '+1-555-1006', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(7, 'alice.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Alice', 'Anderson', '+1-555-2001', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(8, 'bob.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Bob', 'Martinez', '+1-555-2002', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(9, 'carol.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Carol', 'Garcia', '+1-555-2003', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(10, 'david.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'David', 'Rodriguez', '+1-555-2004', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(11, 'emma.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Emma', 'Wilson', '+1-555-2005', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(12, 'frank.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Frank', 'Lopez', '+1-555-2006', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(13, 'grace.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Grace', 'Lee', '+1-555-2007', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(14, 'henry.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Henry', 'Walker', '+1-555-2008', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(15, 'ivy.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Ivy', 'Hall', '+1-555-2009', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(16, 'jack.student@campus.edu', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'Jack', 'Allen', '+1-555-2010', NULL, NULL, NULL, 1, 'active', 1, NULL, '2025-11-20 13:42:59', '2025-11-20 13:42:59', NULL),
(17, 'amir123@campus.edu', '$2a$12$C311w/5Myorf1.zx35NarOlekceRfdFvjGr1xUgx0s4GHxky4JaQa', 'Amir', 'Doe', '+1234567890', NULL, NULL, NULL, 1, 'active', 1, '2025-11-24 23:24:53', '2025-11-24 23:02:53', '2025-11-24 23:24:53', NULL),
(18, 'amir.user@campus.edu', '$2a$12$Rq1HOfy3QufvhHKiKrGQFeqyHsX896gCod41jJF1r.XNUUIeQMd4i', 'Test', 'amir2', '+1234567800', NULL, NULL, NULL, 1, 'active', 1, '2025-11-24 23:33:35', '2025-11-24 23:29:12', '2025-11-24 23:33:35', NULL),
(19, 'amir1234@campus.edu', '$2b$10$Z0TxzhBdcMLt2YuGEbPmTe/nYpEvVPw6I8E7h7cHUaS79NpKv.Lwq', 'Amir', 'Mohamed', '+125451526', NULL, NULL, NULL, 1, 'active', 1, '2025-11-25 18:00:40', '2025-11-25 02:17:12', '2025-11-25 18:00:41', NULL),
(20, 'ta.salim.noor@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Salim', 'Noor', '+20-100-444-0003', NULL, NULL, NULL, 2, 'active', 1, '2025-02-13 15:20:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(21, 'student.ali.youssef@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Ali', 'Youssef', '+20-100-555-0001', NULL, NULL, NULL, 1, 'active', 1, '2025-02-15 17:45:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(22, 'student.maya.ibrahim@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Maya', 'Ibrahim', '+20-100-555-0002', NULL, NULL, NULL, 1, 'active', 1, '2025-02-15 16:30:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(23, 'student.zain.ahmed@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Zain', 'Ahmed', '+20-100-555-0003', NULL, NULL, NULL, 1, 'active', 1, '2025-02-15 18:00:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(24, 'student.hana.khalil@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Hana', 'Khalil', '+20-100-555-0004', NULL, NULL, NULL, 1, 'active', 1, '2025-02-14 17:15:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(25, 'am3566146@gmail.com', '$2b$10$lqumSGY0jP1eCtbxIlQQveE1nD7m37YU9jJRrwoGoDlBenDS1EQqi', 'Amir', 'Hamdi', '+201234567890', NULL, NULL, NULL, NULL, 'active', 1, '2025-11-30 16:05:00', '2025-11-26 15:22:14', '2025-11-30 16:04:59', NULL),
(26, 'student.mariam.fahmy@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Mariam', 'Fahmy', '+20-100-555-0006', NULL, NULL, NULL, 1, 'active', 1, '2025-02-13 18:20:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(27, 'student.rashid.nour@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Rashid', 'Nour', '+20-100-555-0007', NULL, NULL, NULL, 1, 'active', 1, '2025-02-13 17:00:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(28, 'student.sara.aziz@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Sara', 'Aziz', '+20-100-555-0008', NULL, NULL, NULL, 2, 'active', 1, '2025-02-15 15:30:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(29, 'am3566147@gmail.com', '$2b$10$oplLjPdOuM19aeyZg9CQJuhUoiQxN00m2LjMTGd4.IDrIs2WI/nUC', 'John', 'Doe', NULL, NULL, NULL, NULL, NULL, 'active', 1, '2025-11-30 16:39:24', '2025-11-26 18:02:35', '2025-11-30 16:39:24', NULL),
(30, 'am3566143@gmail.com', '$2b$10$1ZlE/jNftUxyDDR5b6Kd2eLR3IB5ZUN9LCrVDU9E0zsMP5mfy4/q.', 'Amir', 'Hamdi', '+2015464646445', NULL, NULL, NULL, NULL, 'active', 1, '2025-11-27 00:40:27', '2025-11-26 23:31:32', '2025-11-27 00:40:27', NULL),
(31, 'student.amr.shaker@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Amr', 'Shaker', '+20-100-555-0011', NULL, NULL, NULL, 2, 'active', 1, '2025-02-13 16:30:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(32, 'student.dalal.hassan@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Dalal', 'Hassan', '+20-100-555-0012', NULL, NULL, NULL, 1, 'active', 1, '2025-02-12 17:45:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(33, 'amirhamdidx720@gmail.com', '$2b$10$pl4Dx6LsyXtolFjT3s.X5u.mYMJSYrkM98nDz1IkuCck.O7d3cl52', 'Amir', 'Hamdi', NULL, NULL, NULL, NULL, NULL, 'active', 1, '2025-11-27 00:36:46', '2025-11-27 00:32:35', '2025-11-27 00:36:46', NULL),
(34, 'amir_student@campus.edu', '$2b$10$pmCL5b.Hv9aPeH9MBxHEHuB4YQiZyMz5tZTIEh6xjRDUUB/K5hqaK', 'Amir', 'Strudent', NULL, NULL, NULL, NULL, NULL, 'active', 1, '2025-11-30 16:08:53', '2025-11-30 16:08:06', '2025-11-30 16:08:53', NULL),
(35, 'amir@edu.com', '$2b$10$wPRxhFVeedYmnpkDJWzgZuUH4qn2cjd9zF65tCSfrUnSRbjleFhOS', 'Test', 'User', '+20201234567', NULL, NULL, NULL, NULL, 'pending', 0, NULL, '2026-02-25 19:01:54', '2026-02-25 19:01:54', NULL),
(36, 'john.doe@example.com', '$2b$10$HNLv5bD5GbRDJzyOlJr0FuP5A6ibEUhKWkKbbm/ytOhFTffEmy8VG', 'John', 'Doe', '+1234567890', NULL, NULL, NULL, NULL, 'active', 1, '2026-02-25 20:11:14', '2026-02-25 19:02:43', '2026-02-25 20:11:14', NULL),
(37, 'student.fouad.ali@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Fouad', 'Ali', '+20-100-555-0017', NULL, NULL, NULL, 3, 'active', 1, '2025-02-15 19:00:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(38, 'student.lina.noor@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Lina', 'Noor', '+20-100-555-0018', NULL, NULL, NULL, 3, 'active', 1, '2025-02-14 18:45:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(39, 'student.sami.aziz@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Sami', 'Aziz', '+20-100-555-0019', NULL, NULL, NULL, 3, 'active', 1, '2025-02-13 19:20:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(40, 'student.joud.mohammad@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Joud', 'Mohammad', '+20-100-555-0020', NULL, NULL, NULL, 1, 'active', 1, '2025-02-12 18:30:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(41, 'student.rayan.saleh@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Rayan', 'Saleh', '+20-100-555-0021', NULL, NULL, NULL, 1, 'active', 1, '2025-02-11 19:00:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(42, 'student.ghada.hussein@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Ghada', 'Hussein', '+20-100-555-0022', NULL, NULL, NULL, 2, 'active', 1, '2025-02-10 17:45:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(43, 'student.tariq.samir@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Tariq', 'Samir', '+20-100-555-0023', NULL, NULL, NULL, 2, 'active', 1, '2025-02-09 18:00:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(44, 'student.souad.noor@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Souad', 'Noor', '+20-100-555-0024', NULL, NULL, NULL, 2, 'active', 1, '2025-02-08 17:15:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(45, 'student.walid.ahmed@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Walid', 'Ahmed', '+20-100-555-0025', NULL, NULL, NULL, 1, 'active', 1, '2025-02-07 19:30:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(46, 'student.yasmine.khalil@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Yasmine', 'Khalil', '+20-100-555-0026', NULL, NULL, NULL, 1, 'active', 1, '2025-02-06 16:45:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(47, 'student.ismail.ahmed@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Ismail', 'Ahmed', '+20-100-555-0027', NULL, NULL, NULL, 3, 'active', 1, '2025-02-15 20:00:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(48, 'student.zainab.saleh@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Zainab', 'Saleh', '+20-100-555-0028', NULL, NULL, NULL, 3, 'active', 1, '2025-02-14 19:15:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(49, 'student.jamal.abdel@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Jamal', 'Abdel', '+20-100-555-0029', NULL, NULL, NULL, 3, 'active', 1, '2025-02-13 18:45:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(50, 'student.haya.ibrahim@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Haya', 'Ibrahim', '+20-100-555-0030', NULL, NULL, NULL, 1, 'active', 1, '2025-02-12 19:00:00', '2024-09-01 08:00:00', '2024-09-01 08:00:00', NULL),
(51, 'admin.ahmed@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Ahmed', 'Hassan', '+20-100-111-0001', NULL, NULL, NULL, 1, 'active', 1, '2025-02-15 07:00:00', '2024-09-01 05:00:00', '2024-09-01 05:00:00', NULL),
(52, 'admin.fatima@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Fatima', 'Khalil', '+20-100-111-0002', NULL, NULL, NULL, 1, 'active', 1, '2025-02-14 12:30:00', '2024-09-01 05:00:00', '2024-09-01 05:00:00', NULL),
(53, 'admin.karim@eduverse.edu.eg', '$2y$10$N9qo8uLOickgx2ZMRZoMye', 'Karim', 'Mohamed', '+20-100-111-0003', NULL, NULL, NULL, 2, 'active', 1, '2025-02-13 09:15:00', '2024-09-01 05:00:00', '2024-09-01 05:00:00', NULL),
(56, 'admintarek@example.com', '$2b$10$Q2Np7QKr5aDtpwBYgf4Zi.5SaZ1GtMs8Y.C7xgP4d5FyVmwMUoJae', 'John', 'Doe', '+1234567890', NULL, NULL, NULL, NULL, 'active', 1, '2026-03-02 13:17:35', '2026-03-01 16:32:28', '2026-03-02 13:17:35', NULL),
(57, 'student.tarek@example.com', '$2b$10$Pu5AMCIx7WlHF8LaAlNMouNPVjZnH0/cVC2XPxOpwASwXaDKHUS4m', 'Student', 'Tarek', '+201234567890', NULL, 'Test bio from Sprint 3 testing', '{\"github\":\"https://github.com/test\"}', NULL, 'active', 1, '2026-03-17 01:13:46', '2026-03-02 13:17:13', '2026-03-17 01:13:45', NULL),
(58, 'instructor.tarek@example.com', '$2b$10$RU6fgXm2NqYTHxolk6QWHOq2/dQ9FPu/vYL5QCMHYLgiALcvaOdJi', 'Tarek', 'Instructor', NULL, NULL, NULL, NULL, NULL, 'active', 1, '2026-03-17 01:13:45', '2026-03-02 13:17:14', '2026-03-17 01:13:45', NULL),
(59, 'admin.tarek@example.com', '$2b$10$P3HIhwwNVVYRTY8dM9bUU.E1jfyQAI4qOv8MId8cozPNVI2OSBJtK', 'Tarek', 'Admin', NULL, NULL, NULL, NULL, NULL, 'active', 1, '2026-03-17 01:13:45', '2026-03-02 13:17:15', '2026-03-17 01:13:45', NULL),
(60, 'ta.tarek@example.com', '$2b$10$ZNeL4pilwwieU42jvS.e2OfgCamtEX6UZF.8/wPp./gjN6GY7b/Z.', 'Tarek', 'TA', NULL, NULL, NULL, NULL, NULL, 'active', 1, '2026-03-17 01:13:46', '2026-03-02 13:18:41', '2026-03-17 01:13:45', NULL),
(61, 'it_admin.tarek@example.com', '$2b$10$EJkScTvamvd/ThfdVedTvuS9eY2484LRX7U5B31nbyC44DZBrRbwG', 'Tarek', 'ITAdmin', NULL, NULL, NULL, NULL, NULL, 'active', 1, '2026-03-17 01:13:46', '2026-03-02 13:18:42', '2026-03-17 01:13:45', NULL),
(62, 'testdel999@example.com', '$2b$10$iSkjrSWfZz9mc.DDwM3tTuMmxbH5tiEc7EGtTVi5ZegO8ktZ2fxKi', 'Test', 'Del', NULL, NULL, NULL, NULL, NULL, 'active', 1, NULL, '2026-03-02 13:27:01', '2026-03-02 13:27:01', NULL),
(63, 'amir_student@example.com', '$2b$10$YQOcjPCtrtejaaLkj13GyuGQIjIHEmfSJbtqMokOc8zH3F4Rl8c0O', 'John', 'Doe', '+1234567890', NULL, NULL, NULL, NULL, 'active', 1, '2026-03-17 01:09:56', '2026-03-10 19:38:25', '2026-03-17 01:09:56', NULL),
(64, 'amir_instructor@example.com', '$2b$10$El1BXYYGaBSs/DGRo6/Tc.afHxnjGnFQ8.Nxd6582jTtkFVFGoiEG', 'John', 'Doe', '+1234567890', NULL, NULL, NULL, NULL, 'active', 1, '2026-03-10 22:00:16', '2026-03-10 19:38:32', '2026-03-10 22:00:15', NULL),
(65, 'amir_ta@example.com', '$2b$10$A6Gkd7MsXv1CIA.tl3AO3ezgrn5fXK3lhR35SiJjIXtBfLxV65H6u', 'John', 'Doe', '+1234567890', NULL, NULL, NULL, NULL, 'active', 1, '2026-03-10 20:14:30', '2026-03-10 19:38:39', '2026-03-10 20:14:30', NULL),
(66, 'amir_admin@example.com', '$2b$10$G8EUYQ5PCuWpyzA7O8/ve.H.HS/nKBrp7ytplTOTaM9OD68vsXaRq', 'John', 'Doe', '+1234567890', NULL, NULL, NULL, NULL, 'active', 1, '2026-03-17 00:36:58', '2026-03-10 19:38:45', '2026-03-17 00:36:57', NULL),
(67, 'amir_itadmin@example.com', '$2b$10$PTpBY1XV1CKKsPf3QY9Jlu55Ha.CKTF.FOnJeYbOND.Nd3c9gzuQi', 'John', 'Doe', '+1234567890', NULL, NULL, NULL, NULL, 'active', 1, '2026-03-16 22:19:25', '2026-03-10 19:38:52', '2026-03-16 22:19:24', NULL);

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

--
-- Table structure for table `user_badges`
--

DROP TABLE IF EXISTS `user_badges`;
CREATE TABLE IF NOT EXISTS `user_badges` (
  `user_badge_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `badge_id` int UNSIGNED NOT NULL,
  `earned_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `display_on_profile` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`user_badge_id`),
  UNIQUE KEY `unique_user_badge` (`user_id`,`badge_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_badge` (`badge_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_badges`
--

INSERT INTO `user_badges` (`user_badge_id`, `user_id`, `badge_id`, `earned_at`, `display_on_profile`) VALUES
(1, 7, 1, '2025-11-20 13:43:00', 1),
(2, 7, 2, '2025-11-20 13:43:00', 1),
(3, 7, 3, '2025-11-20 13:43:00', 1),
(4, 8, 1, '2025-11-20 13:43:00', 1),
(5, 8, 3, '2025-11-20 13:43:00', 1),
(6, 9, 1, '2025-11-20 13:43:00', 1),
(7, 10, 1, '2025-11-20 13:43:00', 1);

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

--
-- Table structure for table `user_feedback`
--

DROP TABLE IF EXISTS `user_feedback`;
CREATE TABLE IF NOT EXISTS `user_feedback` (
  `feedback_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `feedback_type` enum('bug','feature_request','complaint','suggestion','praise','other') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `priority` enum('low','medium','high','urgent') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'medium',
  `status` enum('new','in_review','in_progress','resolved','closed','rejected') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'new',
  `attachments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `browser_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `page_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`feedback_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_type` (`feedback_type`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_feedback`
--

INSERT INTO `user_feedback` (`feedback_id`, `user_id`, `feedback_type`, `category`, `subject`, `description`, `priority`, `status`, `attachments`, `browser_info`, `page_url`, `created_at`, `updated_at`) VALUES
(1, 7, 'bug', 'assignments', 'Cannot submit assignment', 'Getting error when trying to upload file for Assignment 1', 'high', 'resolved', NULL, 'Chrome 120.0.0 / Windows 10', '/courses/1/assignments/1', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(2, 8, 'feature_request', 'ui', 'Dark mode needed', 'Would love to have a dark mode option for late night studying', 'medium', 'in_progress', NULL, 'Firefox 121.0 / macOS', '/settings', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(3, 9, 'suggestion', 'gamification', 'More badge types', 'Suggest adding badges for forum participation and helping peers', 'low', 'new', NULL, 'Safari 17.0 / iOS', '/profile/badges', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(4, 10, 'complaint', 'grading', 'Grade not updated', 'My quiz grade has not been updated for 3 days', 'medium', 'resolved', NULL, 'Chrome 120.0.0 / Windows 11', '/courses/1/grades', '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(5, 11, 'praise', 'general', 'Great platform!', 'Really enjoying the AI features and clean interface', 'low', 'closed', NULL, 'Edge 120.0.0 / Windows 10', '/dashboard', '2025-11-20 13:43:00', '2025-11-20 13:43:00');

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

--
-- Table structure for table `user_levels`
--

DROP TABLE IF EXISTS `user_levels`;
CREATE TABLE IF NOT EXISTS `user_levels` (
  `level_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `current_level` int DEFAULT '1',
  `total_xp` bigint DEFAULT '0',
  `xp_to_next_level` int DEFAULT '100',
  `tier` enum('bronze','silver','gold','platinum','diamond') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'bronze',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`level_id`),
  UNIQUE KEY `user_id` (`user_id`),
  KEY `idx_level` (`current_level`),
  KEY `idx_tier` (`tier`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_levels`
--

INSERT INTO `user_levels` (`level_id`, `user_id`, `current_level`, `total_xp`, `xp_to_next_level`, `tier`, `updated_at`) VALUES
(1, 7, 3, 320, 150, 'silver', '2025-11-20 13:43:00'),
(2, 8, 2, 180, 120, 'bronze', '2025-11-20 13:43:00'),
(3, 9, 2, 150, 120, 'bronze', '2025-11-20 13:43:00'),
(4, 10, 1, 85, 100, 'bronze', '2025-11-20 13:43:00'),
(5, 11, 1, 65, 100, 'bronze', '2025-11-20 13:43:00'),
(6, 12, 1, 45, 100, 'bronze', '2025-11-20 13:43:00'),
(7, 13, 1, 30, 100, 'bronze', '2025-11-20 13:43:00'),
(8, 14, 1, 25, 100, 'bronze', '2025-11-20 13:43:00'),
(9, 15, 1, 20, 100, 'bronze', '2025-11-20 13:43:00'),
(10, 16, 1, 15, 100, 'bronze', '2025-11-20 13:43:00');

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

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

DROP TABLE IF EXISTS `user_preferences`;
CREATE TABLE IF NOT EXISTS `user_preferences` (
  `preference_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `language` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en',
  `theme` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'light',
  `email_notifications` tinyint(1) NOT NULL DEFAULT '1',
  `push_notifications` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`preference_id`),
  UNIQUE KEY `uq_user_preferences_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_preferences`
--

INSERT INTO `user_preferences` (`preference_id`, `user_id`, `language`, `theme`, `email_notifications`, `push_notifications`, `created_at`, `updated_at`) VALUES
(1, 57, 'en', 'dark', 1, 1, '2026-03-10 18:14:04', '2026-03-11 17:19:55');

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

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

DROP TABLE IF EXISTS `user_roles`;
CREATE TABLE IF NOT EXISTS `user_roles` (
  `user_role_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `role_id` int UNSIGNED NOT NULL,
  `assigned_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `assigned_by` bigint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`user_role_id`),
  UNIQUE KEY `unique_user_role` (`user_id`,`role_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_role` (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `user_roles` (`user_role_id`, `user_id`, `role_id`, `assigned_at`, `assigned_by`) VALUES
(1, 1, 4, '2025-11-20 13:42:59', 1),
(2, 2, 2, '2025-11-20 13:42:59', 1),
(3, 3, 2, '2025-11-20 13:42:59', 1),
(4, 4, 2, '2025-11-20 13:42:59', 1),
(5, 5, 3, '2025-11-20 13:42:59', 1),
(6, 6, 3, '2025-11-20 13:42:59', 1),
(7, 7, 1, '2025-11-20 13:42:59', 1),
(8, 8, 1, '2025-11-20 13:42:59', 1),
(9, 9, 1, '2025-11-20 13:42:59', 1),
(10, 10, 1, '2025-11-20 13:42:59', 1),
(11, 11, 1, '2025-11-20 13:42:59', 1),
(12, 12, 1, '2025-11-20 13:42:59', 1),
(13, 13, 1, '2025-11-20 13:42:59', 1),
(14, 14, 1, '2025-11-20 13:42:59', 1),
(15, 15, 1, '2025-11-20 13:42:59', 1),
(16, 16, 1, '2025-11-20 13:42:59', 1),
(17, 17, 1, '2025-11-24 23:02:53', NULL),
(18, 18, 1, '2025-11-24 23:29:13', NULL),
(19, 19, 1, '2025-11-25 02:17:12', NULL),
(25, 25, 1, '2025-11-26 15:22:14', NULL),
(29, 29, 4, '2025-11-26 18:02:35', NULL),
(30, 1, 5, '2025-11-26 18:11:25', NULL),
(32, 1, 3, '2025-11-26 18:12:12', NULL),
(35, 1, 2, '2025-11-26 18:12:56', NULL),
(36, 30, 1, '2025-11-26 23:31:32', NULL),
(39, 33, 1, '2025-11-27 00:32:35', NULL),
(40, 34, 1, '2025-11-30 16:08:06', NULL),
(41, 35, 1, '2026-02-25 19:01:54', NULL),
(42, 36, 1, '2026-02-25 19:02:43', NULL),
(46, 56, 4, '2026-03-01 16:32:28', NULL),
(47, 57, 1, '2026-03-02 13:17:13', NULL),
(48, 58, 2, '2026-03-02 13:17:14', NULL),
(49, 59, 4, '2026-03-02 13:17:15', NULL),
(50, 60, 3, '2026-03-02 13:18:41', NULL),
(51, 61, 6, '2026-03-02 13:18:42', NULL),
(52, 62, 1, '2026-03-02 13:27:01', NULL),
(54, 63, 1, '2026-03-10 19:38:25', NULL),
(55, 64, 2, '2026-03-10 19:38:32', NULL),
(56, 65, 3, '2026-03-10 19:38:39', NULL),
(57, 66, 4, '2026-03-10 19:38:45', NULL),
(58, 67, 6, '2026-03-10 19:38:52', NULL);

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

--
-- Table structure for table `user_subscriptions`
--

DROP TABLE IF EXISTS `user_subscriptions`;
CREATE TABLE IF NOT EXISTS `user_subscriptions` (
  `subscription_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `plan_id` bigint UNSIGNED NOT NULL,
  `status` enum('active','cancelled','expired','suspended') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  `started_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `expires_at` timestamp NULL DEFAULT NULL,
  `cancelled_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`subscription_id`),
  KEY `fk_subscription_user` (`user_id`),
  KEY `fk_subscription_plan` (`plan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `voice_recordings`
--

DROP TABLE IF EXISTS `voice_recordings`;
CREATE TABLE IF NOT EXISTS `voice_recordings` (
  `recording_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED DEFAULT NULL,
  `file_id` bigint UNSIGNED NOT NULL,
  `transcription_id` bigint UNSIGNED DEFAULT NULL,
  `duration_seconds` int DEFAULT NULL,
  `recording_type` enum('lecture','note','question','answer') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`recording_id`),
  KEY `file_id` (`file_id`),
  KEY `transcription_id` (`transcription_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `voice_transcriptions`
--

DROP TABLE IF EXISTS `voice_transcriptions`;
CREATE TABLE IF NOT EXISTS `voice_transcriptions` (
  `transcription_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `audio_file_id` bigint UNSIGNED DEFAULT NULL,
  `transcribed_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `language` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'en',
  `confidence_score` decimal(3,2) DEFAULT NULL,
  `duration_seconds` int DEFAULT NULL,
  `processing_time_ms` int DEFAULT NULL,
  `ai_model` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`transcription_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_file` (`audio_file_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `voice_transcriptions`
--

INSERT INTO `voice_transcriptions` (`transcription_id`, `user_id`, `audio_file_id`, `transcribed_text`, `language`, `confidence_score`, `duration_seconds`, `processing_time_ms`, `ai_model`, `created_at`) VALUES
(1, 7, 5, 'Remember to review chapter 3 before the midterm. Focus on loop structures and function definitions.', 'en', 0.94, 180, 2500, 'whisper-1', '2025-11-20 13:43:00'),
(2, 8, 5, 'Question about assignment: How do we handle edge cases in the input validation?', 'en', 0.91, 240, 3100, 'whisper-1', '2025-11-20 13:43:00');

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

--
-- Stand-in structure for view `v_course_performance`
-- (See below for the actual view)
--
DROP VIEW IF EXISTS `v_course_performance`;
CREATE TABLE IF NOT EXISTS `v_course_performance` (
`avg_completion` decimal(9,6)
,`avg_grade` decimal(9,6)
,`course_code` varchar(20)
,`course_id` bigint unsigned
,`course_name` varchar(200)
,`section_id` bigint unsigned
,`section_number` varchar(10)
,`total_assignments` bigint
,`total_quizzes` bigint
,`total_students` bigint
);

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

--
-- Stand-in structure for view `v_student_dashboard`
-- (See below for the actual view)
--
DROP VIEW IF EXISTS `v_student_dashboard`;
CREATE TABLE IF NOT EXISTS `v_student_dashboard` (
`current_level` int
,`current_streak` int
,`email` varchar(255)
,`enrolled_courses` bigint
,`first_name` varchar(100)
,`last_name` varchar(100)
,`pending_tasks` bigint
,`profile_picture_url` varchar(500)
,`total_xp` bigint
,`unread_notifications` bigint
,`user_id` bigint unsigned
);

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

--
-- Table structure for table `weak_topics_analysis`
--

DROP TABLE IF EXISTS `weak_topics_analysis`;
CREATE TABLE IF NOT EXISTS `weak_topics_analysis` (
  `analysis_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `course_id` bigint UNSIGNED NOT NULL,
  `topic_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `weakness_score` decimal(5,2) NOT NULL,
  `attempt_count` int DEFAULT '0',
  `success_rate` decimal(5,2) DEFAULT '0.00',
  `last_attempted_at` timestamp NULL DEFAULT NULL,
  `recommendation_generated` tinyint(1) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`analysis_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_course` (`course_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `weak_topics_analysis`
--

INSERT INTO `weak_topics_analysis` (`analysis_id`, `user_id`, `course_id`, `topic_name`, `weakness_score`, `attempt_count`, `success_rate`, `last_attempted_at`, `recommendation_generated`, `created_at`, `updated_at`) VALUES
(3, 9, 2, 'Linked List Operations', 58.00, 4, 48.00, '2025-02-15 12:45:00', 1, '2025-11-20 13:43:00', '2025-11-20 13:43:00'),
(5, 57, 1, 'Recursion', 75.50, 5, 40.00, '2026-03-11 18:12:04', 1, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(6, 57, 1, 'Binary Trees', 60.00, 3, 33.33, '2026-03-09 18:12:04', 0, '2026-03-11 18:12:04', '2026-03-11 18:12:04'),
(7, 57, 2, 'SQL Joins', 45.00, 4, 50.00, '2026-03-10 18:12:04', 1, '2026-03-11 18:12:04', '2026-03-11 18:12:04');

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

--
-- Table structure for table `xp_transactions`
--

DROP TABLE IF EXISTS `xp_transactions`;
CREATE TABLE IF NOT EXISTS `xp_transactions` (
  `transaction_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `source_type` enum('quiz','assignment','lab','attendance','login','streak','achievement','manual') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `source_id` bigint UNSIGNED DEFAULT NULL,
  `rule_id` int UNSIGNED DEFAULT NULL,
  `points_earned` int NOT NULL,
  `multiplier` decimal(3,2) DEFAULT '1.00',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`transaction_id`),
  KEY `rule_id` (`rule_id`),
  KEY `idx_user` (`user_id`),
  KEY `idx_source` (`source_type`,`source_id`),
  KEY `idx_date` (`created_at`),
  KEY `idx_user_date` (`user_id`,`created_at`),
  KEY `idx_source_composite` (`source_type`,`source_id`,`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `xp_transactions`
--

INSERT INTO `xp_transactions` (`transaction_id`, `user_id`, `source_type`, `source_id`, `rule_id`, `points_earned`, `multiplier`, `description`, `created_at`) VALUES
(1, 7, 'quiz', 1, 1, 10, 1.00, 'Completed Quiz 1: Python Basics', '2025-11-20 13:43:00'),
(2, 7, 'assignment', 1, 4, 75, 1.50, 'Perfect score on Assignment 1', '2025-11-20 13:43:00'),
(3, 7, 'attendance', 1, 3, 5, 1.00, 'Attended lecture on 2025-02-03', '2025-11-20 13:43:00'),
(4, 8, 'quiz', 1, 1, 10, 1.00, 'Completed Quiz 1: Python Basics', '2025-11-20 13:43:00'),
(5, 8, 'assignment', 1, 2, 15, 1.00, 'Submitted Assignment 1', '2025-11-20 13:43:00'),
(6, 8, 'attendance', 1, 3, 5, 1.00, 'Attended lecture on 2025-02-03', '2025-11-20 13:43:00'),
(7, 9, 'attendance', 1, 3, 5, 1.00, 'Attended lecture on 2025-02-03', '2025-11-20 13:43:00'),
(8, 10, 'assignment', 1, 2, 15, 1.00, 'Submitted Assignment 1', '2025-11-20 13:43:00'),
(9, 11, 'attendance', 1, 3, 5, 1.00, 'Attended lecture on 2025-02-03', '2025-11-20 13:43:00');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `search_index`
--
ALTER TABLE `search_index` ADD FULLTEXT KEY `idx_search` (`title`,`content`,`keywords`);

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

--
-- Structure for view `v_course_performance`
--
DROP TABLE IF EXISTS `v_course_performance`;

DROP VIEW IF EXISTS `v_course_performance`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_course_performance`  AS SELECT `c`.`course_id` AS `course_id`, `c`.`course_name` AS `course_name`, `c`.`course_code` AS `course_code`, `cs`.`section_id` AS `section_id`, `cs`.`section_number` AS `section_number`, count(distinct `ce`.`user_id`) AS `total_students`, avg(`sp`.`completion_percentage`) AS `avg_completion`, avg(`g`.`percentage`) AS `avg_grade`, count(distinct `a`.`assignment_id`) AS `total_assignments`, count(distinct `q`.`quiz_id`) AS `total_quizzes` FROM ((((((`courses` `c` join `course_sections` `cs` on((`c`.`course_id` = `cs`.`course_id`))) left join `course_enrollments` `ce` on((`cs`.`section_id` = `ce`.`section_id`))) left join `student_progress` `sp` on(((`ce`.`user_id` = `sp`.`user_id`) and (`c`.`course_id` = `sp`.`course_id`)))) left join `grades` `g` on(((`ce`.`user_id` = `g`.`user_id`) and (`c`.`course_id` = `g`.`course_id`)))) left join `assignments` `a` on((`c`.`course_id` = `a`.`course_id`))) left join `quizzes` `q` on((`c`.`course_id` = `q`.`quiz_id`))) WHERE (`c`.`status` = 'active') GROUP BY `c`.`course_id`, `cs`.`section_id` ;

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

--
-- Structure for view `v_student_dashboard`
--
DROP TABLE IF EXISTS `v_student_dashboard`;

DROP VIEW IF EXISTS `v_student_dashboard`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_student_dashboard`  AS SELECT `u`.`user_id` AS `user_id`, `u`.`first_name` AS `first_name`, `u`.`last_name` AS `last_name`, `u`.`email` AS `email`, `u`.`profile_picture_url` AS `profile_picture_url`, `ul`.`current_level` AS `current_level`, `ul`.`total_xp` AS `total_xp`, count(distinct `ce`.`enrollment_id`) AS `enrolled_courses`, count(distinct `st`.`task_id`) AS `pending_tasks`, count(distinct `n`.`notification_id`) AS `unread_notifications`, `ds`.`current_streak` AS `current_streak` FROM (((((`users` `u` left join `user_levels` `ul` on((`u`.`user_id` = `ul`.`user_id`))) left join `course_enrollments` `ce` on(((`u`.`user_id` = `ce`.`user_id`) and (`ce`.`enrollment_status` = 'enrolled')))) left join `student_tasks` `st` on(((`u`.`user_id` = `st`.`user_id`) and (`st`.`status` in ('pending','in_progress'))))) left join `notifications` `n` on(((`u`.`user_id` = `n`.`user_id`) and (`n`.`is_read` = 0)))) left join `daily_streaks` `ds` on((`u`.`user_id` = `ds`.`user_id`))) WHERE (`u`.`status` = 'active') GROUP BY `u`.`user_id` ;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `achievements`
--
ALTER TABLE `achievements`
  ADD CONSTRAINT `achievements_ibfk_1` FOREIGN KEY (`reward_badge_id`) REFERENCES `badges` (`badge_id`) ON DELETE SET NULL;

--
-- Constraints for table `activity_logs`
--
ALTER TABLE `activity_logs`
  ADD CONSTRAINT `activity_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `ai_attendance_processing`
--
ALTER TABLE `ai_attendance_processing`
  ADD CONSTRAINT `ai_attendance_processing_ibfk_1` FOREIGN KEY (`session_id`) REFERENCES `attendance_sessions` (`session_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_attendance_processing_ibfk_2` FOREIGN KEY (`photo_id`) REFERENCES `attendance_photos` (`photo_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_attendance_processing_ibfk_3` FOREIGN KEY (`reviewed_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `ai_feedback`
--
ALTER TABLE `ai_feedback`
  ADD CONSTRAINT `ai_feedback_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_feedback_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE;

--
-- Constraints for table `ai_flashcards`
--
ALTER TABLE `ai_flashcards`
  ADD CONSTRAINT `ai_flashcards_ibfk_1` FOREIGN KEY (`material_id`) REFERENCES `course_materials` (`material_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_flashcards_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `ai_grading_results`
--
ALTER TABLE `ai_grading_results`
  ADD CONSTRAINT `ai_grading_results_ibfk_1` FOREIGN KEY (`submission_id`) REFERENCES `assignment_submissions` (`submission_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_grading_results_ibfk_2` FOREIGN KEY (`quiz_attempt_id`) REFERENCES `quiz_attempts` (`attempt_id`) ON DELETE CASCADE;

--
-- Constraints for table `ai_quizzes`
--
ALTER TABLE `ai_quizzes`
  ADD CONSTRAINT `ai_quizzes_ibfk_1` FOREIGN KEY (`material_id`) REFERENCES `course_materials` (`material_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_quizzes_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_quizzes_ibfk_3` FOREIGN KEY (`difficulty_id`) REFERENCES `quiz_difficulty_levels` (`difficulty_id`) ON DELETE SET NULL;

--
-- Constraints for table `ai_recommendations`
--
ALTER TABLE `ai_recommendations`
  ADD CONSTRAINT `ai_recommendations_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_recommendations_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_recommendations_ibfk_3` FOREIGN KEY (`material_id`) REFERENCES `course_materials` (`material_id`) ON DELETE SET NULL;

--
-- Constraints for table `ai_study_plans`
--
ALTER TABLE `ai_study_plans`
  ADD CONSTRAINT `ai_study_plans_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_study_plans_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE;

--
-- Constraints for table `ai_summaries`
--
ALTER TABLE `ai_summaries`
  ADD CONSTRAINT `ai_summaries_ibfk_1` FOREIGN KEY (`material_id`) REFERENCES `course_materials` (`material_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ai_summaries_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `ai_usage_statistics`
--
ALTER TABLE `ai_usage_statistics`
  ADD CONSTRAINT `ai_usage_statistics_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `announcements`
--
ALTER TABLE `announcements`
  ADD CONSTRAINT `announcements_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `announcements_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `announcements_ibfk_3` FOREIGN KEY (`attachment_file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL;

--
-- Constraints for table `api_integrations`
--
ALTER TABLE `api_integrations`
  ADD CONSTRAINT `[REDACTED] FOREIGN KEY (`campus_id`) REFERENCES `campuses` (`campus_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `[REDACTED] FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL,
  ADD CONSTRAINT `[REDACTED] FOREIGN KEY (`updated_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `api_rate_limits`
--
ALTER TABLE `api_rate_limits`
  ADD CONSTRAINT `[REDACTED] FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `assignments`
--
ALTER TABLE `assignments`
  ADD CONSTRAINT `assignments_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `assignments_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `assignment_submissions`
--
ALTER TABLE `assignment_submissions`
  ADD CONSTRAINT `assignment_submissions_ibfk_1` FOREIGN KEY (`assignment_id`) REFERENCES `assignments` (`assignment_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `assignment_submissions_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `assignment_submissions_ibfk_3` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL;

--
-- Constraints for table `attendance_photos`
--
ALTER TABLE `attendance_photos`
  ADD CONSTRAINT `attendance_photos_ibfk_1` FOREIGN KEY (`session_id`) REFERENCES `attendance_sessions` (`session_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `attendance_photos_ibfk_2` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `attendance_photos_ibfk_3` FOREIGN KEY (`uploaded_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `attendance_records`
--
ALTER TABLE `attendance_records`
  ADD CONSTRAINT `attendance_records_ibfk_1` FOREIGN KEY (`session_id`) REFERENCES `attendance_sessions` (`session_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `attendance_records_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `attendance_sessions`
--
ALTER TABLE `attendance_sessions`
  ADD CONSTRAINT `attendance_sessions_ibfk_1` FOREIGN KEY (`section_id`) REFERENCES `course_sections` (`section_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `attendance_sessions_ibfk_2` FOREIGN KEY (`instructor_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `audit_logs`
--
ALTER TABLE `audit_logs`
  ADD CONSTRAINT `audit_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `backup_records`
--
ALTER TABLE `backup_records`
  ADD CONSTRAINT `backup_records_ibfk_created_by` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `branding_settings`
--
ALTER TABLE `branding_settings`
  ADD CONSTRAINT `branding_settings_ibfk_1` FOREIGN KEY (`campus_id`) REFERENCES `campuses` (`campus_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `branding_settings_ibfk_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `calendar_events`
--
ALTER TABLE `calendar_events`
  ADD CONSTRAINT `calendar_events_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `calendar_events_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `calendar_events_ibfk_3` FOREIGN KEY (`schedule_id`) REFERENCES `course_schedules` (`schedule_id`) ON DELETE CASCADE;

--
-- Constraints for table `calendar_integrations`
--
ALTER TABLE `calendar_integrations`
  ADD CONSTRAINT `calendar_integrations_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `certificates`
--
ALTER TABLE `certificates`
  ADD CONSTRAINT `certificates_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `certificates_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `certificates_ibfk_3` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL;

--
-- Constraints for table `chatbot_conversations`
--
ALTER TABLE `chatbot_conversations`
  ADD CONSTRAINT `chatbot_conversations_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `chatbot_conversations_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE SET NULL;

--
-- Constraints for table `chatbot_messages`
--
ALTER TABLE `chatbot_messages`
  ADD CONSTRAINT `chatbot_messages_ibfk_1` FOREIGN KEY (`conversation_id`) REFERENCES `chatbot_conversations` (`conversation_id`) ON DELETE CASCADE;

--
-- Constraints for table `chat_messages`
--
ALTER TABLE `chat_messages`
  ADD CONSTRAINT `chat_messages_ibfk_1` FOREIGN KEY (`thread_id`) REFERENCES `course_chat_threads` (`thread_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `chat_messages_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `chat_messages_ibfk_3` FOREIGN KEY (`parent_message_id`) REFERENCES `chat_messages` (`message_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `chat_messages_ibfk_4` FOREIGN KEY (`endorsed_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `collaborative_grading`
--
ALTER TABLE `collaborative_grading`
  ADD CONSTRAINT `collaborative_grading_ibfk_1` FOREIGN KEY (`assignment_id`) REFERENCES `assignments` (`assignment_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `collaborative_grading_ibfk_2` FOREIGN KEY (`submission_id`) REFERENCES `assignment_submissions` (`submission_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `collaborative_grading_ibfk_3` FOREIGN KEY (`grader_1_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `collaborative_grading_ibfk_4` FOREIGN KEY (`grader_2_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `communities`
--
ALTER TABLE `communities`
  ADD CONSTRAINT `communities_creator_fk` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `communities_dept_fk` FOREIGN KEY (`department_id`) REFERENCES `departments` (`department_id`) ON DELETE CASCADE;

--
-- Constraints for table `community_posts`
--
ALTER TABLE `community_posts`
  ADD CONSTRAINT `community_posts_community_fk` FOREIGN KEY (`community_id`) REFERENCES `communities` (`community_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `community_posts_course_fk` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `community_posts_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `community_post_comments`
--
ALTER TABLE `community_post_comments`
  ADD CONSTRAINT `community_post_comments_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `community_posts` (`post_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `community_post_comments_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `community_post_comments_ibfk_3` FOREIGN KEY (`parent_comment_id`) REFERENCES `community_post_comments` (`comment_id`) ON DELETE CASCADE;

--
-- Constraints for table `community_post_reactions`
--
ALTER TABLE `community_post_reactions`
  ADD CONSTRAINT `community_post_reactions_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `community_posts` (`post_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `community_post_reactions_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `community_post_tags`
--
ALTER TABLE `community_post_tags`
  ADD CONSTRAINT `post_tags_post_fk` FOREIGN KEY (`post_id`) REFERENCES `community_posts` (`post_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `post_tags_tag_fk` FOREIGN KEY (`tag_id`) REFERENCES `community_tags` (`tag_id`) ON DELETE CASCADE;

--
-- Constraints for table `content_translations`
--
ALTER TABLE `content_translations`
  ADD CONSTRAINT `content_translations_ibfk_1` FOREIGN KEY (`translator_id`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `courses`
--
ALTER TABLE `courses`
  ADD CONSTRAINT `courses_ibfk_1` FOREIGN KEY (`department_id`) REFERENCES `departments` (`department_id`) ON DELETE CASCADE;

--
-- Constraints for table `course_analytics`
--
ALTER TABLE `course_analytics`
  ADD CONSTRAINT `course_analytics_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `course_analytics_ibfk_2` FOREIGN KEY (`instructor_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `course_chat_threads`
--
ALTER TABLE `course_chat_threads`
  ADD CONSTRAINT `course_chat_threads_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `course_chat_threads_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `course_enrollments`
--
ALTER TABLE `course_enrollments`
  ADD CONSTRAINT `course_enrollments_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `course_enrollments_ibfk_2` FOREIGN KEY (`section_id`) REFERENCES `course_sections` (`section_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `course_enrollments_ibfk_3` FOREIGN KEY (`program_id`) REFERENCES `programs` (`program_id`) ON DELETE SET NULL;

--
-- Constraints for table `course_instructors`
--
ALTER TABLE `course_instructors`
  ADD CONSTRAINT `course_instructors_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `course_instructors_ibfk_2` FOREIGN KEY (`section_id`) REFERENCES `course_sections` (`section_id`) ON DELETE CASCADE;

--
-- Constraints for table `course_materials`
--
ALTER TABLE `course_materials`
  ADD CONSTRAINT `course_materials_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `course_materials_ibfk_2` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL,
  ADD CONSTRAINT `course_materials_ibfk_3` FOREIGN KEY (`uploaded_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `course_prerequisites`
--
ALTER TABLE `course_prerequisites`
  ADD CONSTRAINT `course_prerequisites_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `course_prerequisites_ibfk_2` FOREIGN KEY (`prerequisite_course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE;

--
-- Constraints for table `course_schedules`
--
ALTER TABLE `course_schedules`
  ADD CONSTRAINT `course_schedules_ibfk_1` FOREIGN KEY (`section_id`) REFERENCES `course_sections` (`section_id`) ON DELETE CASCADE;

--
-- Constraints for table `course_sections`
--
ALTER TABLE `course_sections`
  ADD CONSTRAINT `course_sections_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `course_sections_ibfk_2` FOREIGN KEY (`semester_id`) REFERENCES `semesters` (`semester_id`) ON DELETE CASCADE;

--
-- Constraints for table `course_tas`
--
ALTER TABLE `course_tas`
  ADD CONSTRAINT `course_tas_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `course_tas_ibfk_2` FOREIGN KEY (`section_id`) REFERENCES `course_sections` (`section_id`) ON DELETE CASCADE;

--
-- Constraints for table `daily_streaks`
--
ALTER TABLE `daily_streaks`
  ADD CONSTRAINT `daily_streaks_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `deadline_reminders`
--
ALTER TABLE `deadline_reminders`
  ADD CONSTRAINT `deadline_reminders_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `student_tasks` (`task_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `deadline_reminders_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `departments`
--
ALTER TABLE `departments`
  ADD CONSTRAINT `departments_ibfk_1` FOREIGN KEY (`campus_id`) REFERENCES `campuses` (`campus_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `departments_ibfk_2` FOREIGN KEY (`head_of_department_id`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `device_tokens`
--
ALTER TABLE `device_tokens`
  ADD CONSTRAINT `device_tokens_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `drive_files`
--
ALTER TABLE `drive_files`
  ADD CONSTRAINT `fk_drive_files_folder` FOREIGN KEY (`drive_folder_id`) REFERENCES `drive_folders` (`drive_folder_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_drive_files_local` FOREIGN KEY (`local_file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_drive_files_uploaded_by` FOREIGN KEY (`uploaded_by`) REFERENCES `users` (`user_id`);

--
-- Constraints for table `drive_folders`
--
ALTER TABLE `drive_folders`
  ADD CONSTRAINT `fk_drive_folders_created_by` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`),
  ADD CONSTRAINT `fk_drive_folders_parent` FOREIGN KEY (`parent_drive_folder_id`) REFERENCES `drive_folders` (`drive_folder_id`) ON DELETE CASCADE;

--
-- Constraints for table `email_verifications`
--
ALTER TABLE `email_verifications`
  ADD CONSTRAINT `fk_email_verifications_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `exam_schedules`
--
ALTER TABLE `exam_schedules`
  ADD CONSTRAINT `exam_schedules_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `exam_schedules_ibfk_2` FOREIGN KEY (`semester_id`) REFERENCES `semesters` (`semester_id`) ON DELETE CASCADE;

--
-- Constraints for table `export_history`
--
ALTER TABLE `export_history`
  ADD CONSTRAINT `export_history_ibfk_1` FOREIGN KEY (`report_id`) REFERENCES `generated_reports` (`report_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `export_history_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `export_history_ibfk_3` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL;

--
-- Constraints for table `face_recognition_data`
--
ALTER TABLE `face_recognition_data`
  ADD CONSTRAINT `face_recognition_data_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `feedback_responses`
--
ALTER TABLE `feedback_responses`
  ADD CONSTRAINT `feedback_responses_ibfk_1` FOREIGN KEY (`feedback_id`) REFERENCES `user_feedback` (`feedback_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `feedback_responses_ibfk_2` FOREIGN KEY (`ticket_id`) REFERENCES `support_tickets` (`ticket_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `feedback_responses_ibfk_3` FOREIGN KEY (`responder_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `files`
--
ALTER TABLE `files`
  ADD CONSTRAINT `files_ibfk_1` FOREIGN KEY (`uploaded_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `files_ibfk_2` FOREIGN KEY (`folder_id`) REFERENCES `folders` (`folder_id`) ON DELETE SET NULL;

--
-- Constraints for table `file_permissions`
--
ALTER TABLE `file_permissions`
  ADD CONSTRAINT `file_permissions_ibfk_1` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `file_permissions_ibfk_2` FOREIGN KEY (`folder_id`) REFERENCES `folders` (`folder_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `file_permissions_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `file_permissions_ibfk_4` FOREIGN KEY (`role_id`) REFERENCES `roles` (`role_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `file_permissions_ibfk_5` FOREIGN KEY (`granted_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `file_versions`
--
ALTER TABLE `file_versions`
  ADD CONSTRAINT `file_versions_ibfk_1` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `file_versions_ibfk_2` FOREIGN KEY (`uploaded_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `folders`
--
ALTER TABLE `folders`
  ADD CONSTRAINT `folders_ibfk_1` FOREIGN KEY (`parent_folder_id`) REFERENCES `folders` (`folder_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `folders_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `forum_categories`
--
ALTER TABLE `forum_categories`
  ADD CONSTRAINT `forum_categories_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE;

--
-- Constraints for table `generated_reports`
--
ALTER TABLE `generated_reports`
  ADD CONSTRAINT `generated_reports_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `report_templates` (`template_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `generated_reports_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `generated_reports_ibfk_3` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL;

--
-- Constraints for table `gpa_calculations`
--
ALTER TABLE `gpa_calculations`
  ADD CONSTRAINT `gpa_calculations_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `gpa_calculations_ibfk_2` FOREIGN KEY (`semester_id`) REFERENCES `semesters` (`semester_id`) ON DELETE CASCADE;

--
-- Constraints for table `grades`
--
ALTER TABLE `grades`
  ADD CONSTRAINT `grades_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `grades_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `grades_ibfk_3` FOREIGN KEY (`assignment_id`) REFERENCES `assignments` (`assignment_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `grades_ibfk_4` FOREIGN KEY (`quiz_id`) REFERENCES `quizzes` (`quiz_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `grades_ibfk_5` FOREIGN KEY (`lab_id`) REFERENCES `labs` (`lab_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `grades_ibfk_6` FOREIGN KEY (`graded_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `grade_components`
--
ALTER TABLE `grade_components`
  ADD CONSTRAINT `grade_components_ibfk_1` FOREIGN KEY (`grade_id`) REFERENCES `grades` (`grade_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `grade_components_ibfk_2` FOREIGN KEY (`rubric_id`) REFERENCES `rubrics` (`rubric_id`) ON DELETE SET NULL;

--
-- Constraints for table `image_text_extractions`
--
ALTER TABLE `image_text_extractions`
  ADD CONSTRAINT `image_text_extractions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `image_text_extractions_ibfk_2` FOREIGN KEY (`image_file_id`) REFERENCES `files` (`file_id`) ON DELETE CASCADE;

--
-- Constraints for table `labs`
--
ALTER TABLE `labs`
  ADD CONSTRAINT `labs_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `labs_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `lab_attendance`
--
ALTER TABLE `lab_attendance`
  ADD CONSTRAINT `lab_attendance_ibfk_1` FOREIGN KEY (`lab_id`) REFERENCES `labs` (`lab_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lab_attendance_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lab_attendance_ibfk_3` FOREIGN KEY (`marked_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `lab_instructions`
--
ALTER TABLE `lab_instructions`
  ADD CONSTRAINT `lab_instructions_ibfk_1` FOREIGN KEY (`lab_id`) REFERENCES `labs` (`lab_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lab_instructions_ibfk_2` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL;

--
-- Constraints for table `lab_submissions`
--
ALTER TABLE `lab_submissions`
  ADD CONSTRAINT `lab_submissions_ibfk_1` FOREIGN KEY (`lab_id`) REFERENCES `labs` (`lab_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lab_submissions_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lab_submissions_ibfk_3` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL;

--
-- Constraints for table `language_preferences`
--
ALTER TABLE `language_preferences`
  ADD CONSTRAINT `language_preferences_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `leaderboards`
--
ALTER TABLE `leaderboards`
  ADD CONSTRAINT `leaderboards_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `leaderboards_ibfk_2` FOREIGN KEY (`semester_id`) REFERENCES `semesters` (`semester_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `leaderboards_ibfk_3` FOREIGN KEY (`department_id`) REFERENCES `departments` (`department_id`) ON DELETE CASCADE;

--
-- Constraints for table `leaderboard_rankings`
--
ALTER TABLE `leaderboard_rankings`
  ADD CONSTRAINT `leaderboard_rankings_ibfk_1` FOREIGN KEY (`leaderboard_id`) REFERENCES `leaderboards` (`leaderboard_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `leaderboard_rankings_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `learning_analytics`
--
ALTER TABLE `learning_analytics`
  ADD CONSTRAINT `learning_analytics_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `learning_analytics_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `learning_analytics_ibfk_3` FOREIGN KEY (`progress_id`) REFERENCES `student_progress` (`progress_id`) ON DELETE CASCADE;

--
-- Constraints for table `lecture_sections_labs`
--
ALTER TABLE `lecture_sections_labs`
  ADD CONSTRAINT `lecture_sections_labs_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lecture_sections_labs_ibfk_2` FOREIGN KEY (`material_id`) REFERENCES `course_materials` (`material_id`) ON DELETE SET NULL;

--
-- Constraints for table `live_sessions`
--
ALTER TABLE `live_sessions`
  ADD CONSTRAINT `live_sessions_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `live_sessions_ibfk_2` FOREIGN KEY (`instructor_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `live_sessions_ibfk_3` FOREIGN KEY (`recording_file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL;

--
-- Constraints for table `live_session_participants`
--
ALTER TABLE `live_session_participants`
  ADD CONSTRAINT `live_session_participants_ibfk_1` FOREIGN KEY (`session_id`) REFERENCES `live_sessions` (`session_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `live_session_participants_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `login_attempts`
--
ALTER TABLE `login_attempts`
  ADD CONSTRAINT `login_attempts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `material_downloads`
--
ALTER TABLE `material_downloads`
  ADD CONSTRAINT `material_downloads_ibfk_1` FOREIGN KEY (`material_id`) REFERENCES `course_materials` (`material_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `material_downloads_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `material_views`
--
ALTER TABLE `material_views`
  ADD CONSTRAINT `material_views_ibfk_1` FOREIGN KEY (`material_id`) REFERENCES `course_materials` (`material_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `material_views_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `messages`
--
ALTER TABLE `messages`
  ADD CONSTRAINT `fk_messages_reply_to` FOREIGN KEY (`reply_to_id`) REFERENCES `messages` (`message_id`) ON DELETE SET NULL,
  ADD CONSTRAINT `messages_ibfk_1` FOREIGN KEY (`sender_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `messages_ibfk_2` FOREIGN KEY (`parent_message_id`) REFERENCES `messages` (`message_id`) ON DELETE CASCADE;

--
-- Constraints for table `message_participants`
--
ALTER TABLE `message_participants`
  ADD CONSTRAINT `message_participants_ibfk_1` FOREIGN KEY (`message_id`) REFERENCES `messages` (`message_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `message_participants_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `milestone_definitions`
--
ALTER TABLE `milestone_definitions`
  ADD CONSTRAINT `milestone_definitions_ibfk_1` FOREIGN KEY (`badge_id`) REFERENCES `badges` (`badge_id`) ON DELETE CASCADE;

--
-- Constraints for table `notifications`
--
ALTER TABLE `notifications`
  ADD CONSTRAINT `notifications_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `notifications_ibfk_2` FOREIGN KEY (`announcement_id`) REFERENCES `announcements` (`announcement_id`) ON DELETE CASCADE;

--
-- Constraints for table `notification_preferences`
--
ALTER TABLE `notification_preferences`
  ADD CONSTRAINT `notification_preferences_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `office_hour_appointments`
--
ALTER TABLE `office_hour_appointments`
  ADD CONSTRAINT `fk_appointment_slot` FOREIGN KEY (`slot_id`) REFERENCES `office_hour_slots` (`slot_id`),
  ADD CONSTRAINT `fk_appointment_student` FOREIGN KEY (`student_id`) REFERENCES `users` (`user_id`);

--
-- Constraints for table `office_hour_slots`
--
ALTER TABLE `office_hour_slots`
  ADD CONSTRAINT `fk_office_hours_instructor` FOREIGN KEY (`instructor_id`) REFERENCES `users` (`user_id`);

--
-- Constraints for table `offline_sync_queue`
--
ALTER TABLE `offline_sync_queue`
  ADD CONSTRAINT `offline_sync_queue_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `password_resets`
--
ALTER TABLE `password_resets`
  ADD CONSTRAINT `password_resets_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `payment_transactions`
--
ALTER TABLE `payment_transactions`
  ADD CONSTRAINT `payment_transactions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `payment_transactions_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE SET NULL;

--
-- Constraints for table `peer_reviews`
--
ALTER TABLE `peer_reviews`
  ADD CONSTRAINT `peer_reviews_ibfk_1` FOREIGN KEY (`submission_id`) REFERENCES `assignment_submissions` (`submission_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `peer_reviews_ibfk_2` FOREIGN KEY (`reviewer_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `peer_reviews_ibfk_3` FOREIGN KEY (`reviewee_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `performance_metrics`
--
ALTER TABLE `performance_metrics`
  ADD CONSTRAINT `performance_metrics_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `performance_metrics_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE;

--
-- Constraints for table `programs`
--
ALTER TABLE `programs`
  ADD CONSTRAINT `programs_ibfk_1` FOREIGN KEY (`department_id`) REFERENCES `departments` (`department_id`) ON DELETE CASCADE;

--
-- Constraints for table `quizzes`
--
ALTER TABLE `quizzes`
  ADD CONSTRAINT `quizzes_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `quizzes_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `quiz_answers`
--
ALTER TABLE `quiz_answers`
  ADD CONSTRAINT `quiz_answers_ibfk_1` FOREIGN KEY (`attempt_id`) REFERENCES `quiz_attempts` (`attempt_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `quiz_answers_ibfk_2` FOREIGN KEY (`question_id`) REFERENCES `quiz_questions` (`question_id`) ON DELETE CASCADE;

--
-- Constraints for table `quiz_attempts`
--
ALTER TABLE `quiz_attempts`
  ADD CONSTRAINT `quiz_attempts_ibfk_1` FOREIGN KEY (`quiz_id`) REFERENCES `quizzes` (`quiz_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `quiz_attempts_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `quiz_questions`
--
ALTER TABLE `quiz_questions`
  ADD CONSTRAINT `quiz_questions_ibfk_1` FOREIGN KEY (`quiz_id`) REFERENCES `quizzes` (`quiz_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `quiz_questions_ibfk_2` FOREIGN KEY (`difficulty_level_id`) REFERENCES `quiz_difficulty_levels` (`difficulty_id`) ON DELETE SET NULL;

--
-- Constraints for table `report_templates`
--
ALTER TABLE `report_templates`
  ADD CONSTRAINT `report_templates_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `rewards`
--
ALTER TABLE `rewards`
  ADD CONSTRAINT `rewards_ibfk_1` FOREIGN KEY (`achievement_id`) REFERENCES `achievements` (`achievement_id`) ON DELETE SET NULL;

--
-- Constraints for table `reward_redemptions`
--
ALTER TABLE `reward_redemptions`
  ADD CONSTRAINT `reward_redemptions_ibfk_1` FOREIGN KEY (`reward_id`) REFERENCES `rewards` (`reward_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `reward_redemptions_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `reward_redemptions_ibfk_3` FOREIGN KEY (`approved_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `role_permissions`
--
ALTER TABLE `role_permissions`
  ADD CONSTRAINT `role_permissions_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`role_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_permissions_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`permission_id`) ON DELETE CASCADE;

--
-- Constraints for table `rubrics`
--
ALTER TABLE `rubrics`
  ADD CONSTRAINT `rubrics_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `rubrics_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `scheduled_notifications`
--
ALTER TABLE `scheduled_notifications`
  ADD CONSTRAINT `scheduled_notifications_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `scheduled_notifications_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `search_history`
--
ALTER TABLE `search_history`
  ADD CONSTRAINT `search_history_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `security_logs`
--
ALTER TABLE `security_logs`
  ADD CONSTRAINT `security_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `sessions`
--
ALTER TABLE `sessions`
  ADD CONSTRAINT `sessions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `ssl_certificates`
--
ALTER TABLE `ssl_certificates`
  ADD CONSTRAINT `ssl_certificates_ibfk_1` FOREIGN KEY (`campus_id`) REFERENCES `campuses` (`campus_id`) ON DELETE CASCADE;

--
-- Constraints for table `student_progress`
--
ALTER TABLE `student_progress`
  ADD CONSTRAINT `student_progress_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_progress_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_progress_ibfk_3` FOREIGN KEY (`enrollment_id`) REFERENCES `course_enrollments` (`enrollment_id`) ON DELETE CASCADE;

--
-- Constraints for table `student_tasks`
--
ALTER TABLE `student_tasks`
  ADD CONSTRAINT `student_tasks_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_tasks_ibfk_2` FOREIGN KEY (`assignment_id`) REFERENCES `assignments` (`assignment_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_tasks_ibfk_3` FOREIGN KEY (`quiz_id`) REFERENCES `quizzes` (`quiz_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `student_tasks_ibfk_4` FOREIGN KEY (`lab_id`) REFERENCES `labs` (`lab_id`) ON DELETE CASCADE;

--
-- Constraints for table `study_groups`
--
ALTER TABLE `study_groups`
  ADD CONSTRAINT `study_groups_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `study_groups_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `study_group_members`
--
ALTER TABLE `study_group_members`
  ADD CONSTRAINT `study_group_members_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `study_groups` (`group_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `study_group_members_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `support_tickets`
--
ALTER TABLE `support_tickets`
  ADD CONSTRAINT `support_tickets_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `support_tickets_ibfk_2` FOREIGN KEY (`feedback_id`) REFERENCES `user_feedback` (`feedback_id`) ON DELETE SET NULL,
  ADD CONSTRAINT `support_tickets_ibfk_3` FOREIGN KEY (`assigned_to`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `system_alerts`
--
ALTER TABLE `system_alerts`
  ADD CONSTRAINT `system_alerts_ibfk_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `system_errors`
--
ALTER TABLE `system_errors`
  ADD CONSTRAINT `system_errors_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE SET NULL,
  ADD CONSTRAINT `system_errors_ibfk_2` FOREIGN KEY (`resolved_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `system_settings`
--
ALTER TABLE `system_settings`
  ADD CONSTRAINT `system_settings_ibfk_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `users` (`user_id`) ON DELETE SET NULL;

--
-- Constraints for table `task_completion`
--
ALTER TABLE `task_completion`
  ADD CONSTRAINT `task_completion_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `student_tasks` (`task_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `task_completion_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `ta_instructor_access`
--
ALTER TABLE `ta_instructor_access`
  ADD CONSTRAINT `ta_instructor_access_ibfk_1` FOREIGN KEY (`instructor_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ta_instructor_access_ibfk_2` FOREIGN KEY (`ta_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ta_instructor_access_ibfk_3` FOREIGN KEY (`section_id`) REFERENCES `course_sections` (`section_id`) ON DELETE CASCADE;

--
-- Constraints for table `theme_preferences`
--
ALTER TABLE `theme_preferences`
  ADD CONSTRAINT `theme_preferences_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `two_factor_auth`
--
ALTER TABLE `two_factor_auth`
  ADD CONSTRAINT `two_factor_auth_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `user_badges`
--
ALTER TABLE `user_badges`
  ADD CONSTRAINT `user_badges_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `user_badges_ibfk_2` FOREIGN KEY (`badge_id`) REFERENCES `badges` (`badge_id`) ON DELETE CASCADE;

--
-- Constraints for table `user_feedback`
--
ALTER TABLE `user_feedback`
  ADD CONSTRAINT `user_feedback_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `user_levels`
--
ALTER TABLE `user_levels`
  ADD CONSTRAINT `user_levels_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `user_preferences`
--
ALTER TABLE `user_preferences`
  ADD CONSTRAINT `fk_user_preferences_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- Constraints for table `user_roles`
--
ALTER TABLE `user_roles`
  ADD CONSTRAINT `user_roles_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `user_roles_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `roles` (`role_id`) ON DELETE CASCADE;

--
-- Constraints for table `user_subscriptions`
--
ALTER TABLE `user_subscriptions`
  ADD CONSTRAINT `fk_subscription_plan` FOREIGN KEY (`plan_id`) REFERENCES `subscription_plans` (`plan_id`),
  ADD CONSTRAINT `fk_subscription_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`);

--
-- Constraints for table `voice_recordings`
--
ALTER TABLE `voice_recordings`
  ADD CONSTRAINT `voice_recordings_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `voice_recordings_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `voice_recordings_ibfk_3` FOREIGN KEY (`file_id`) REFERENCES `files` (`file_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `voice_recordings_ibfk_4` FOREIGN KEY (`transcription_id`) REFERENCES `voice_transcriptions` (`transcription_id`) ON DELETE SET NULL;

--
-- Constraints for table `voice_transcriptions`
--
ALTER TABLE `voice_transcriptions`
  ADD CONSTRAINT `voice_transcriptions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `voice_transcriptions_ibfk_2` FOREIGN KEY (`audio_file_id`) REFERENCES `files` (`file_id`) ON DELETE SET NULL;

--
-- Constraints for table `weak_topics_analysis`
--
ALTER TABLE `weak_topics_analysis`
  ADD CONSTRAINT `weak_topics_analysis_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `weak_topics_analysis_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE;

--
-- Constraints for table `xp_transactions`
--
ALTER TABLE `xp_transactions`
  ADD CONSTRAINT `xp_transactions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `xp_transactions_ibfk_2` FOREIGN KEY (`rule_id`) REFERENCES `points_rules` (`rule_id`) ON DELETE SET NULL;
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 */;
