ldc-boutique-cnc-sable/app/Queries/Timeslots/GetAvailableTimeslotsQueryOutput.php
Jérémy Munsch ea2885115d
feat(timeslots): implement GetAvailableTimeslotsQuery and related classes
Added GetAvailableTimeslotsQuery, GetAvailableTimeslotsQueryInput, and GetAvailableTimeslotsQueryOutput
to handle fetching available timeslots for a shop, improving the structure and separation of concerns.
2026-10-27 09:58:37 +01:00

22 lines
547 B
PHP

<?php
declare(strict_types=1);
namespace App\Queries\Timeslots;
use Domain\Models\ValueObjects\PickupTimeSlot;
use Webmozart\Assert\Assert;
final readonly class GetAvailableTimeslotsQueryOutput
{
/** @param PickupTimeSlot[] $timeslotList */
public function __construct(
public array $timeslotList,
) {
Assert::allInArray(
$this->timeslotList,
fn ($value) => $value instanceof PickupTimeSlot,
'All elements of $timeslotList must be instances of PickupTimeSlot'
);
}
}