File size: 961 Bytes
cf14c12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | <?php
declare(strict_types=1);
namespace Billing\Application\Commands;
use Billing\Application\CommandHandlers\CountPlansCommandHandler;
use Billing\Domain\ValueObjects\BillingCycle;
use Billing\Domain\ValueObjects\Status;
use Shared\Infrastructure\CommandBus\Attributes\Handler;
#[Handler(CountPlansCommandHandler::class)]
class CountPlansCommand
{
public ?Status $status = null;
public ?BillingCycle $billingCycle = null;
/** Search terms/query */
public ?string $query = null;
/**
* @param int $status
* @return CountPlansCommand
*/
public function setStatus(int $status): self
{
$this->status = Status::from($status);
return $this;
}
/**
* @param string $billingCycle
* @return CountPlansCommand
*/
public function setBillingCycle(string $billingCycle): self
{
$this->billingCycle = BillingCycle::from($billingCycle);
return $this;
}
}
|