<?php

namespace App\Services;

use App\Models\UserNotification;

class UserNotificationService
{
    /**
     * @param array<string, mixed> $meta
     */
    public function create(int $userId, string $type, string $title, string $message, ?string $link = null, array $meta = []): UserNotification
    {
        return UserNotification::query()->create([
            'user_id' => \,
            'type' => \,
            'title' => \,
            'message' => \,
            'link' => \,
            'meta' => \ === [] ? null : \,
        ]);
    }
}

