-- ============================================================
-- Demo Class Requests Table
-- ============================================================
CREATE TABLE IF NOT EXISTS `demo_class_requests` (
    `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
    `student_name` VARCHAR(255) NOT NULL,
    `email` VARCHAR(255) NOT NULL,
    `contact` VARCHAR(20) NOT NULL,
    `batch` VARCHAR(100) DEFAULT NULL,
    `course_id` INT UNSIGNED DEFAULT NULL,
    `demo_date` DATE NOT NULL,
    `status` ENUM('pending','contacted','scheduled','completed','cancelled') NOT NULL DEFAULT 'pending',
    `admin_note` TEXT DEFAULT NULL,
    `is_read` TINYINT(1) NOT NULL DEFAULT 0,
    `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    KEY `idx_status` (`status`),
    KEY `idx_is_read` (`is_read`),
    KEY `idx_demo_date` (`demo_date`),
    KEY `idx_course_id` (`course_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
