mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
30 lines
725 B
PHP
30 lines
725 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\Search\DTO;
|
|
|
|
final readonly class SearchPage
|
|
{
|
|
/**
|
|
* @param list<int> $ids
|
|
* @param list<int|float|string> $lastSortValues
|
|
*/
|
|
public function __construct(
|
|
public array $ids,
|
|
public int $total,
|
|
public bool $fuzzy,
|
|
public string $driver,
|
|
public bool $available = true,
|
|
public float $durationMs = 0.0,
|
|
public array $lastSortValues = [],
|
|
public bool $hasMore = false,
|
|
) {}
|
|
|
|
/** @return array{ids: list<int>, total: int, fuzzy: bool} */
|
|
public function legacy(): array
|
|
{
|
|
return ['ids' => $this->ids, 'total' => $this->total, 'fuzzy' => $this->fuzzy];
|
|
}
|
|
}
|