34 lines
1.2 KiB
PHP
34 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Model;
|
|
|
|
/**
|
|
* A whole travel-date x hotel export plus the counters that describe how it was built.
|
|
*
|
|
* Held in the bpn.cache pool as one unit and paginated in the controller, which is what
|
|
* makes the counters identical on every page: they describe the export, not the page, so a
|
|
* consumer can read them once and abort the page walk on the first response.
|
|
*
|
|
* @see \App\Service\TravelExportBuilder
|
|
* @see \App\Service\ProductExportBuilder
|
|
*/
|
|
final readonly class Export
|
|
{
|
|
/**
|
|
* @param list<array<string, mixed>> $rows one row per (travel, hotel) pair
|
|
* @param int $skipped (travel, hotel) pairs dropped as unusable
|
|
* @param int $pickupsWithoutMasterData distinct pickup ids absent from zustiege.xml
|
|
* @param \DateTimeImmutable|null $sourceGeneratedAt the uebertragung.info timestamp of the export read, null if unknown
|
|
*/
|
|
public function __construct(
|
|
public array $rows,
|
|
public int $skipped,
|
|
public int $pickupsWithoutMasterData,
|
|
public \DateTimeImmutable $generatedAt,
|
|
public ?\DateTimeImmutable $sourceGeneratedAt = null,
|
|
) {
|
|
}
|
|
}
|