<?php
declare(strict_types=1);
namespace Slivki\Message\Query\WorkExample;
use Slivki\Messenger\Query\QueryInterface;
use Slivki\ValueObject\Coordinate;
final class GetWorkExamplesQuery implements QueryInterface
{
private int $page;
private int $perPage;
private string $sortField;
private string $sortDirection;
private ?Coordinate $currentUserPosition;
private ?int $categoryId;
private ?int $offerId;
private ?float $minPrice;
private ?float $maxPrice;
public function __construct(
int $page,
int $perPage,
string $sortField,
string $sortDirection,
?Coordinate $currentUserPosition,
?int $categoryId,
?int $offerId,
?float $minPrice,
?float $maxPrice
) {
$this->page = $page;
$this->perPage = $perPage;
$this->sortField = $sortField;
$this->sortDirection = $sortDirection;
$this->currentUserPosition = $currentUserPosition;
$this->categoryId = $categoryId;
$this->offerId = $offerId;
$this->minPrice = $minPrice;
$this->maxPrice = $maxPrice;
}
public function getPage(): int
{
return $this->page;
}
public function getPerPage(): int
{
return $this->perPage;
}
public function getSortField(): string
{
return $this->sortField;
}
public function getSortDirection(): string
{
return $this->sortDirection;
}
public function getCurrentUserPosition(): ?Coordinate
{
return $this->currentUserPosition;
}
public function getCategoryId(): ?int
{
return $this->categoryId;
}
public function getOfferId(): ?int
{
return $this->offerId;
}
public function getMinPrice(): ?float
{
return $this->minPrice;
}
public function getMaxPrice(): ?float
{
return $this->maxPrice;
}
}