src/Entity/PwAccount.php line 24

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