CREATE TABLE IF NOT EXISTS `blocked_terms` (
    `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `term` VARCHAR(120) NOT NULL,
    `severity` ENUM('low','medium','high') NOT NULL DEFAULT 'medium',
    `action` ENUM('flag','auto_pending','auto_reject') NOT NULL DEFAULT 'auto_pending',
    `active` TINYINT(1) NOT NULL DEFAULT 1,
    `notes` VARCHAR(255) NULL,
    `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    UNIQUE KEY `uniq_blocked_term` (`term`),
    KEY `idx_blocked_active` (`active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
