--
-- Create table for schedule (jadwal)
--
CREATE TABLE IF NOT EXISTS `jadwal` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `id_kelas` INT NOT NULL,
    `id_guru` INT NOT NULL,
    `hari` VARCHAR(10) NOT NULL,
    `jam_mulai` TIME NOT NULL,
    `jam_selesai` TIME NOT NULL,
    `mata_pelajaran` VARCHAR(100) NOT NULL,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    FOREIGN KEY (`id_kelas`) REFERENCES `kelas`(`id`) ON DELETE CASCADE,
    FOREIGN KEY (`id_guru`) REFERENCES `guru`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
