fix: reduce snapshot payloads via serializer group and hydration

This commit is contained in:
Björn Fromme committed 2026-03-24 17:06:10 +01:00
1 parent 3b6ee90a7e
commit 6f07678f04
15 files changed
+142 -105

No files matched your search

+7 -7
View File
@@ -15,24 +15,24 @@ use Symfony\Component\Serializer\Attribute\Groups;
*/
class Hotel
{
#[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 $code = null;
#[Groups(['api:list', 'api:single'])]
#[Groups(['api:list', 'api:single', 'snapshot'])]
public ?string $name = null;
#[Groups(['api:list', 'api:single'])]
#[Groups(['api:list', 'api:single', 'snapshot'])]
public ?string $city = null;
#[Groups(['api:list', 'api:single'])]
#[Groups(['api:list', 'api:single', 'snapshot'])]
public ?string $street = null;
#[Groups(['api:list', 'api:single'])]
#[Groups(['api:list', 'api:single', 'snapshot'])]
public ?string $phone = null;
#[Groups(['api:list', 'api:single'])]
#[Groups(['api:list', 'api:single', 'snapshot'])]
public ?string $country = null;
}