fix: reduce snapshot payloads via serializer group and hydration
This commit is contained in:
1 parent
3b6ee90a7e
commit
6f07678f04
15 files changed
+142
-105
No files matched your search
@@ -17,32 +17,32 @@ use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
|
||||
*/
|
||||
class Pickup
|
||||
{
|
||||
#[Groups(['api:list'])]
|
||||
#[Groups(['api:list', 'snapshot'])]
|
||||
public ?int $id = null;
|
||||
|
||||
#[Groups(['api:list'])]
|
||||
#[Groups(['api:list', 'snapshot'])]
|
||||
public ?string $code = null;
|
||||
|
||||
#[Groups(['api:list'])]
|
||||
#[Groups(['api:list', 'snapshot'])]
|
||||
public ?string $city = null;
|
||||
|
||||
#[Groups(['api:list'])]
|
||||
#[Groups(['api:list', 'snapshot'])]
|
||||
public ?string $postalCode = null;
|
||||
|
||||
#[Groups(['api:list'])]
|
||||
#[Groups(['api:list', 'snapshot'])]
|
||||
public ?string $street = null;
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
#[Groups(['api:single', 'snapshot'])]
|
||||
#[Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i'])]
|
||||
public ?\DateTimeImmutable $time = null;
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
#[Groups(['api:single', 'snapshot'])]
|
||||
public ?float $price = null;
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
#[Groups(['api:single', 'snapshot'])]
|
||||
public ?float $priceOutbound = null;
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
#[Groups(['api:single', 'snapshot'])]
|
||||
public ?float $priceInbound = null;
|
||||
|
||||
#[Groups(['api:booking'])]
|
||||
|
||||
Reference in new issue
Block a user