50 lines
1.5 KiB
PHP
50 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\BusProNet\Model;
|
|
|
|
use Symfony\Component\Serializer\Attribute\Groups;
|
|
|
|
/**
|
|
* Represents a hotel with location and contact information.
|
|
*
|
|
* This class handles hotel data including identification, location details,
|
|
* and contact information. It provides serialization groups for API responses
|
|
* in travel and booking contexts.
|
|
*/
|
|
class Hotel
|
|
{
|
|
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
|
public ?int $id = null;
|
|
|
|
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
|
public ?string $code = null;
|
|
|
|
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
|
public ?string $name = null;
|
|
|
|
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
|
public ?string $city = null;
|
|
|
|
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
|
public ?string $street = null;
|
|
|
|
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
|
public ?string $phone = null;
|
|
|
|
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
|
public ?string $country = null;
|
|
|
|
/**
|
|
* Raw `kostenstelle`, deliberately a string: coverage is thin and some hotels carry a
|
|
* space-separated list such as "84 85", so it is an opaque label, not a number.
|
|
*/
|
|
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
|
public ?string $costUnit = null;
|
|
|
|
/** {@see \App\BusProNet\Utility\CountryCodeMapper} — lowercase ISO-2, null when unmappable. */
|
|
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
|
public ?string $countryCode = null;
|
|
}
|