2026-09-30 10:24:52 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-11-10 14:28:00 +01:00
|
|
|
namespace App\Cqs\Actions\Basket;
|
2026-09-30 10:24:52 +02:00
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|