feat: api endpoints
This commit is contained in:
@@ -2,24 +2,65 @@
|
||||
|
||||
namespace App\BusProNet\Model;
|
||||
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
|
||||
|
||||
class Room
|
||||
{
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?int $id = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?string $category = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?int $boardId = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?string $code = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?string $label = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
#[Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'])]
|
||||
public ?\DateTimeImmutable $dateFrom = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
#[Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'])]
|
||||
public ?\DateTimeImmutable $dateTo = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
public ?int $totalCount = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?int $minPax = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?int $maxPax = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?int $nights = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?string $status = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?int $available = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?string $board = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
public array $mapping = [];
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?float $price = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
public ?float $totalPrice = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
public array $individualPrice = [];
|
||||
}
|
||||
Reference in New Issue
Block a user