Files
myep/src/Model/AccommodationBookingAdditionalServiceItem.php
T

30 lines
666 B
PHP

<?php
declare(strict_types=1);
namespace App\Model;
use Symfony\Component\Serializer\Attribute\Groups;
final readonly class AccommodationBookingAdditionalServiceItem
{
#[Groups(['api:single'])]
public string $label;
#[Groups(['api:single'])]
public int $price;
#[Groups(['api:single'])]
public string $type;
/**
* @param array{label?: string, price?: int, type?: string, originalServiceId?: int|null} $snapshot
*/
public function __construct(array $snapshot)
{
$this->label = $snapshot['label'] ?? '';
$this->price = $snapshot['price'] ?? 0;
$this->type = $snapshot['type'] ?? '';
}
}