fix: reduce snapshot payloads via serializer group and hydration
This commit is contained in:
@@ -20,19 +20,19 @@ class Room
|
||||
public const SELECTION_TYPE_BY_PAX = 'by_pax';
|
||||
public const SELECTION_TYPE_BY_ROOM = 'by_room';
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?int $id = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?string $category = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?int $boardId = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?string $code = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?string $label = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
@@ -46,19 +46,19 @@ class Room
|
||||
#[Groups(['booking'])]
|
||||
public ?int $totalCount = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?int $minPax = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?int $maxPax = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?int $nights = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?string $status = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?int $available = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
@@ -67,7 +67,7 @@ class Room
|
||||
#[Groups(['booking'])]
|
||||
public array $mapping = [];
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['api:list', 'api:single', 'snapshot'])]
|
||||
public ?float $price = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
|
||||
Reference in New Issue
Block a user