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

START TRANSACTION;



--
-- Database: `jisc`
--

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

--
-- Table structure for table `anecdote`
--

CREATE TABLE `anecdote` (
  `id` int NOT NULL,
  `pengirim_tipe` enum('Guru','Perpustakaan','Sistem','Admin') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `pengirim_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pengirim_nama` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipe_pesan` enum('Informasi','Peringatan','Tugas','Prestasi') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Informasi',
  `target_jenis` enum('Semua','Perorangan','Kelas') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Semua',
  `target_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `isi_pesan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal_kirim` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `status_dibaca` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `anecdote`
--

INSERT INTO `anecdote` (`id`, `pengirim_tipe`, `pengirim_id`, `pengirim_nama`, `tipe_pesan`, `target_jenis`, `target_id`, `isi_pesan`, `tanggal_kirim`, `status_dibaca`) VALUES
(1, 'Guru', '0987654321234567', 'siti anisa', 'Peringatan', 'Perorangan', '1234567890', 'test', '2026-08-01 18:10:46', 0),
(2, 'Guru', '0987654321234567', 'siti anisa', 'Prestasi', 'Perorangan', '1234567890', 'test2', '2026-08-01 19:04:58', 0),
(3, 'Guru', '0987654321234567', 'siti anisa', 'Peringatan', 'Perorangan', '1234567890', 'test3', '2026-08-01 19:48:20', 0),
(4, 'Admin', 'perpus_admin', 'Admin Perpustakaan', 'Informasi', 'Perorangan', '1234567895', '📚 Anda telah meminjam buku dari Perpustakaan. Mohon kembalikan paling lambat tanggal 10/8/2026.', '2026-08-03 09:52:58', 0),
(5, 'Admin', 'perpus', 'Perpustakaan', 'Peringatan', 'Perorangan', '1234567895', '📚 Jangan lupa! Batas pengembalian buku \"test\" adalah 7 hari lagi.', '2026-08-03 09:53:04', 0),
(6, 'Admin', 'perpus_admin', 'Admin Perpustakaan', 'Informasi', 'Perorangan', '1234567890', '📚 Anda telah meminjam buku dari Perpustakaan. Mohon kembalikan paling lambat tanggal 10/8/2026.', '2026-08-03 09:53:13', 0),
(7, 'Admin', 'perpus', 'Perpustakaan', 'Peringatan', 'Perorangan', '1234567890', '📚 Jangan lupa! Batas pengembalian buku \"test\" adalah 7 hari lagi.', '2026-08-03 09:53:16', 0);

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

--
-- Table structure for table `elearning_aktivitas`
--

CREATE TABLE `elearning_aktivitas` (
  `id` int NOT NULL,
  `nuptk_guru` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nama` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `tanggal` date DEFAULT NULL,
  `badge` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `warna_icon` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `elearning_balasan_diskusi`
--

CREATE TABLE `elearning_balasan_diskusi` (
  `id` int NOT NULL,
  `id_diskusi` int NOT NULL,
  `isi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `pembalas_tipe` enum('Guru','Siswa') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Guru',
  `pembalas_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `pembalas_nama` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `waktu` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `elearning_diskusi`
--

CREATE TABLE `elearning_diskusi` (
  `id` int NOT NULL,
  `id_pertemuan` int NOT NULL,
  `judul` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `isi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `pembuat_tipe` enum('Guru','Siswa') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Guru',
  `pembuat_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `pembuat_nama` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `waktu` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `elearning_jawaban_quiz`
--

CREATE TABLE `elearning_jawaban_quiz` (
  `id` int NOT NULL,
  `id_quiz` int NOT NULL,
  `nis_siswa` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `teks_jawaban` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `file_jawaban_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `waktu_kirim` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `balasan_nilai_guru` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `elearning_modul`
--

CREATE TABLE `elearning_modul` (
  `id` int NOT NULL,
  `id_pertemuan` int NOT NULL,
  `judul` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `file_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `elearning_pertemuan`
--

CREATE TABLE `elearning_pertemuan` (
  `id` int NOT NULL,
  `id_aktivitas` int NOT NULL,
  `judul` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `waktu` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `elearning_quiz`
--

CREATE TABLE `elearning_quiz` (
  `id` int NOT NULL,
  `id_pertemuan` int NOT NULL,
  `judul` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tipe` enum('Quiz','Tugas') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Quiz',
  `deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `soal` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `deadline` datetime DEFAULT NULL,
  `file_lampiran_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `elearning_video`
--

CREATE TABLE `elearning_video` (
  `id` int NOT NULL,
  `id_pertemuan` int NOT NULL,
  `judul` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `link_video` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `durasi` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `guru`
--

CREATE TABLE `guru` (
  `nuptk` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nama_lengkap` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `mapel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '-',
  `email` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '-',
  `jabatan` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Tenaga Pendidik',
  `tanggal_bergabung` date DEFAULT NULL,
  `foto_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `guru`
--

INSERT INTO `guru` (`nuptk`, `nama_lengkap`, `mapel`, `email`, `jabatan`, `tanggal_bergabung`, `foto_url`, `created_at`) VALUES
('0987654321234560', 'bagas subianto', 'mewarnai', 'sud@gmail.com', 'Tenaga Pendidik', '2026-01-01', '', '2026-08-03 08:43:28'),
('0987654321234567', 'siti anisa', 'indonesia', 'siti@gmail.com', 'Tenaga Pendidik', NULL, NULL, '2026-07-31 03:44:11'),
('1234567890654321', 'asep surasep', '', 'asep@gmail.com', 'Tenaga Pendidik', '2026-08-03', '', '2026-08-03 08:56:21'),
('9039761662230303', 'Dina Nurzanah Sari', 'mewarnai', 'deechanstore', 'Tenaga Pendidik', '2026-08-03', '', '2026-08-03 05:17:01');

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

--
-- Table structure for table `info_berita`
--

CREATE TABLE `info_berita` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `judul` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `konten` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `gambar_url` longtext COLLATE utf8mb4_unicode_ci,
  `tanggal` date DEFAULT NULL,
  `status` enum('Published','Draft') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Draft',
  `link_luar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `teks_tombol_link` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `jumlah_dilihat` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `info_galeri_album`
--

CREATE TABLE `info_galeri_album` (
  `id` int NOT NULL,
  `judul` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `kategori` enum('Kegiatan','Fasilitas','Prestasi') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Kegiatan',
  `deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `tanggal_dibuat` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `info_galeri_item`
--

CREATE TABLE `info_galeri_item` (
  `id` int NOT NULL,
  `id_album` int NOT NULL,
  `tipe` enum('image','video') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'image',
  `file_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `info_kontak`
--

CREATE TABLE `info_kontak` (
  `id` int NOT NULL DEFAULT '1',
  `alamat` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `telepon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `jam_operasional` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `info_kontak`
--

INSERT INTO `info_kontak` (`id`, `alamat`, `telepon`, `email`, `jam_operasional`, `updated_at`) VALUES
(1, 'Jl. Pendidikan No. 123, Kota', '081234567890', 'info@jisc.com', 'Senin-Jumat: 07:00 - 16:00', '2026-08-01 13:35:51');

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

--
-- Table structure for table `info_pesan`
--

CREATE TABLE `info_pesan` (
  `id` int NOT NULL,
  `nama` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pesan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('Baru','Dibaca') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Baru',
  `tanggal` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `info_profil`
--

CREATE TABLE `info_profil` (
  `id` int NOT NULL DEFAULT '1',
  `sejarah` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `gambar_sejarah` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `visi` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `misi` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `npsn` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tahun_berdiri` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `akreditasi` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nilai_akreditasi` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status_sekolah` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `info_profil`
--

INSERT INTO `info_profil` (`id`, `sejarah`, `gambar_sejarah`, `visi`, `misi`, `npsn`, `tahun_berdiri`, `akreditasi`, `nilai_akreditasi`, `status_sekolah`, `updated_at`) VALUES
(1, 'Sejarah sekolah JISC...', NULL, 'Visi sekolah JISC...', 'Misi sekolah JISC...', '12345678', '2000', 'A', '95', 'Swasta', '2026-08-01 13:35:51');

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

--
-- Table structure for table `info_slider`
--

CREATE TABLE `info_slider` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `judul` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gambar_url` longtext COLLATE utf8mb4_unicode_ci,
  `urutan` int DEFAULT '0',
  `status` enum('aktif','nonaktif') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'aktif',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `info_sosmed`
--

CREATE TABLE `info_sosmed` (
  `id` int NOT NULL,
  `platform` enum('facebook','instagram','youtube','twitter') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `inventaris_barang`
--

CREATE TABLE `inventaris_barang` (
  `id` int NOT NULL,
  `id_ruangan` int NOT NULL,
  `kode_barang` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nama_barang` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `kondisi` enum('Baik','Rusak Ringan','Rusak Berat') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Baik',
  `harga` decimal(15,2) DEFAULT '0.00',
  `tahun_perolehan` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `jadwal_mengajar`
--

CREATE TABLE `jadwal_mengajar` (
  `id` int NOT NULL,
  `nuptk_guru` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `id_kelas` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `hari` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `jam` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `mapel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `ruang` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tahun_ajaran` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '2024/2025',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `jadwal_mengajar`
--

INSERT INTO `jadwal_mengajar` (`id`, `nuptk_guru`, `id_kelas`, `hari`, `jam`, `mapel`, `ruang`, `tahun_ajaran`, `created_at`) VALUES
(1, '0987654321234567', 'KLS_1785489957668', 'Monday', '07:30-09:50', 'indonesia', '', '2024/2025', '2026-08-03 05:12:06'),
(2, '9039761662230303', 'KLS_1785745397762', 'Tuesday', '07:30-09:59', 'mewarnai', '', '2024/2025', '2026-08-03 08:25:50');

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

--
-- Table structure for table `kelas`
--

CREATE TABLE `kelas` (
  `id_kelas` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nama_kelas` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tingkat` enum('Nursery','TK A','TK B','K1','K2','K3') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'TK A',
  `nuptk_wali_kelas` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tahun_ajaran` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '2024/2025',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `kelas`
--

INSERT INTO `kelas` (`id_kelas`, `nama_kelas`, `tingkat`, `nuptk_wali_kelas`, `tahun_ajaran`, `created_at`) VALUES
('KLS_1785489957668', 'K1A', 'TK A', '0987654321234567', '2024/2025', '2026-07-31 09:25:57'),
('KLS_1785745397762', 'K1B', 'TK A', '9039761662230303', '2024/2025', '2026-08-03 08:23:17'),
('KLS_1785749612912', 'NURSERY', 'TK A', '0987654321234560', '2024/2025', '2026-08-03 09:33:32');

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

--
-- Table structure for table `laporan_kerusakan`
--

CREATE TABLE `laporan_kerusakan` (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nama_pelapor` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `jabatan_pelapor` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telp_pelapor` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email_pelapor` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `id_barang` int DEFAULT NULL,
  `nama_barang` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `kode_barang` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ruangan` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deskripsi_kerusakan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` enum('pending','proses','selesai','ditolak') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `catatan_admin` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `tanggal_lapor` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `laporan_kerusakan`
--

INSERT INTO `laporan_kerusakan` (`id`, `nama_pelapor`, `jabatan_pelapor`, `telp_pelapor`, `email_pelapor`, `id_barang`, `nama_barang`, `kode_barang`, `ruangan`, `deskripsi_kerusakan`, `status`, `catatan_admin`, `tanggal_lapor`, `created_at`) VALUES
('LPR_1785750257150', 'siti anisa', 'Guru', '24798149816', 'siti@gmail.com', NULL, 'printer', '001', 'Perpustakaan', 'test', 'pending', NULL, '2026-08-03', '2026-08-03 09:44:17');

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

--
-- Table structure for table `perpus_buku`
--

CREATE TABLE `perpus_buku` (
  `kode_buku` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `judul` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `kategori` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `penerbit` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sinopsis` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `stok_total` int DEFAULT '1',
  `stok_tersedia` int DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `perpus_buku`
--

INSERT INTO `perpus_buku` (`kode_buku`, `judul`, `kategori`, `penerbit`, `sinopsis`, `stok_total`, `stok_tersedia`, `created_at`) VALUES
('012', 'test', 'Cerita Rakyat', 'vsdv', 'test', 12, 10, '2026-08-03 08:59:04');

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

--
-- Table structure for table `perpus_peminjaman`
--

CREATE TABLE `perpus_peminjaman` (
  `id_transaksi` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nis_siswa` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `kode_buku` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tanggal_pinjam` date DEFAULT NULL,
  `batas_kembali` date DEFAULT NULL,
  `tanggal_kembali` date DEFAULT NULL,
  `status` enum('dipinjam','terlambat','dikembalikan') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'dipinjam',
  `denda` int DEFAULT '0',
  `kondisi_saat_kembali` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `perpus_peminjaman`
--

INSERT INTO `perpus_peminjaman` (`id_transaksi`, `nis_siswa`, `kode_buku`, `tanggal_pinjam`, `batas_kembali`, `tanggal_kembali`, `status`, `denda`, `kondisi_saat_kembali`, `created_at`) VALUES
('TRX-1785750778555', '1234567895', '012', '2026-08-03', '2026-08-10', NULL, 'dipinjam', 0, NULL, '2026-08-03 09:52:58'),
('TRX-1785750793320', '1234567890', '012', '2026-08-03', '2026-08-10', NULL, 'dipinjam', 0, NULL, '2026-08-03 09:53:13');

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

--
-- Table structure for table `perpus_pengaturan`
--

CREATE TABLE `perpus_pengaturan` (
  `id` int NOT NULL DEFAULT '1',
  `denda_per_hari` int DEFAULT '1000',
  `maks_pinjam` int DEFAULT '3'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `perpus_pengaturan`
--

INSERT INTO `perpus_pengaturan` (`id`, `denda_per_hari`, `maks_pinjam`) VALUES
(1, 1000, 3);

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

--
-- Table structure for table `prestasi`
--

CREATE TABLE `prestasi` (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `kategori` enum('Siswa','Guru','Sekolah') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Siswa',
  `id_penerima` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nama_penerima` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `kegiatan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `penghargaan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tingkat` enum('Sekolah','Kecamatan','Kota','Provinsi','Nasional','Internasional') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tanggal` date DEFAULT NULL,
  `file_bukti_url` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `prestasi`
--

INSERT INTO `prestasi` (`id`, `kategori`, `id_penerima`, `nama_penerima`, `kegiatan`, `penghargaan`, `tingkat`, `tanggal`, `file_bukti_url`, `created_at`) VALUES
('PRS_1785761647691', 'Siswa', NULL, 'eko setiawan', 'test', 'juara1', 'Sekolah', '2026-08-03', 'data:image/png;base64,[BLOB]', '2026-08-03 12:54:07');

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

--
