-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `innex`
--

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

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

CREATE TABLE `audit_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) NOT NULL,
  `auditable_type` varchar(255) DEFAULT NULL,
  `auditable_id` bigint(20) UNSIGNED DEFAULT NULL,
  `old_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`old_values`)),
  `new_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`new_values`)),
  `reason` text DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `audit_logs` (`id`, `user_id`, `action`, `auditable_type`, `auditable_id`, `old_values`, `new_values`, `reason`, `ip_address`, `user_agent`, `created_at`) VALUES
(1, 1, 'import.student_accounts', NULL, NULL, '[]', '{\"records\":30}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-30 03:50:25'),
(2, 1, 'competition.created', 'App\\Models\\Competition', 1, '[]', '{\"code\":\"INNODAY2026\",\"title\":\"Innovation Day 2026\",\"organiser\":\"Faculty of Computer Science and Technology\",\"venue\":\"FCUC Hall\",\"competition_date\":\"2026-08-11T16:00:00.000000Z\",\"registration_deadline\":\"2026-08-10T16:00:00.000000Z\",\"submission_deadline\":\"2026-08-10T16:00:00.000000Z\",\"status\":\"registration\",\"is_public\":true,\"categories\":[\"Mini Project\",\"Project-based\",\"Final Year Project\"],\"updated_at\":\"2026-07-30T03:54:09.000000Z\",\"created_at\":\"2026-07-30T03:54:09.000000Z\",\"id\":1}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-30 03:54:09'),
(3, 1, 'import.projects', NULL, NULL, '[]', '{\"records\":32}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-30 04:00:19'),
(4, 1, 'import.panel_accounts', NULL, NULL, '[]', '{\"records\":5}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-30 04:06:56'),
(5, 1, 'user.created', 'App\\Models\\User', 41, '[]', '{\"name\":\"Assoc. Prof. Ts. Dr. Chng Chern Wei\",\"username\":\"Dean\",\"email\":\"chernwei.chng@firstcity.edu.my\",\"role\":\"superadmin\",\"is_active\":true,\"student_id\":null,\"programme\":null,\"contact_no\":null,\"school_name\":null,\"locale\":\"en\",\"must_change_password\":true,\"updated_at\":\"2026-07-30T04:13:06.000000Z\",\"created_at\":\"2026-07-30T04:13:06.000000Z\",\"id\":41}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-30 04:13:06');

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

--
-- Table structure for table `competitions`
--

CREATE TABLE `competitions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(40) NOT NULL,
  `title` varchar(255) NOT NULL,
  `organiser` varchar(255) NOT NULL,
  `venue` varchar(255) DEFAULT NULL,
  `competition_date` date NOT NULL,
  `registration_deadline` datetime DEFAULT NULL,
  `submission_deadline` datetime DEFAULT NULL,
  `status` varchar(30) NOT NULL DEFAULT 'draft',
  `is_public` tinyint(1) NOT NULL DEFAULT 0,
  `categories` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`categories`)),
  `language_options` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`language_options`)),
  `settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`settings`)),
  `completed_at` timestamp NULL DEFAULT NULL,
  `completed_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `competitions`
--

INSERT INTO `competitions` (`id`, `code`, `title`, `organiser`, `venue`, `competition_date`, `registration_deadline`, `submission_deadline`, `status`, `is_public`, `categories`, `language_options`, `settings`, `completed_at`, `completed_by`, `created_at`, `updated_at`) VALUES
(1, 'INNODAY2026', 'Innovation Day 2026', 'Faculty of Computer Science and Technology', 'FCUC Hall', '2026-08-12', '2026-08-11 00:00:00', '2026-08-11 00:00:00', 'registration', 1, '[\"Mini Project\",\"Project-based\",\"Final Year Project\"]', NULL, NULL, NULL, NULL, '2026-07-30 03:54:09', '2026-07-30 03:54:09');

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

--
-- Table structure for table `evaluations`
--

CREATE TABLE `evaluations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `panel_id` bigint(20) UNSIGNED NOT NULL,
  `rubric_id` bigint(20) UNSIGNED NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'draft',
  `total_score` decimal(7,2) NOT NULL DEFAULT 0.00,
  `comments` text DEFAULT NULL,
  `justification` text DEFAULT NULL,
  `finalised_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `evaluation_scores`
--

CREATE TABLE `evaluation_scores` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `evaluation_id` bigint(20) UNSIGNED NOT NULL,
  `rubric_criterion_id` bigint(20) UNSIGNED NOT NULL,
  `raw_score` decimal(7,2) NOT NULL,
  `weighted_score` decimal(7,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `failed_jobs`
--

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

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

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

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

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '2026_07_25_000100_create_picms_tables', 1);

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

--
-- Table structure for table `panel_assignments`
--

CREATE TABLE `panel_assignments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `panel_id` bigint(20) UNSIGNED NOT NULL,
  `assigned_by` bigint(20) UNSIGNED NOT NULL,
  `assigned_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `projects`
--

CREATE TABLE `projects` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `competition_id` bigint(20) UNSIGNED NOT NULL,
  `project_code` varchar(50) NOT NULL,
  `title` varchar(255) NOT NULL,
  `category` varchar(255) NOT NULL DEFAULT 'Open',
  `abstract` longtext DEFAULT NULL,
  `status` varchar(30) NOT NULL DEFAULT 'draft',
  `average_score` decimal(7,2) DEFAULT NULL,
  `rank` int(10) UNSIGNED DEFAULT NULL,
  `award_title` varchar(255) DEFAULT NULL,
  `submitted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `projects`
--

INSERT INTO `projects` (`id`, `competition_id`, `project_code`, `title`, `category`, `abstract`, `status`, `average_score`, `rank`, `award_title`, `submitted_at`, `created_at`, `updated_at`) VALUES
(1, 1, 'P001', 'Smart Bicycle Health and Security Monitoring System', 'Mini Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(2, 1, 'P002', 'Maximizing the Potential of ChatGPT: Strategies for Successful Implementation in the Education Sector', 'Project-based', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(3, 1, 'P003', 'Maximizing the Potential of ChatGPT: Strategies for Successful Implementation in the Education Sector', 'Project-based', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(4, 1, 'P004', 'Maximizing the Potential of ChatGPT: Strategies for Successful Implementation in the Education Sector', 'Project-based', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(5, 1, 'P005', 'EduVR Hall Tour using A-Frame', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(6, 1, 'P006', 'CampusEats: Mobile Food Ordering System for FCUC', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(7, 1, 'P007', 'Vision-based Remote Online Play Platform For Trading Card Game', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(8, 1, 'P008', 'Community TechCare', 'Mini Assignment', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(9, 1, 'P009', 'GreenQuest Campus', 'Mini Assignment', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(10, 1, 'P010', 'FCST EventPass', 'Mini Assignment', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(11, 1, 'P011', 'FCST InnovateHub', 'Mini Assignment', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(12, 1, 'P012', 'FCST SkillSwap+', 'Mini Assignment', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(13, 1, 'P013', 'ResearchMatch FCST', 'Mini Assignment', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(14, 1, 'P014', 'Wireless Smart Bin', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(15, 1, 'P015', 'First City Campus LostFoundHub', 'Mini Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(16, 1, 'P016', 'KeepItSafe: Your Offline Secure Password Manager', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(17, 1, 'P017', 'Phishing Detection Tool using Natural Language Processing', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(18, 1, 'P018', 'Information Governance  for SAlFE', 'Project-based', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(19, 1, 'P019', 'Mental Health Awareness Application', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(20, 1, 'P020', 'MonsterVision: An intelligent booking system for Monster Tennis KL', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(21, 1, 'P021', 'Gamified Learning: An Educational System to Improve Spelling and Focus_in_Children', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(22, 1, 'P022', 'ElderCare Connect: Mobile Elderly Care Application', 'Project-based', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(23, 1, 'P023', 'A Location - Based Event Aggregaration System Using Web Scraping', 'FInal Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(24, 1, 'P024', 'Web-based Fuzzy Logic Data Generation System', 'Project-based', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(25, 1, 'P025', 'Stock Market Prediction Model', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(26, 1, 'P026', 'SmartShield Connect: AI-Enhanced Secure Distributed Communication Framework', 'Mini Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(27, 1, 'P027', 'Smart-Context-Aware Face Recognition Attendance System for Smart Classroom Environments', 'Mini Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(28, 1, 'P028', 'Lightweight Activity Detection', 'Project-based', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(29, 1, 'P029', 'Malaysian Cybercrime: Real-Worls Case Studies and Legal Frameworks', 'Project-based', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(30, 1, 'P030', 'Face Following Robotic Vehicle with Optimized Computer Vision Initialization', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(31, 1, 'P031', 'Industrial IoT Predictive Maintenance System for Bearing Fault Detection Using Vibration and Acoustic Signals', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(32, 1, 'P032', 'Fully Mechanical Prosthetic Finger', 'Final Year Project', '', 'draft', NULL, NULL, NULL, NULL, '2026-07-30 04:00:19', '2026-07-30 04:00:19');

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

--
-- Table structure for table `project_files`
--

CREATE TABLE `project_files` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(30) NOT NULL,
  `original_name` varchar(255) NOT NULL,
  `path` varchar(255) NOT NULL,
  `mime_type` varchar(255) DEFAULT NULL,
  `size` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `uploaded_by` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `project_members`
--

CREATE TABLE `project_members` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `is_leader` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `project_members`
--

INSERT INTO `project_members` (`id`, `project_id`, `user_id`, `is_leader`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(2, 2, 3, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(3, 3, 4, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(4, 4, 5, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(5, 5, 6, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(6, 6, 7, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(7, 7, 8, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(8, 8, 9, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(9, 9, 10, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(10, 10, 11, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(11, 11, 12, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(12, 12, 13, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(13, 13, 14, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(14, 14, 15, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(15, 15, 16, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(16, 16, 17, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(17, 17, 18, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(18, 18, 19, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(19, 19, 20, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(20, 20, 21, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(21, 21, 22, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(22, 22, 23, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(23, 23, 23, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(24, 24, 24, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(25, 25, 25, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(26, 26, 25, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(27, 27, 26, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(28, 28, 27, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(29, 29, 28, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(30, 30, 29, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(31, 31, 30, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(32, 32, 31, 1, '2026-07-30 04:00:19', '2026-07-30 04:00:19');

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

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

CREATE TABLE `rubrics` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `competition_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `rubric_criteria`
--

CREATE TABLE `rubric_criteria` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `rubric_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `max_score` decimal(7,2) NOT NULL,
  `weightage` decimal(7,2) NOT NULL,
  `display_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('ojdMwpuEn4iNPe66RTvJ7YL6SUmFFJ7kVSx0mPgB', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiazdPOFBtdklGaGJLTjFyMmNhMHphWHlzZFJoSkhia0p5Q2FWSmNXVSI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzU6Imh0dHA6Ly9sb2NhbGhvc3QvSU5ORVgvcHVibGljL2xvZ2luIjtzOjU6InJvdXRlIjtzOjU6ImxvZ2luIjt9fQ==', 1785384791);

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

--
-- Table structure for table `supervisors`
--

CREATE TABLE `supervisors` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `organisation` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supervisors`
--

INSERT INTO `supervisors` (`id`, `project_id`, `name`, `email`, `organisation`, `created_at`, `updated_at`) VALUES
(1, 1, 'Mr. Cham Kah Loon', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(2, 2, 'Asst. Prof. Ir. Dr. Tay Ching En Marcus', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(3, 3, 'Asst. Prof. Ir. Dr. Tay Ching En Marcus', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(4, 4, 'Asst. Prof. Ir. Dr. Tay Ching En Marcus', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(5, 5, 'Mr. Mohd Sukry Bin Mohd Taib', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(6, 6, 'Miss Nur Safura binti Mohd Rafee', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(7, 7, 'Mr. Mohd Norfitri Bin Nordin', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(8, 8, 'Mr. Ibrahim Bin Mohd Jamadi', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(9, 9, 'Mr. Ibrahim Bin Mohd Jamadi', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(10, 10, 'Mr. Ibrahim Bin Mohd Jamadi', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(11, 11, 'Mr. Ibrahim Bin Mohd Jamadi', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(12, 12, 'Mr. Ibrahim Bin Mohd Jamadi', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(13, 13, 'Mr. Ibrahim Mohd Jamadi', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(14, 14, 'Ir. Muammar Quadaffi bin Mohd Ariffin', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(15, 15, 'Dr. Seow Yoke May', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(16, 16, 'Dr. Ridhwan Hilmi', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(17, 17, 'Mr. Mohd Sukry Mohd Taib', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(18, 18, 'Lee Shy Yun', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(19, 19, 'Mr. Mohd Norfitri Bin Nordin', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(20, 20, 'Ir. Muammar Quadaffi bin Mohd Ariffin', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(21, 21, 'Ts. Siti Syahirah Binti Ibrahim', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(22, 22, 'Mr. Mohd Norfitri Bin Nordin', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(23, 23, 'Dr. Ridhwan Hilmi', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(24, 24, 'Mr. Mohd Norfitri Bin Nordin', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(25, 25, 'Mr. Ibrahim Bin Mohd Jamadi', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(26, 26, 'Assoc. Prof. Ts. Dr. Chng Chern Wei', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(27, 27, 'Mohd Sukry Bin Mohd Taib', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(28, 28, 'Ts. Siti Syahirah Binti Ibrahim', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(29, 29, 'Lee Shy Yun', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(30, 30, 'Asst. Prof. Ir. Dr. Tay Ching En Marcus', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(31, 31, 'Asst. Prof. Ir. Dr. Tay Ching En Marcus', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19'),
(32, 32, 'Ir. Muammar Quadaffi bin Mohd Ariffin', NULL, 'Faculty of Computer Science and Technology', '2026-07-30 04:00:19', '2026-07-30 04:00:19');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `audit_logs`
--
ALTER TABLE `audit_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `audit_logs_user_id_foreign` (`user_id`),
  ADD KEY `audit_logs_auditable_type_auditable_id_index` (`auditable_type`,`auditable_id`),
  ADD KEY `audit_logs_action_index` (`action`);

--
-- Indexes for table `competitions`
--
ALTER TABLE `competitions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `competitions_code_unique` (`code`),
  ADD KEY `competitions_completed_by_foreign` (`completed_by`),
  ADD KEY `competitions_status_index` (`status`);

--
-- Indexes for table `evaluations`
--
ALTER TABLE `evaluations`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `evaluations_project_id_panel_id_unique` (`project_id`,`panel_id`),
  ADD KEY `evaluations_panel_id_foreign` (`panel_id`),
  ADD KEY `evaluations_rubric_id_foreign` (`rubric_id`),
  ADD KEY `evaluations_status_index` (`status`);

--
-- Indexes for table `evaluation_scores`
--
ALTER TABLE `evaluation_scores`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `evaluation_scores_evaluation_id_rubric_criterion_id_unique` (`evaluation_id`,`rubric_criterion_id`),
  ADD KEY `evaluation_scores_rubric_criterion_id_foreign` (`rubric_criterion_id`);

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

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

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

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

--
-- Indexes for table `panel_assignments`
--
ALTER TABLE `panel_assignments`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `panel_assignments_project_id_panel_id_unique` (`project_id`,`panel_id`),
  ADD KEY `panel_assignments_panel_id_foreign` (`panel_id`),
  ADD KEY `panel_assignments_assigned_by_foreign` (`assigned_by`);

--
-- Indexes for table `projects`
--
ALTER TABLE `projects`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `projects_competition_id_project_code_unique` (`competition_id`,`project_code`),
  ADD KEY `projects_category_index` (`category`),
  ADD KEY `projects_status_index` (`status`);

--
-- Indexes for table `project_files`
--
ALTER TABLE `project_files`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_files_project_id_foreign` (`project_id`),
  ADD KEY `project_files_uploaded_by_foreign` (`uploaded_by`),
  ADD KEY `project_files_type_index` (`type`);

--
-- Indexes for table `project_members`
--
ALTER TABLE `project_members`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `project_members_project_id_user_id_unique` (`project_id`,`user_id`),
  ADD KEY `project_members_user_id_foreign` (`user_id`);

--
-- Indexes for table `rubrics`
--
ALTER TABLE `rubrics`
  ADD PRIMARY KEY (`id`),
  ADD KEY `rubrics_competition_id_foreign` (`competition_id`),
  ADD KEY `rubrics_is_active_index` (`is_active`);

--
-- Indexes for table `rubric_criteria`
--
ALTER TABLE `rubric_criteria`
  ADD PRIMARY KEY (`id`),
  ADD KEY `rubric_criteria_rubric_id_foreign` (`rubric_id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `supervisors`
--
ALTER TABLE `supervisors`
  ADD PRIMARY KEY (`id`),
  ADD KEY `supervisors_project_id_foreign` (`project_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

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

--
-- Constraints for table `competitions`
--
ALTER TABLE `competitions`
  ADD CONSTRAINT `competitions_completed_by_foreign` FOREIGN KEY (`completed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `evaluations`
--
ALTER TABLE `evaluations`
  ADD CONSTRAINT `evaluations_panel_id_foreign` FOREIGN KEY (`panel_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `evaluations_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `evaluations_rubric_id_foreign` FOREIGN KEY (`rubric_id`) REFERENCES `rubrics` (`id`);

--
-- Constraints for table `evaluation_scores`
--
ALTER TABLE `evaluation_scores`
  ADD CONSTRAINT `evaluation_scores_evaluation_id_foreign` FOREIGN KEY (`evaluation_id`) REFERENCES `evaluations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `evaluation_scores_rubric_criterion_id_foreign` FOREIGN KEY (`rubric_criterion_id`) REFERENCES `rubric_criteria` (`id`);

--
-- Constraints for table `panel_assignments`
--
ALTER TABLE `panel_assignments`
  ADD CONSTRAINT `panel_assignments_assigned_by_foreign` FOREIGN KEY (`assigned_by`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `panel_assignments_panel_id_foreign` FOREIGN KEY (`panel_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `panel_assignments_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `projects`
--
ALTER TABLE `projects`
  ADD CONSTRAINT `projects_competition_id_foreign` FOREIGN KEY (`competition_id`) REFERENCES `competitions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `project_files`
--
ALTER TABLE `project_files`
  ADD CONSTRAINT `project_files_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_files_uploaded_by_foreign` FOREIGN KEY (`uploaded_by`) REFERENCES `users` (`id`);

--
-- Constraints for table `project_members`
--
ALTER TABLE `project_members`
  ADD CONSTRAINT `project_members_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_members_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `rubrics`
--
ALTER TABLE `rubrics`
  ADD CONSTRAINT `rubrics_competition_id_foreign` FOREIGN KEY (`competition_id`) REFERENCES `competitions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `rubric_criteria`
--
ALTER TABLE `rubric_criteria`
  ADD CONSTRAINT `rubric_criteria_rubric_id_foreign` FOREIGN KEY (`rubric_id`) REFERENCES `rubrics` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `supervisors`
--
ALTER TABLE `supervisors`
  ADD CONSTRAINT `supervisors_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;
COMMIT;

