<?php

declare(strict_types=1);

namespace App\Repositories\Uploads;

use Illuminate\Support\Facades\DB;

final class ArtworkFileRepository
{
    public function upsert(int $artworkId, string $variant, string $path, string $mime, int $size): void
    {
        DB::table('artwork_files')->updateOrInsert(
            ['artwork_id' => $artworkId, 'variant' => $variant],
            ['path' => $path, 'mime' => $mime, 'size' => $size]
        );
    }
}
