<?php
declare(strict_types=1);
namespace Slivki\Dto\Settings;
use JsonSerializable;
use OpenApi\Annotations as OA;
final class PriceSettingsDto implements JsonSerializable
{
/**
* @OA\Property(
* property="minPrice",
* description="Минимальная цена",
* example="1.25",
* )
*/
private float $minPrice;
/**
* @OA\Property(
* property="maxPrice",
* description="Максимальная цена",
* example="234.50",
* )
*/
private float $maxPrice;
public function __construct(float $minPrice, float $maxPrice)
{
$this->minPrice = $minPrice;
$this->maxPrice = $maxPrice;
}
public function jsonSerialize(): array
{
return [
'minPrice' => $this->minPrice,
'maxPrice' => $this->maxPrice,
];
}
}