<?php
/**
 * Ragreen - Notification helper
 * Types in use: order_confirmed, order_sold, listing_hidden, account_reactivated,
 * listing_expiry, pantry_expiry. Free-text type field (no enum) so new event
 * types can be added anywhere without a schema migration.
 */

function create_notification(PDO $pdo, int $userId, string $type, string $message): void
{
    $stmt = $pdo->prepare('INSERT INTO notifications (user_id, type, message) VALUES (?, ?, ?)');
    $stmt->execute([$userId, $type, $message]);
}
