<?php

namespace App\Commands\Transmittal;

use App\Commands\Command;
use App\Models\File;
use Illuminate\Support\Facades\DB;
use function PHPUnit\Framework\callback;

class StoreFileCommand implements Command
{

    public function execute(array $data): mixed
    {
        return DB::transaction(
            callback: fn () => File::query()->create($data),
            attempts: 2
        );
    }
}
