src/Entity/PwAddressQueue.php line 31

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\PwAddressQueueRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use ApiPlatform\Metadata\ApiFilter;
  8. use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. #[ORM\Entity(repositoryClassPwAddressQueueRepository::class)]
  11. #[ApiResource(
  12.     normalizationContext: ['groups' => ['PwAddressQ:read']],
  13.     denormalizationContext: ['groups' => ['PwAddressQ:write']],
  14.     cacheHeaders: [
  15.         'max_age' => 3600
  16.         'shared_max_age' => 7200
  17.         'vary' => ['Authorization''Accept-Language']
  18.     ]
  19. )]
  20. #[ApiFilter(SearchFilter::class, properties: [
  21.     'city.id' => 'exact'
  22.     'street.id' => 'exact'
  23.     'otg.id' => 'exact' 
  24.     'buildingNames' => 'ipartial'
  25. ])]
  26. class PwAddressQueue
  27. {
  28.     #[ORM\Id]
  29.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  30.     #[ORM\Column]
  31.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  32.     private ?int $id null;
  33.     #[ORM\ManyToOne(inversedBy'pwAddressQueues')]
  34.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  35.     private ?PwOtg $otg null;
  36.     #[ORM\ManyToOne(inversedBy'pwAddressQueues')]
  37.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  38.     private ?PwCity $city null;
  39.     #[ORM\ManyToOne(inversedBy'pwAddressQueues')]
  40.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  41.     private ?PwStreet $street null;
  42.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  43.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  44.     private ?string $buildingNames null;
  45.     #[ORM\Column(length20nullabletrue)]
  46.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  47.     private ?string $chergGpv null;
  48.     #[ORM\Column(length20nullabletrue)]
  49.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  50.     private ?string $chergGav null;
  51.     #[ORM\Column(length20nullabletrue)]
  52.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  53.     private ?string $chergAchr null;
  54.     #[ORM\Column(length20nullabletrue)]
  55.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  56.     private ?string $chergGvsp null;
  57.     #[ORM\Column(length20nullabletrue)]
  58.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  59.     private ?string $chergSgav null;
  60.     #[ORM\Column(length50nullabletrue,  uniquetrue)]
  61.     #[Groups(['PwAddressQ:read''PwAddressQ:write'])]
  62.     private ?string $hash null;
  63.     public function getId(): ?int
  64.     {
  65.         return $this->id;
  66.     }
  67.     public function getOtg(): ?PwOtg
  68.     {
  69.         return $this->otg;
  70.     }
  71.     public function setOtg(?PwOtg $otg): static
  72.     {
  73.         $this->otg $otg;
  74.         return $this;
  75.     }
  76.     public function getCity(): ?PwCity
  77.     {
  78.         return $this->city;
  79.     }
  80.     public function setCity(?PwCity $city): static
  81.     {
  82.         $this->city $city;
  83.         return $this;
  84.     }
  85.     public function getStreet(): ?PwStreet
  86.     {
  87.         return $this->street;
  88.     }
  89.     public function setStreet(?PwStreet $street): static
  90.     {
  91.         $this->street $street;
  92.         return $this;
  93.     }
  94.     public function getBuildingNames(): ?string
  95.     {
  96.         return $this->buildingNames;
  97.     }
  98.     public function setBuildingNames(?string $buildingNames): static
  99.     {
  100.         $this->buildingNames $buildingNames;
  101.         return $this;
  102.     }
  103.     public function getChergGpv(): ?string
  104.     {
  105.         return $this->chergGpv;
  106.     }
  107.     public function setChergGpv(?string $chergGpv): static
  108.     {
  109.         $this->chergGpv $chergGpv;
  110.         return $this;
  111.     }
  112.     public function getChergGav(): ?string
  113.     {
  114.         return $this->chergGav;
  115.     }
  116.     public function setChergGav(?string $chergGav): static
  117.     {
  118.         $this->chergGav $chergGav;
  119.         return $this;
  120.     }
  121.     public function getChergAchr(): ?string
  122.     {
  123.         return $this->chergAchr;
  124.     }
  125.     public function setChergAchr(?string $chergAchr): static
  126.     {
  127.         $this->chergAchr $chergAchr;
  128.         return $this;
  129.     }
  130.     public function getChergGvsp(): ?string
  131.     {
  132.         return $this->chergGvsp;
  133.     }
  134.     public function setChergGvsp(?string $chergGvsp): static
  135.     {
  136.         $this->chergGvsp $chergGvsp;
  137.         return $this;
  138.     }
  139.     public function getChergSgav(): ?string
  140.     {
  141.         return $this->chergSgav;
  142.     }
  143.     public function setChergSgav(?string $chergSgav): static
  144.     {
  145.         $this->chergSgav $chergSgav;
  146.         return $this;
  147.     }
  148.     public function getHash(): ?string
  149.     {
  150.         return $this->hash;
  151.     }
  152.     public function setHash(?string $hash): static
  153.     {
  154.         $this->hash $hash;
  155.         return $this;
  156.     }
  157. }