<?php
declare(strict_types=1);
namespace Slivki\Response\Beauty\Offer;
use Nelmio\ApiDocBundle\Annotation\Model;
use OpenApi\Annotations as OA;
use JsonSerializable;
use Slivki\Response\OnlineOrder\Director\DirectorResponse;
final class MasterResponse implements JsonSerializable
{
/**
* @OA\Property(
* description="Идентификатор мастера",
* example=6,
* )
*/
private int $id;
/**
* @OA\Property(
* property="status",
* description="Статус мастера",
* example="Салон",
* )
*/
private string $status;
/**
* @OA\Property(
* property="firstName",
* description="Имя мастера",
* example="Имя",
* )
*/
private string $firstName;
/**
* @OA\Property(
* property="lastName",
* description="Фамилия мастера",
* example="Фамилия",
* )
*/
private string $lastName;
/**
* @OA\Property(
* property="imageUrl",
* description="Картинка мастера",
* example="https://www.slivki.by/example.png",
* )
*/
private string $imageUrl;
/**
* @OA\Property(
* property="rating",
* description="Рейтинг мастера",
* example=4.9,
* )
*/
private float $rating;
/**
* @OA\Property(
* property="description",
* description="Описание мастера",
* example="Пример описания мастера",
* )
*/
private ?string $description;
/**
* @OA\Property(
* property="telegram",
* description="Telegram мастера",
* example="example",
* nullable=true,
* )
*/
private ?string $telegram;
/**
* @OA\Property(
* property="viber",
* description="Viber мастера",
* example="+375290000000",
* nullable=true,
* )
*/
private ?string $viber;
/**
* @OA\Property(
* property="salon",
* description="Название салона",
* example="Рога и копыта",
* nullable=true,
* )
*/
private ?string $salon;
/**
* @OA\Property(
* property="locations",
* type="array",
* @OA\Items(ref=@Model(type=MasterLocationResponse::class)),
* ),
*
* @var array<MasterLocationResponse>
*/
private array $locations;
/**
* @OA\Property(
* property="tags",
* type="array",
* @OA\Items(type="string", description="Массаж"),
* ),
*
* @var array<string>
*/
private array $tags;
/**
* @OA\Property(
* property="offerIds",
* type="array",
* @OA\Items(type="integer", description="Акции"),
* ),
*
* @var array<string>
*/
private array $offerIds;
/**
* @OA\Property(
* property="director",
* type="object",
* description="Информауия о директоре",
* ref=@Model(type=DirectorResponse::class)
* )
*/
private ?DirectorResponse $director;
/**
* @OA\Property(
* property="categoryIds",
* type="array",
* @OA\Items(type="integer", description="Категории"),
* ),
*
* @var array<string>
*/
private array $categoryIds;
/**
* @OA\Property(
* property="onlineOrderUrl",
* description="Ccылка на запись",
* example="+https://wwww.slivki.by",
* nullable=true,
* )
*/
private ?string $onlineOrderUrl;
/**
* @OA\Property(
* property="level",
* description="Уровень мастера",
* example="1",
* nullable=true,
* )
*/
private ?int $level;
public function __construct(
int $id,
string $status,
string $firstName,
string $lastName,
string $imageUrl,
float $rating,
?string $description,
?string $telegram,
?string $viber,
?string $salon,
array $locations,
array $tags,
array $offerIds,
?DirectorResponse $director,
array $categoryIds,
?string $onlineOrderUrl,
?int $level
) {
$this->id = $id;
$this->status = $status;
$this->firstName = $firstName;
$this->lastName = $lastName;
$this->imageUrl = $imageUrl;
$this->rating = $rating;
$this->description = $description;
$this->telegram = $telegram;
$this->viber = $viber;
$this->salon = $salon;
$this->locations = $locations;
$this->tags = $tags;
$this->offerIds = $offerIds;
$this->director = $director;
$this->categoryIds = $categoryIds;
$this->onlineOrderUrl = $onlineOrderUrl;
$this->level = $level;
}
public function getId(): int
{
return $this->id;
}
public function getFirstName(): string
{
return $this->firstName;
}
public function getLastName(): string
{
return $this->lastName;
}
public function getStatus(): string
{
return $this->status;
}
public function getImageUrl(): string
{
return $this->imageUrl;
}
public function getRating(): float
{
return $this->rating;
}
public function getDescription(): ?string
{
return $this->description;
}
public function getTelegram(): ?string
{
return $this->telegram;
}
public function getViber(): ?string
{
return $this->viber;
}
public function getSalon(): ?string
{
return $this->salon;
}
public function getLocations(): array
{
return $this->locations;
}
public function getTags(): array
{
return $this->tags;
}
public function getOfferIds(): array
{
return $this->offerIds;
}
public function getDirector(): ?DirectorResponse
{
return $this->director;
}
public function getCategoryIds(): array
{
return $this->categoryIds;
}
public function getOnlineOrderUrl(): ?string
{
return $this->onlineOrderUrl;
}
public function getLevel(): ?int
{
return $this->level;
}
public function jsonSerialize(): array
{
return [
'id' => $this->id,
'status' => $this->status,
'firstName' => $this->firstName,
'lastName' => $this->lastName,
'imageUrl' => $this->imageUrl,
'rating' => $this->rating,
'description' => $this->description,
'telegram' => $this->telegram,
'viber' => $this->viber,
'salon' => $this->salon,
'locations' => $this->locations,
'tags' => $this->tags,
'offerIds' => $this->offerIds,
'director' => $this->director,
'categoryIds' => $this->categoryIds,
'onlineOrderUrl' => $this->onlineOrderUrl,
'level' => $this->level,
];
}
}