52 lines
1.2 KiB
PHP
52 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Model;
|
|
|
|
use App\Entity\Groups\AccommodationBooking;
|
|
use Symfony\Component\Serializer\Attribute\Groups;
|
|
|
|
final readonly class AccommodationBookingPersonalData
|
|
{
|
|
#[Groups(['api:single'])]
|
|
public ?string $salutation;
|
|
|
|
#[Groups(['api:single'])]
|
|
public ?string $firstName;
|
|
|
|
#[Groups(['api:single'])]
|
|
public ?string $lastName;
|
|
|
|
#[Groups(['api:single'])]
|
|
public ?string $email;
|
|
|
|
#[Groups(['api:single'])]
|
|
public ?string $phone;
|
|
|
|
#[Groups(['api:single'])]
|
|
public ?string $street;
|
|
|
|
#[Groups(['api:single'])]
|
|
public ?string $zip;
|
|
|
|
#[Groups(['api:single'])]
|
|
public ?string $city;
|
|
|
|
#[Groups(['api:single'])]
|
|
public ?string $remarks;
|
|
|
|
public function __construct(AccommodationBooking $booking)
|
|
{
|
|
$this->salutation = $booking->getSalutation();
|
|
$this->firstName = $booking->getFirstName();
|
|
$this->lastName = $booking->getLastName();
|
|
$this->email = $booking->getEmail();
|
|
$this->phone = $booking->getPhone();
|
|
$this->street = $booking->getStreet();
|
|
$this->zip = $booking->getZip();
|
|
$this->city = $booking->getCity();
|
|
$this->remarks = $booking->getRemarks();
|
|
}
|
|
}
|