<?php
declare(strict_types=1);
namespace Slivki\Response\OnlineOrder\Director;
use JsonSerializable;
use OpenApi\Annotations as OA;
final class DirectorResponse implements JsonSerializable
{
/**
* @OA\Property(
* description="Идентификатор директора",
* type="integer",
* example=1,
* )
*/
private int $id;
/**
* @OA\Property(
* description="Лого директора",
* type="string",
* nullable=true,
* example="https://example.com/logo.png",
* )
*/
private ?string $logo;
/**
* @OA\Property(
* description="Имя компании",
* type="string",
* nullable=true,
* example="Тестовая",
* )
*/
private ?string $name;
/**
* @OA\Property(
* description="Legal",
* type="string",
* nullable=true,
* example="ynp",
* )
*/
private ?string $legalEntity;
/**
* @OA\Property(
* description="Tax id",
* type="description",
* nullable=true,
* example="23ff331",
* )
*/
private ?string $taxId;
public function __construct(
int $id,
?string $logo,
?string $name,
?string $legalEntity,
?string $taxId
) {
$this->id = $id;
$this->logo = $logo;
$this->name = $name;
$this->legalEntity = $legalEntity;
$this->taxId = $taxId;
}
public function jsonSerialize(): array
{
return [
'id' => $this->id,
'logo' => $this->logo,
'name' => $this->name,
'legalEntity' => $this->legalEntity,
'taxId' => $this->taxId,
];
}
}