fix: resync room selections with travel data before step 2

This commit is contained in:
fromme committed 2026-09-29 10:59:13 +02:00
1 parent be0e15b3d4
commit d0e7ba017c
5 files changed
+708 -1

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace App\Model;
/**
* A room selection the current travel data no longer supports in full.
*
* A room that disappeared altogether is the same case with nothing left to book, so it is reported
* as an adjustment down to zero rather than as a second kind of result.
*/
final readonly class RoomSelectionAdjustment
{
public function __construct(
public int $roomId,
public ?string $label,
public int $requestedQuantity,
public int $bookableQuantity,
) {
}
/**
* Whether the room is gone entirely rather than merely reduced.
*/
public function isDropped(): bool
{
return 0 === $this->bookableQuantity;
}
}