--
-- Host: localhost    Database: appsuper
-- ------------------------------------------------------


--
-- Table structure for table `academic_years`
--

CREATE TABLE `academic_years` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 0,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `academic_years_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `academic_years`
--

INSERT INTO `academic_years` VALUES (1,'2023/2024','2023-07-01','2024-06-30',0,'Tahun Ajaran 2023/2024','2026-01-29 04:54:00','2026-01-29 04:54:00'),(2,'2024/2025','2024-07-01','2025-06-30',0,'Tahun Ajaran 2024/2025','2026-01-29 04:54:00','2026-01-29 04:54:00'),(3,'2025/2026','2025-07-01','2026-06-30',1,'Tahun Ajaran 2025/2026 (Aktif)','2026-01-29 04:54:00','2026-01-29 04:54:00'),(4,'2026/2027','2026-07-01','2027-06-30',0,'Tahun Ajaran 2026/2027','2026-01-29 04:54:00','2026-01-29 04:54:00');

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

CREATE TABLE `announcements` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `type` enum('info','warning','success','danger') NOT NULL DEFAULT 'info',
  `is_popup` tinyint(1) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `announcements` VALUES (1,'hrrryr','hffhfh','info',1,1,0,'2026-02-04 19:40:50','2026-02-04 19:40:50');

--
-- Table structure for table `competencies`
--

CREATE TABLE `competencies` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(30) NOT NULL,
  `name` varchar(200) NOT NULL,
  `description` text DEFAULT NULL,
  `category` enum('PKLK','Pedagogik','Profesional','Sosial','Kepribadian') NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `competencies_code_unique` (`code`),
  KEY `competencies_name_index` (`name`),
  KEY `competencies_category_index` (`category`),
  KEY `competencies_is_active_index` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `competencies`
--

INSERT INTO `competencies` VALUES (1,'KOMP-PKLK-01','Pemahaman Asesmen PKLK','Kemampuan memahami dan melaksanakan asesmen PKLK','PKLK',1,'2025-10-22 16:31:12','2025-10-22 16:31:12'),(2,'KOMP-PKLK-02','Pengembangan Program PKLK','Kemampuan mengembangkan program PKLK','PKLK',1,'2025-10-22 16:31:12','2025-10-22 16:31:12'),(3,'KOMP-PKLK-03','Implementasi Kurikulum PKLK','Kemampuan mengimplementasikan kurikulum PKLK','PKLK',1,'2025-10-22 16:31:12','2025-10-22 16:31:12'),(4,'KOMP-PED-01','Pemahaman Karakteristik Peserta Didik','Kemampuan memahami karakteristik siswa','Pedagogik',1,'2025-10-22 16:31:12','2025-10-22 16:31:12'),(5,'KOMP-PED-02','Penguasaan Teori Belajar','Kemampuan menerapkan teori belajar','Pedagogik',1,'2025-10-22 16:31:12','2025-10-22 16:31:12'),(6,'KOMP-PED-03','Pengembangan Kurikulum','Kemampuan mengembangkan kurikulum','Pedagogik',1,'2025-10-22 16:31:12','2025-10-22 16:31:12'),(7,'KOMP-PROF-01','Penguasaan Materi Pelajaran','Kemampuan menguasai materi bidang studi','Profesional',1,'2025-10-22 16:31:12','2025-10-22 16:31:12'),(8,'KOMP-PROF-02','Teknologi Pembelajaran','Kemampuan menggunakan teknologi pembelajaran','Profesional',1,'2025-10-22 16:31:12','2025-10-22 16:31:12'),(9,'KOMP-SOS-01','Komunikasi dengan Siswa','Kemampuan berkomunikasi efektif dengan siswa','Sosial',1,'2025-10-22 16:31:12','2025-10-22 16:31:12'),(10,'KOMP-SOS-02','Kerjasama dengan Rekan Sejawat','Kemampuan berkolaborasi dengan guru lain','Sosial',1,'2025-10-22 16:31:12','2025-10-22 16:31:12');

--
-- Table structure for table `daya_tampung`
--

CREATE TABLE `daya_tampung` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `school_id` bigint(20) unsigned NOT NULL,
  `tahun_ajaran` varchar(20) NOT NULL,
  `tklb_a_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `tklb_a_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `tklb_b_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `tklb_b_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_1_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_1_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_2_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_2_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_3_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_3_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_4_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_4_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_5_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_5_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_6_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_6_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_7_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_7_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_8_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_8_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_9_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_9_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_10_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_10_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_11_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_11_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_12_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `kelas_12_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `total_rombel` int(10) unsigned NOT NULL DEFAULT 0,
  `total_siswa` int(10) unsigned NOT NULL DEFAULT 0,
  `rencana_rombel_tk` int(10) unsigned NOT NULL DEFAULT 0,
  `rencana_rombel_kelas_1` int(10) unsigned NOT NULL DEFAULT 0,
  `rencana_rombel_kelas_7` int(10) unsigned NOT NULL DEFAULT 0,
  `rencana_rombel_kelas_10` int(10) unsigned NOT NULL DEFAULT 0,
  `siswa_per_rombel` int(10) unsigned DEFAULT NULL,
  `daya_tampung_tk` int(10) unsigned NOT NULL DEFAULT 0,
  `daya_tampung_kelas_1` int(10) unsigned NOT NULL DEFAULT 0,
  `daya_tampung_kelas_7` int(10) unsigned NOT NULL DEFAULT 0,
  `daya_tampung_kelas_10` int(10) unsigned NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `daya_tampung_school_id_tahun_ajaran_index` (`school_id`,`tahun_ajaran`),
  CONSTRAINT `daya_tampung_school_id_foreign` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `daya_tampung`
--

INSERT INTO `daya_tampung` VALUES (1,2,'2026/2027',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,4,6,4,4,4,4,'2026-01-29 04:35:21','2026-02-05 05:44:42'),(2,2,'2025/2026',3,7,4,8,4,9,1,6,2,6,1,6,1,5,2,6,2,6,6,6,6,14,1,8,1,2,1,3,35,92,0,0,0,0,NULL,0,0,0,0,'2026-01-29 04:51:14','2026-01-29 06:43:33');

--
-- Table structure for table `disability_types`
--

CREATE TABLE `disability_types` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `code` 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,
  PRIMARY KEY (`id`),
  UNIQUE KEY `disability_types_code_unique` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `disability_types`
--

INSERT INTO `disability_types` VALUES (1,'Tunanetra','A','Peserta didik yang mengalami gangguan daya penglihatan berupa kebutaan menyeluruh atau sebagian.',1,'2026-01-30 07:16:34','2026-01-30 07:16:34'),(2,'Tunarungu','B','Peserta didik yang mengalami gangguan pendengaran atau kehilangan kemampuan mendengar.',1,'2026-01-30 07:16:34','2026-01-30 07:16:34'),(3,'Tunagrahita','C','Peserta didik yang memiliki tingkat kecerdasan di bawah rata-rata (IQ di bawah 70).',1,'2026-01-30 07:16:34','2026-01-30 07:16:34'),(4,'Tunadaksa','D','Peserta didik yang mengalami kelainan atau cacat pada anggota tubuh atau badan.',1,'2026-01-30 07:16:34','2026-01-30 07:16:34'),(5,'Tunalaras','E','Peserta didik yang mengalami gangguan atau hambatan emosi dan tingkah laku.',1,'2026-01-30 07:16:34','2026-01-30 07:16:34'),(6,'Tunawicara','F','Peserta didik yang mengalami gangguan atau hambatan dalam berbicara.',1,'2026-01-30 07:16:34','2026-01-30 07:16:34'),(7,'Tunaganda','G','Peserta didik yang mengalami kelainan lebih dari satu jenis kelainan.',1,'2026-01-30 07:16:34','2026-01-30 07:16:34'),(8,'Autis','Q','Peserta didik yang mengalami gangguan perkembangan neurobiologis kompleks.',1,'2026-01-30 07:16:34','2026-02-04 23:06:34');

--
-- Table structure for table `employee_assignments`
--

CREATE TABLE `employee_assignments` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `employee_id` bigint(20) unsigned NOT NULL,
  `assignment_type` varchar(255) NOT NULL,
  `kcd_id` bigint(20) unsigned DEFAULT NULL,
  `kab_kota_id` bigint(20) unsigned DEFAULT NULL,
  `school_id` bigint(20) unsigned DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_assignments_employee_id_foreign` (`employee_id`),
  KEY `employee_assignments_kcd_id_foreign` (`kcd_id`),
  KEY `employee_assignments_school_id_foreign` (`school_id`),
  KEY `employee_assignments_is_active_index` (`is_active`),
  KEY `employee_assignments_kab_kota_id_foreign` (`kab_kota_id`),
  CONSTRAINT `employee_assignments_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_assignments_kab_kota_id_foreign` FOREIGN KEY (`kab_kota_id`) REFERENCES `kab_kota` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_assignments_kcd_id_foreign` FOREIGN KEY (`kcd_id`) REFERENCES `kcds` (`id`) ON DELETE CASCADE,
  CONSTRAINT `employee_assignments_school_id_foreign` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employee_assignments`
--

INSERT INTO `employee_assignments` VALUES (1,1,'school',14,41,1,'2026-01-01',NULL,'ghgh',1,'2026-01-18 19:35:10','2026-01-18 19:35:10'),(2,1,'school',15,46,2,'2025-12-01',NULL,NULL,1,'2026-01-18 19:40:23','2026-01-18 19:40:23'),(3,4,'school',NULL,NULL,2,'2026-01-25',NULL,NULL,1,'2026-01-25 04:43:29','2026-01-25 04:43:29'),(4,5,'school',NULL,NULL,4,'2026-01-26',NULL,'Admin Sekolah',1,'2026-01-26 07:53:59','2026-01-26 07:53:59'),(5,6,'school',NULL,NULL,5,'2026-01-27',NULL,'Admin Sekolah',1,'2026-01-27 14:54:49','2026-01-27 14:54:49'),(6,7,'school',NULL,NULL,6,'2026-01-27',NULL,'Admin Sekolah',1,'2026-01-27 15:00:53','2026-01-27 15:00:53');

--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `nip` varchar(20) NOT NULL,
  `rank` varchar(50) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `employees_nip_unique` (`nip`),
  KEY `employees_name_index` (`name`),
  KEY `employees_is_active_index` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employees`
--

INSERT INTO `employees` VALUES (1,'Aythaya','198012312005011001','Penata Muda , III B','090909090','email@widi.com',1,'2026-01-18 16:03:31','2026-01-18 16:03:31'),(4,'Admin SLB Bina Harapan','198306152015031001',NULL,NULL,'admin.slb@appsuper.test',1,'2026-01-25 04:43:29','2026-01-25 04:43:29'),(5,'Admin SLB Bina Kasih','198306122015031001',NULL,'08080808102','enamnma@gmail.com',1,'2026-01-26 07:53:59','2026-01-26 07:53:59'),(6,'Admin SLB Lanjutan','898982919281928198',NULL,'0800808080','email@mail.com',1,'2026-01-27 14:54:49','2026-01-27 14:54:49'),(7,'Admin Nama sSekolah','12345121213131',NULL,'090909676','alsja@gmail.com',1,'2026-01-27 15:00:53','2026-01-27 15:00:53');

--
-- Table structure for table `evaluation_forms`
--

CREATE TABLE `evaluation_forms` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `created_by` bigint(20) unsigned NOT NULL,
  `title` varchar(200) NOT NULL,
  `description` text DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `target_role` enum('guru','kepala_sekolah','admin_sekolah') NOT NULL,
  `status` enum('draft','published','closed') NOT NULL DEFAULT 'draft',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `evaluation_forms_created_by_foreign` (`created_by`),
  KEY `evaluation_forms_status_start_date_end_date_index` (`status`,`start_date`,`end_date`),
  KEY `evaluation_forms_title_index` (`title`),
  KEY `evaluation_forms_start_date_index` (`start_date`),
  KEY `evaluation_forms_end_date_index` (`end_date`),
  KEY `evaluation_forms_target_role_index` (`target_role`),
  KEY `evaluation_forms_status_index` (`status`),
  CONSTRAINT `evaluation_forms_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `evaluation_forms`
--


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

CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `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(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `failed_jobs`
--


--
-- Table structure for table `form_questions`
--

CREATE TABLE `form_questions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `form_id` bigint(20) unsigned NOT NULL,
  `question_text` text NOT NULL,
  `question_type` enum('likert_1_5','likert_1_4','text','multiple_choice') NOT NULL,
  `options` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`options`)),
  `order` int(11) NOT NULL DEFAULT 0,
  `is_required` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `form_questions_form_id_order_index` (`form_id`,`order`),
  KEY `form_questions_question_type_index` (`question_type`),
  CONSTRAINT `form_questions_form_id_foreign` FOREIGN KEY (`form_id`) REFERENCES `evaluation_forms` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `form_questions`
--


--
-- Table structure for table `form_responses`
--

CREATE TABLE `form_responses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `form_id` bigint(20) unsigned NOT NULL,
  `question_id` bigint(20) unsigned NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `school_id` bigint(20) unsigned NOT NULL,
  `answer` text NOT NULL,
  `numeric_value` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `form_responses_form_id_question_id_user_id_unique` (`form_id`,`question_id`,`user_id`),
  KEY `form_responses_user_id_foreign` (`user_id`),
  KEY `form_responses_form_id_user_id_index` (`form_id`,`user_id`),
  KEY `form_responses_school_id_form_id_index` (`school_id`,`form_id`),
  KEY `form_responses_question_id_numeric_value_index` (`question_id`,`numeric_value`),
  KEY `form_responses_numeric_value_index` (`numeric_value`),
  CONSTRAINT `form_responses_form_id_foreign` FOREIGN KEY (`form_id`) REFERENCES `evaluation_forms` (`id`) ON DELETE CASCADE,
  CONSTRAINT `form_responses_question_id_foreign` FOREIGN KEY (`question_id`) REFERENCES `form_questions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `form_responses_school_id_foreign` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE,
  CONSTRAINT `form_responses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `form_responses`
--


--
-- 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,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `job_batches`
--


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

CREATE TABLE `jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `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,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `jobs`
--


--
-- Table structure for table `kab_kota`
--

CREATE TABLE `kab_kota` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `kcd_code` varchar(10) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `kab_kota_name_unique` (`name`),
  KEY `kab_kota_kcd_code_index` (`kcd_code`),
  KEY `kab_kota_is_active_index` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `kab_kota`
--

INSERT INTO `kab_kota` VALUES (29,'Kabupaten Bandung','KCD VIII',1,'2026-01-18 15:05:26','2026-01-27 21:58:06'),(30,'Kabupaten Bandung Barat','KCD VI',1,'2026-01-18 15:05:26','2026-01-27 21:58:33'),(31,'Kabupaten Bekasi','KCD III',1,'2026-01-18 15:05:26','2026-01-27 21:59:06'),(32,'Kabupaten Bogor','KCD I',1,'2026-01-18 15:05:26','2026-01-24 21:51:09'),(33,'Kabupaten Ciamis','KCD XIII',1,'2026-01-18 15:05:26','2026-01-24 21:56:36'),(34,'Kabupaten Cianjur','KCD VI',1,'2026-01-18 15:05:26','2026-01-27 21:59:36'),(35,'Kabupaten Cirebon','KCD X',1,'2026-01-18 15:05:26','2026-01-27 22:11:28'),(36,'Kabupaten Garut','KCD XI',1,'2026-01-18 15:05:26','2026-01-27 23:36:50'),(37,'Kabupaten Indramayu','KCD IX',1,'2026-01-18 15:05:26','2026-01-27 23:37:14'),(38,'Kabupaten Karawang','KCD IV',1,'2026-01-18 15:05:26','2026-01-27 23:38:06'),(39,'Kabupaten Kuningan','KCD X',1,'2026-01-18 15:05:26','2026-01-27 23:38:23'),(40,'Kabupaten Majalengka','KCD IX',1,'2026-01-18 15:05:26','2026-01-27 23:38:39'),(41,'Kabupaten Pangandaran','KCD XIII',1,'2026-01-18 15:05:26','2026-01-18 15:09:49'),(42,'Kabupaten Purwakarta','KCD IV',1,'2026-01-18 15:05:26','2026-01-27 23:39:04'),(43,'Kabupaten Subang','KCD IV',1,'2026-01-18 15:05:26','2026-01-27 23:39:20'),(44,'Kabupaten Sukabumi','KCD V',1,'2026-01-18 15:05:26','2026-01-27 23:39:38'),(45,'Kabupaten Sumedang','KCD VIII',1,'2026-01-18 15:05:26','2026-01-27 23:39:58'),(46,'Kabupaten Tasikmalaya','KCD XII',1,'2026-01-18 15:05:26','2026-01-18 15:24:35'),(47,'Kota Bandung','KCD VII',1,'2026-01-18 15:05:26','2026-01-27 23:41:39'),(48,'Kota Banjar','KCD XIII',1,'2026-01-18 15:05:26','2026-01-18 15:11:49'),(49,'Kota Bekasi','KCD III',1,'2026-01-18 15:05:26','2026-01-27 23:42:12'),(50,'Kota Bogor','KCD II',1,'2026-01-18 15:05:26','2026-01-27 23:44:22'),(51,'Kota Cimahi','KCD VII',1,'2026-01-18 15:05:26','2026-01-27 23:44:44'),(52,'Kota Cirebon','KCD IX',1,'2026-01-18 15:05:26','2026-01-27 23:45:06'),(53,'Kota Depok','KCD II',1,'2026-01-18 15:05:26','2026-01-27 23:45:50'),(54,'Kota Sukabumi','KCD V',1,'2026-01-18 15:05:26','2026-01-27 23:46:06'),(55,'Kota Tasikmalaya','KCD XII',1,'2026-01-18 15:05:26','2026-01-27 23:46:23');

--
-- Table structure for table `kcds`
--

CREATE TABLE `kcds` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `code` varchar(10) NOT NULL,
  `address` text DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `head_name` varchar(100) DEFAULT NULL,
  `head_nip` varchar(20) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `kcds_code_unique` (`code`),
  KEY `kcds_name_index` (`name`),
  KEY `kcds_is_active_index` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `kcds`
--

INSERT INTO `kcds` VALUES (14,'KCD XIII','KCD XIII','Ciamis','909090','Dwi','12121313131313131',1,'2026-01-18 14:55:09','2026-01-18 15:02:41'),(15,'KCD XII','KCD XII','TAsik','009090090','Kepala KCD 12','198306152102801280',1,'2026-01-18 15:09:25','2026-01-18 15:09:25'),(16,'KCD I','KCD I','alamat KCD I','0900909090','Kepala KCD I','989898989898989',1,'2026-01-24 21:50:36','2026-01-24 21:50:36'),(17,'KCD II','KCD II','Bogor - Depok',NULL,NULL,NULL,1,'2026-01-27 18:43:55','2026-01-27 18:43:55'),(18,'KCD III','KCD III','Kota dan Kab. bekas',NULL,NULL,NULL,1,'2026-01-27 18:44:36','2026-01-27 18:44:54'),(19,'KCD IV','KCD IV','Purwakarta  Subang dan karawang',NULL,NULL,NULL,1,'2026-01-27 18:46:43','2026-01-27 18:46:43'),(20,'KCD V','KCD V','Kota Sukabumi - Kab. Sukabumi',NULL,NULL,NULL,1,'2026-01-27 21:52:00','2026-01-27 21:52:00'),(21,'KCD VI','KCD VI','Kab. Cianjur - KBB',NULL,NULL,NULL,1,'2026-01-27 21:52:56','2026-01-27 21:52:56'),(22,'KCD VII','KCD VII','Kota Bandung - Kota Cimahi',NULL,NULL,NULL,1,'2026-01-27 21:54:05','2026-01-27 21:54:05'),(23,'KCD VIII','KCD VIII','Kab. Sumedang - Kab Bandung',NULL,NULL,NULL,1,'2026-01-27 21:55:07','2026-01-27 21:55:07'),(24,'KCD IX','KCD IX','Kab. Majalengka - Kab. Indramayu',NULL,NULL,NULL,1,'2026-01-27 21:56:49','2026-01-27 21:56:49'),(25,'KCD X','KCD X','Kota Cirebon  Kabupaten Cirebon  Kabupaten Kuningan',NULL,NULL,NULL,1,'2026-01-27 21:57:18','2026-01-27 21:57:18'),(26,'KCD XI','KCD XI','Kabupaten Garut',NULL,NULL,NULL,1,'2026-01-27 21:57:37','2026-01-27 21:57:37');

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

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

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

INSERT INTO `migrations` VALUES (1,'0001_01_01_000000_create_roles_table',1),(2,'0001_01_01_000000_create_users_table',1),(3,'0001_01_01_000001_create_cache_table',1),(4,'0001_01_01_000002_create_jobs_table',1),(5,'2025_10_22_223922_create_kcds_table',1),(6,'2025_10_22_223923_create_schools_table',1),(7,'2025_10_22_223923_create_supervisor_kcd_assignments_table',1),(8,'2025_10_22_223924_create_supervisor_school_assignments_table',1),(9,'2025_10_22_223934_create_competencies_table',1),(10,'2025_10_22_223934_create_sptjm_reports_table',1),(11,'2025_10_22_223935_create_evaluation_forms_table',1),(12,'2025_10_22_223935_create_form_questions_table',1),(13,'2025_10_22_223936_create_form_responses_table',1),(14,'2025_10_22_223936_create_question_competency_tags_table',1),(15,'2025_01_18_000000_create_settings_table',2),(16,'2026_01_18_000001_add_fields_to_users_table',3),(17,'2026_01_18_000002_create_kab_kota_table',4),(18,'2026_01_18_220103_add_head_nip_to_kcds_table',5),(19,'2026_01_18_221155_add_kabkota_and_principal_nip_to_schools_table',6),(20,'2026_01_18_223738_create_employees_table',7),(21,'2026_01_18_224006_create_employee_assignments_table',8),(22,'2026_01_19_001233_add_kab_kota_id_to_employee_assignments_table',9),(23,'2026_01_19_100002_add_kcd_id_to_users_table',10),(24,'2026_01_19_100003_add_employee_id_to_users_table',11),(25,'2026_01_26_143218_add_uld_and_principal_phone_to_schools_table',12),(26,'2026_01_26_150250_add_profile_lock_to_schools_table',13),(28,'2026_01_26_151905_create_academic_years_table',14),(29,'2026_01_29_113011_create_daya_tampung_table',15),(30,'2025_01_30_000001_create_disability_types_table',16),(31,'2025_01_30_000002_create_students_table',16),(32,'2026_01_30_142352_add_photo_to_students_table',17),(33,'2026_01_30_150000_create_psaj_participants_table',18),(34,'2026_02_01_000001_add_status_to_psaj_participants_table',19),(35,'2026_02_04_000001_create_uld_locations_table',20),(36,'2026_02_05_022951_create_announcements_table',21),(37,'2026_02_05_052623_add_new_fields_to_students_table',22),(38,'2026_02_05_054541_add_jenjang_to_students_table',23),(39,'2026_02_05_055512_make_nisn_nullable_in_students_table',24),(40,'2026_02_05_070346_add_ijazah_path_to_students_table',25);

--
-- Table structure for table `psaj_participants`
--

CREATE TABLE `psaj_participants` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) NOT NULL,
  `nik` varchar(16) NOT NULL,
  `nisn` varchar(10) NOT NULL,
  `nis` varchar(255) DEFAULT NULL,
  `kelas` enum('VI','IX','XII') NOT NULL,
  `tempat_lahir` varchar(255) NOT NULL,
  `tanggal_lahir` date NOT NULL,
  `nama_ibu` varchar(255) NOT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `disability_type_id` bigint(20) unsigned NOT NULL,
  `school_id` bigint(20) unsigned NOT NULL,
  `jenjang` enum('SDLB','SMPLB','SMALB') NOT NULL,
  `no_peserta` varchar(255) DEFAULT NULL,
  `status` enum('draft','final') NOT NULL DEFAULT 'draft',
  `is_locked` tinyint(1) NOT NULL DEFAULT 0,
  `submitted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `psaj_participants_nisn_unique` (`nisn`),
  UNIQUE KEY `psaj_participants_no_peserta_unique` (`no_peserta`),
  KEY `psaj_participants_disability_type_id_foreign` (`disability_type_id`),
  KEY `psaj_participants_school_id_foreign` (`school_id`),
  CONSTRAINT `psaj_participants_disability_type_id_foreign` FOREIGN KEY (`disability_type_id`) REFERENCES `disability_types` (`id`),
  CONSTRAINT `psaj_participants_school_id_foreign` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `psaj_participants`
--

INSERT INTO `psaj_participants` VALUES (2,'Nama aku','1872178271827182','1212121212','121212121212','VI','Banjar','1211-12-12','Nama Ibu','psaj_photos/1770182206_1212121212.png',2,2,'SDLB','B-VI-12121212-2026-0001','draft',0,NULL,'2026-02-03 22:16:47','2026-02-03 22:16:47');

--
-- Table structure for table `question_competency_tags`
--

CREATE TABLE `question_competency_tags` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `question_id` bigint(20) unsigned NOT NULL,
  `competency_id` bigint(20) unsigned NOT NULL,
  `weight` int(11) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `question_competency_tags_question_id_competency_id_unique` (`question_id`,`competency_id`),
  KEY `question_competency_tags_competency_id_index` (`competency_id`),
  CONSTRAINT `question_competency_tags_competency_id_foreign` FOREIGN KEY (`competency_id`) REFERENCES `competencies` (`id`) ON DELETE CASCADE,
  CONSTRAINT `question_competency_tags_question_id_foreign` FOREIGN KEY (`question_id`) REFERENCES `form_questions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `question_competency_tags`
--


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

CREATE TABLE `roles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `slug` varchar(50) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_name_unique` (`name`),
  UNIQUE KEY `roles_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` VALUES (1,'Superadmin','superadmin','Super Administrator dengan akses penuh ke sistem','2025-10-22 16:31:12','2025-10-22 16:31:12'),(2,'Admin Dinas','admin_dinas','Administrator tingkat Dinas Pendidikan','2025-10-22 16:31:12','2025-10-22 16:31:12'),(3,'Admin KCD','admin_kcd','Administrator tingkat Kantor Cabang Dinas','2025-10-22 16:31:12','2025-10-22 16:31:12'),(4,'Pengawas','pengawas','Pengawas Sekolah','2025-10-22 16:31:12','2025-10-22 16:31:12'),(5,'Admin Sekolah','admin_sekolah','Administrator Sekolah','2025-10-22 16:31:12','2025-10-22 16:31:12'),(6,'Guru','guru','Guru/Tenaga Pendidik','2025-10-22 16:31:12','2025-10-22 16:31:12');

--
-- Table structure for table `schools`
--

CREATE TABLE `schools` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `kcd_id` bigint(20) unsigned NOT NULL,
  `kab_kota_id` bigint(20) unsigned DEFAULT NULL,
  `npsn` varchar(20) NOT NULL,
  `name` varchar(200) NOT NULL,
  `level` enum('PAUD','SD','SMP','SMA','SMK','SLB') NOT NULL,
  `status` enum('Negeri','Swasta') NOT NULL,
  `address` text DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `principal_name` varchar(100) DEFAULT NULL,
  `principal_nip` varchar(20) DEFAULT NULL,
  `principal_phone` varchar(20) DEFAULT NULL,
  `has_uld` tinyint(1) NOT NULL DEFAULT 0,
  `uld_count` int(10) unsigned DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `profile_locked` tinyint(1) NOT NULL DEFAULT 0,
  `profile_updated_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `schools_npsn_unique` (`npsn`),
  KEY `schools_kcd_id_is_active_index` (`kcd_id`,`is_active`),
  KEY `schools_level_status_index` (`level`,`status`),
  KEY `schools_name_index` (`name`),
  KEY `schools_level_index` (`level`),
  KEY `schools_status_index` (`status`),
  KEY `schools_is_active_index` (`is_active`),
  KEY `schools_kab_kota_id_foreign` (`kab_kota_id`),
  CONSTRAINT `schools_kab_kota_id_foreign` FOREIGN KEY (`kab_kota_id`) REFERENCES `kab_kota` (`id`),
  CONSTRAINT `schools_kcd_id_foreign` FOREIGN KEY (`kcd_id`) REFERENCES `kcds` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `schools`
--

INSERT INTO `schools` VALUES (1,14,41,'20258272','SLBN WIDI ASIH','SLB','Negeri','Bjong','9090909090','slbas@widiasih.sch.id','Muklis, M.Pd','198306152015031009',NULL,0,NULL,1,0,NULL,'2026-01-18 15:25:36','2026-01-25 07:05:23'),(2,15,46,'12121212','Nama Sekolah di SLB','SLB','Negeri','sasa','909090909','email@gmail.com','Dr. Athaya Kholif, M.Pd','12121212',NULL,1,2,1,1,'2026-02-03 17:35:30','2026-01-18 19:39:45','2026-02-03 17:35:30'),(3,15,46,'22222222','Sekolah Swasta','SLB','Swasta','klklkl','0','slbs@gmail.com','KS Swasta','-',NULL,0,NULL,1,0,NULL,'2026-01-24 04:20:56','2026-01-24 04:20:56'),(4,14,41,'88882222','SLB Bina Kasih','SLB','Swasta','Jalan Ke hatimu','08080808102','enamnma@gmail.com','Nama Kepala Sekolah','198306122015031001','0909090',1,4,1,1,'2026-01-26 08:10:45','2026-01-26 07:53:59','2026-01-26 08:10:45'),(5,15,46,'33331111','SLB Lanjutan','SLB','Negeri','KOta tasih aja','0800808080','email@mail.com','Kepala Sekolahnya','898982919281928198','8989898989',1,3,1,0,NULL,'2026-01-27 14:54:49','2026-01-27 14:54:49'),(6,15,46,'33332222','Nama sSekolah','SLB','Negeri','sasa','090909676','alsja@gmail.com','Nama KS','12345121213131','0909090',1,3,1,1,'2026-01-27 15:06:29','2026-01-27 15:00:52','2026-01-27 15:06:29');

--
-- 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,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `sessions` VALUES ('kXuaiGGxoQHV0bz3DvLZnjvAumHkZdtIyMKjfWOD',5,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36','YTo0OntzOjY6Il90b2tlbiI7czo0MDoiRXhOQTN4TzdJWDhyWUR2b2VjeldVa3NhdEtWaGpkeXJYZUl5OGJuViI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NTk6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9hZG1pbi1zZWtvbGFoL211cmlkLWJhcnUvZGF5YS10YW1wdW5nIjt9czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6NTt9',1770295484),('yfaIFFA65bAbkVKntkm4zhQE8U1VIWjaj40gIWcT',2,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36','YTo0OntzOjY6Il90b2tlbiI7czo0MDoiazRXUFJDSThma1pvTHhBUWx6R0NLMzJldk9hU0NCS3J4OHVQRkVlUCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzE6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9kYXNoYm9hcmQiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToyO30=',1770296665);

--
-- Table structure for table `sptjm_reports`
--

CREATE TABLE `sptjm_reports` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `school_id` bigint(20) unsigned NOT NULL,
  `submitted_by` bigint(20) unsigned NOT NULL,
  `verified_by` bigint(20) unsigned DEFAULT NULL,
  `report_period` varchar(50) NOT NULL,
  `student_count` int(11) NOT NULL,
  `sptjm_file_path` varchar(255) NOT NULL,
  `status` enum('draft','submitted','verified','rejected') NOT NULL DEFAULT 'draft',
  `rejection_notes` text DEFAULT NULL,
  `submitted_at` timestamp NULL DEFAULT NULL,
  `verified_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sptjm_reports_submitted_by_foreign` (`submitted_by`),
  KEY `sptjm_reports_school_id_status_index` (`school_id`,`status`),
  KEY `sptjm_reports_verified_by_status_index` (`verified_by`,`status`),
  KEY `sptjm_reports_report_period_status_index` (`report_period`,`status`),
  KEY `sptjm_reports_status_index` (`status`),
  KEY `sptjm_reports_submitted_at_index` (`submitted_at`),
  CONSTRAINT `sptjm_reports_school_id_foreign` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE,
  CONSTRAINT `sptjm_reports_submitted_by_foreign` FOREIGN KEY (`submitted_by`) REFERENCES `users` (`id`),
  CONSTRAINT `sptjm_reports_verified_by_foreign` FOREIGN KEY (`verified_by`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sptjm_reports`
--


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

CREATE TABLE `students` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `school_id` bigint(20) unsigned NOT NULL,
  `disability_type_id` bigint(20) unsigned DEFAULT NULL,
  `nama` varchar(255) NOT NULL,
  `nik` varchar(16) NOT NULL,
  `nisn` varchar(10) DEFAULT NULL,
  `nis` varchar(20) NOT NULL,
  `kelas` enum('I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII') NOT NULL,
  `jenjang` enum('TKLB','SDLB','SMPLB','SMALB') DEFAULT NULL,
  `tempat_lahir` varchar(255) NOT NULL,
  `tanggal_lahir` date NOT NULL,
  `nama_ibu` varchar(255) NOT NULL,
  `tahun_lahir_ibu` int(11) DEFAULT NULL,
  `nama_ayah` varchar(100) DEFAULT NULL,
  `tahun_lahir_ayah` int(11) DEFAULT NULL,
  `jenis_kelamin` enum('L','P') DEFAULT NULL,
  `agama` varchar(20) DEFAULT NULL,
  `alamat` text DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `sekolah_asal` varchar(100) DEFAULT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `ijazah_path` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `students_nik_unique` (`nik`),
  UNIQUE KEY `students_nisn_unique` (`nisn`),
  KEY `students_school_id_index` (`school_id`),
  KEY `students_disability_type_id_index` (`disability_type_id`),
  KEY `students_school_id_nis_index` (`school_id`,`nis`),
  CONSTRAINT `students_disability_type_id_foreign` FOREIGN KEY (`disability_type_id`) REFERENCES `disability_types` (`id`) ON DELETE SET NULL,
  CONSTRAINT `students_school_id_foreign` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `students` VALUES (1,2,8,'asasas','1111111111111111',NULL,'2121212','I','TKLB','sas','2026-02-04','asas',NULL,'sas',NULL,'L','Islam','sasas','42424224',NULL,NULL,NULL,1,'2026-02-04 22:56:54','2026-02-04 22:56:54');

--
-- Table structure for table `supervisor_kcd_assignments`
--

CREATE TABLE `supervisor_kcd_assignments` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `kcd_id` bigint(20) unsigned NOT NULL,
  `assigned_by` bigint(20) unsigned NOT NULL,
  `assigned_date` date NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `supervisor_kcd_assignments_user_id_kcd_id_unique` (`user_id`,`kcd_id`),
  KEY `supervisor_kcd_assignments_assigned_by_foreign` (`assigned_by`),
  KEY `supervisor_kcd_assignments_kcd_id_is_active_index` (`kcd_id`,`is_active`),
  KEY `supervisor_kcd_assignments_user_id_is_active_index` (`user_id`,`is_active`),
  KEY `supervisor_kcd_assignments_is_active_index` (`is_active`),
  CONSTRAINT `supervisor_kcd_assignments_assigned_by_foreign` FOREIGN KEY (`assigned_by`) REFERENCES `users` (`id`),
  CONSTRAINT `supervisor_kcd_assignments_kcd_id_foreign` FOREIGN KEY (`kcd_id`) REFERENCES `kcds` (`id`) ON DELETE CASCADE,
  CONSTRAINT `supervisor_kcd_assignments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supervisor_kcd_assignments`
--


--
-- Table structure for table `supervisor_school_assignments`
--

CREATE TABLE `supervisor_school_assignments` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `school_id` bigint(20) unsigned NOT NULL,
  `kcd_id` bigint(20) unsigned NOT NULL,
  `assigned_by` bigint(20) unsigned NOT NULL,
  `assigned_date` date NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `supervisor_school_assignments_user_id_school_id_unique` (`user_id`,`school_id`),
  KEY `supervisor_school_assignments_assigned_by_foreign` (`assigned_by`),
  KEY `supervisor_school_assignments_school_id_is_active_index` (`school_id`,`is_active`),
  KEY `supervisor_school_assignments_user_id_is_active_index` (`user_id`,`is_active`),
  KEY `supervisor_school_assignments_kcd_id_is_active_index` (`kcd_id`,`is_active`),
  KEY `supervisor_school_assignments_is_active_index` (`is_active`),
  CONSTRAINT `supervisor_school_assignments_assigned_by_foreign` FOREIGN KEY (`assigned_by`) REFERENCES `users` (`id`),
  CONSTRAINT `supervisor_school_assignments_kcd_id_foreign` FOREIGN KEY (`kcd_id`) REFERENCES `kcds` (`id`),
  CONSTRAINT `supervisor_school_assignments_school_id_foreign` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE,
  CONSTRAINT `supervisor_school_assignments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supervisor_school_assignments`
--


--
-- Table structure for table `uld_locations`
--

CREATE TABLE `uld_locations` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `school_id` bigint(20) unsigned NOT NULL,
  `name` varchar(255) NOT NULL COMMENT 'Nama ULD',
  `address` text NOT NULL COMMENT 'Alamat ULD',
  `kecamatan` varchar(255) NOT NULL COMMENT 'Kecamatan lokasi ULD',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `uld_locations_school_id_foreign` (`school_id`),
  CONSTRAINT `uld_locations_school_id_foreign` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `uld_locations`
--

INSERT INTO `uld_locations` VALUES (1,2,'ULD PADAHERANG','Deadaj Padahaerang','Parigi','2026-02-03 17:35:30','2026-02-03 17:35:30'),(2,2,'sasas','asas','sasa','2026-02-03 17:35:30','2026-02-03 17:35:30');


