20 lines
388 B
PHP
20 lines
388 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Actions\Basket;
|
||
|
|
|
||
|
|
use App\Contracts\ActionInput;
|
||
|
|
use Domain\Models\ValueObjects\Entities\ProductId;
|
||
|
|
use Webmozart\Assert\Assert;
|
||
|
|
|
||
|
|
final readonly class AddToBasketInput implements ActionInput
|
||
|
|
{
|
||
|
|
public function __construct(
|
||
|
|
public ProductId $productId,
|
||
|
|
public int $qty,
|
||
|
|
) {
|
||
|
|
Assert::greaterThan($qty, 0);
|
||
|
|
}
|
||
|
|
}
|