feat: groups price calculator admin crud, booking/offer flow and api
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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'] ?? '';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user