20 lines
417 B
PHP
20 lines
417 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Cqs\Queries\Recipes;
|
||
|
|
|
||
|
|
use App\Contracts\QueryInput;
|
||
|
|
use Domain\Models\ValueObjects\Entities\ProductId;
|
||
|
|
use Webmozart\Assert\Assert;
|
||
|
|
|
||
|
|
final readonly class GetRelatedRecipesQueryInput implements QueryInput
|
||
|
|
{
|
||
|
|
public function __construct(
|
||
|
|
public ProductId $productId,
|
||
|
|
public int $limit = 10,
|
||
|
|
) {
|
||
|
|
Assert::greaterThan($this->limit, 0);
|
||
|
|
}
|
||
|
|
}
|