<?php

declare(strict_types=1);

namespace {{ tree.getFullNameSpaceOfFile(file, entity, action) }};

{% for dependency in dependencyzz %}
use {{ dependency }};{% endfor %}
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;

class {{ helper.getClassName(file, entity, action) }}
{
    /**
     * @param array<int, int> $Idzz
     * @return array<int, int>
     */
    function run(int $UserId, array $Idzz): array
    {
        $Result = {{ helper.getClassName(helper.findFile('Model'), entity, action) }}::query()
            ->where('UserId', $UserId)
            ->whereIn('Id', $Idzz)
            ->delete();

        event(new {{ action + entity.name }}Event($Idzz));

        return $Idzz;
    }
}
