'Y-m-d'])] public ?\DateTimeImmutable $dateFrom = null; #[Groups(['booking'])] #[Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'])] public ?\DateTimeImmutable $dateTo = null; #[Groups(['booking'])] public ?int $totalCount = null; #[Groups(['api:list', 'api:single', 'snapshot'])] public ?int $minPax = null; #[Groups(['api:list', 'api:single', 'snapshot'])] public ?int $maxPax = null; #[Groups(['api:list', 'api:single', 'snapshot'])] public ?int $nights = null; #[Groups(['api:list', 'api:single', 'snapshot'])] public ?string $status = null; #[Groups(['api:list', 'api:single', 'snapshot'])] public ?int $available = null; #[Groups(['booking'])] public ?string $board = null; #[Groups(['booking'])] public array $mapping = []; #[Groups(['api:list', 'api:single', 'snapshot'])] public ?float $price = null; #[Groups(['booking'])] public ?float $totalPrice = null; #[Groups(['booking'])] public array $individualPrice = []; /** * Determines the selection type of the room based on its label. * * @return string Either self::SELECTION_TYPE_BY_PAX or self::SELECTION_TYPE_BY_ROOM */ public function getSelectionType(): string { if (1 === preg_match('/bett/i', $this->label)) { return self::SELECTION_TYPE_BY_PAX; } return self::SELECTION_TYPE_BY_ROOM; } }