<?php

namespace App\Commands\Transmittal;

use App\Commands\Command;
use App\Models\Comment;
use Illuminate\Support\Facades\DB;

class StoreCommentCommand implements Command
{

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