Download src/Assistant/Application/Commands/CountAssistantsCommand.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 844 Bytes
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Assistant/Application/Commands/CountAssistantsCommand.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Assistant/Application/Commands/CountAssistantsCommand.php
-
curl -L -o CountAssistantsCommand.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Assistant/Application/Commands/CountAssistantsCommand.php
844 Bytes
| declare(strict_types=1); | |
| namespace Assistant\Application\Commands; | |
| use Assistant\Application\CommandHandlers\CountAssistantsCommandHandler; | |
| use Assistant\Domain\ValueObjects\Status; | |
| use Shared\Domain\ValueObjects\Id; | |
| use Shared\Infrastructure\CommandBus\Attributes\Handler; | |
| (CountAssistantsCommandHandler::class) | |
| class CountAssistantsCommand | |
| { | |
| public ?Status $status = null; | |
| /** @var null|array<Id> */ | |
| public ?array $ids = null; | |
| /** Search terms/query */ | |
| public ?string $query = null; | |
| public function setStatus(int $status): self | |
| { | |
| $this->status = Status::from($status); | |
| return $this; | |
| } | |
| public function setIds(string|Id ...$ids): void | |
| { | |
| $this->ids = array_map( | |
| fn($id) => is_string($id) ? new Id($id) : $id, | |
| $ids | |
| ); | |
| } | |
| } | |