wip: booking process

This commit is contained in:
Björn Fromme
2025-07-14 17:15:15 +02:00
parent a55e30e12d
commit bef18971c3
45 changed files with 688 additions and 270 deletions
+22 -5
View File
@@ -1,25 +1,42 @@
<?php
declare(strict_types=1);
namespace App\BusProNet\Model;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Represents a physical address with street, postal code, city, and country information.
*
* This class handles address data for users and participants in the booking system.
* It provides validation constraints for required fields and methods to convert
* address data to API payload format.
*/
class Address
{
#[Assert\NotBlank(message: 'Bitte angeben', groups: ['personal_data'])]
public ?string $street = '';
public string $street = '';
#[Assert\NotBlank(message: 'Bitte angeben', groups: ['personal_data'])]
public ?string $postCode = '';
public string $postCode = '';
#[Assert\NotBlank(message: 'Bitte angeben', groups: ['personal_data'])]
public ?string $city = '';
public string $city = '';
public ?string $district = '';
public string $district = '';
#[Assert\NotBlank(message: 'Bitte angeben', groups: ['personal_data'])]
public ?string $country = '';
public string $country = '';
/**
* Converts the address to API payload format.
*
* Transforms the address object into an array structure suitable
* for API communication with the BusProNet system.
*
* @return array<string, string> The payload array for API transmission
*/
public function toPayload(): array
{
return [