Files
famous-ly4-ev/app-modules/booking/src/Data/CreateBookingData.php
T
Nyan Lin Paing fa908cdcaf
PHP Tests / php-tests (push) Has been cancelled
add notes/remark and refactor round-trip
2026-08-22 21:43:41 +07:00

39 lines
1.5 KiB
PHP

<?php
namespace Modules\Booking\Data;
use Modules\Booking\Enums\BookingChannel;
readonly class CreateBookingData
{
/**
* @param list<VehicleSelectionData> $selections One or more Vehicle Option
* selections (e.g. front_seat + back_seat) — domain.md §2.
* @param list<VehicleSelectionData>|null $returnSelections Same shape as $selections,
* priced independently against $returnEvRouteId. Presence of
* $returnEvRouteId is the round-trip signal (domain.md §2b).
*/
public function __construct(
public int $evRouteId,
public int $departureTimeSlotId,
public string $travelDate,
public array $selections,
public string $passengerName,
public string $passengerPhone,
public string $pickupAddress,
public string $dropoffAddress,
public BookingChannel $createdByChannel,
public ?int $userId = null,
public ?string $openid = null,
public ?string $notes = null,
public ?float $pickupLat = null,
public ?float $pickupLng = null,
public ?float $dropoffLat = null,
public ?float $dropoffLng = null,
public ?int $returnEvRouteId = null,
public ?int $returnDepartureTimeSlotId = null,
public ?string $returnTravelDate = null,
public ?array $returnSelections = null,
) {}
}