24 lines
552 B
PHP
24 lines
552 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Cqs\Actions\PickupExceptions;
|
||
|
|
|
||
|
|
use App\Contracts\ActionInput;
|
||
|
|
use App\Dto\PublicHolidayDto;
|
||
|
|
use Webmozart\Assert\Assert;
|
||
|
|
|
||
|
|
final readonly class UpsertShopsPickupExceptionsForYearInput implements ActionInput
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @param list<PublicHolidayDto> $holidays
|
||
|
|
*/
|
||
|
|
public function __construct(
|
||
|
|
public int $year,
|
||
|
|
public array $holidays,
|
||
|
|
) {
|
||
|
|
Assert::greaterThanEq($this->year, 2026);
|
||
|
|
Assert::allIsInstanceOf($this->holidays, PublicHolidayDto::class);
|
||
|
|
}
|
||
|
|
}
|