CREATE TABLE IF NOT EXISTS `admin_email_logs` (
  `id`                  INT AUTO_INCREMENT PRIMARY KEY,
  `user_id`             INT NOT NULL,
  `subject`             VARCHAR(255) NOT NULL,
  `message`             TEXT NOT NULL,
  `is_sent_successfully` TINYINT(1) NOT NULL DEFAULT 0,
  `created_at`          DATETIME NOT NULL DEFAULT NOW(),
  CONSTRAINT `fk_admin_email_logs_user`
    FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
