CREATE TABLE IF NOT EXISTS `tasks` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `candidate_id` INT,
    `task_name` VARCHAR(255) NOT NULL,
    `description` TEXT,
    `due_date` DATE,
    `status` VARCHAR(50) DEFAULT 'To Do',
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (`candidate_id`) REFERENCES `candidates`(`id`) ON DELETE CASCADE
);
