<?php
function addNotification(PDO $pdo, string $userId, string $title, string $message, string $matchInfo = null, string $userGuess = null, string $matchResult = null): void {
    $stmt = $pdo->prepare("
        INSERT INTO notifications (user_id, title, message, match_info, user_guess, match_result, created_at)
        VALUES (?, ?, ?, ?, ?, ?, NOW())
    ");
    $stmt->execute([
        $userId,
        $title,
        $message,
        $matchInfo,
        $userGuess,
        $matchResult
    ]);
}