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.     #[Groups(['PwAccount:read''PwAccount:write'])]
  63.     #[ORM\Column(nullabletrue)]
  64.     private ?bool $planedReplaceCounter null;
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getOtg(): ?PwOtg
  70.     {
  71.         return $this->otg;
  72.     }
  73.     public function setOtg(?PwOtg $otg): static
  74.     {
  75.         $this->otg $otg;
  76.         return $this;
  77.     }
  78.     public function getCity(): ?PwCity
  79.     {
  80.         return $this->city;
  81.     }
  82.     public function setCity(?PwCity $city): static
  83.     {
  84.         $this->city $city;
  85.         return $this;
  86.     }
  87.     public function getStreet(): ?PwStreet
  88.     {
  89.         return $this->street;
  90.     }
  91.     public function setStreet(?PwStreet $street): static
  92.     {
  93.         $this->street $street;
  94.         return $this;
  95.     }
  96.     public function getBuildingName(): ?string
  97.     {
  98.         return $this->buildingName;
  99.     }
  100.     public function setBuildingName(?string $buildingName): static
  101.     {
  102.         $this->buildingName $buildingName;
  103.         return $this;
  104.     }
  105.     public function getAcc(): ?string
  106.     {
  107.         return $this->acc;
  108.     }
  109.     public function setAcc(string $acc): static
  110.     {
  111.         $this->acc $acc;
  112.         return $this;
  113.     }
  114.     public function getEicKod(): ?string
  115.     {
  116.         return $this->eicKod;
  117.     }
  118.     public function setEicKod(string $eicKod): static
  119.     {
  120.         $this->eicKod $eicKod;
  121.         return $this;
  122.     }
  123.     public function getChergGpv(): ?string
  124.     {
  125.         return $this->chergGpv;
  126.     }
  127.     public function setChergGpv(?string $chergGpv): static
  128.     {
  129.         $this->chergGpv $chergGpv;
  130.         return $this;
  131.     }
  132.     public function getChergGav(): ?string
  133.     {
  134.         return $this->chergGav;
  135.     }
  136.     public function setChergGav(?string $chergGav): static
  137.     {
  138.         $this->chergGav $chergGav;
  139.         return $this;
  140.     }
  141.     public function getChergAchr(): ?string
  142.     {
  143.         return $this->chergAchr;
  144.     }
  145.     public function setChergAchr(?string $chergAchr): static
  146.     {
  147.         $this->chergAchr $chergAchr;
  148.         return $this;
  149.     }
  150.     public function getChergGvsp(): ?string
  151.     {
  152.         return $this->chergGvsp;
  153.     }
  154.     public function setChergGvsp(?string $chergGvsp): static
  155.     {
  156.         $this->chergGvsp $chergGvsp;
  157.         return $this;
  158.     }
  159.     public function getChergSgav(): ?string
  160.     {
  161.         return $this->chergSgav;
  162.     }
  163.     public function setChergSgav(?string $chergSgav): static
  164.     {
  165.         $this->chergSgav $chergSgav;
  166.         return $this;
  167.     }
  168.     public function getName(): ?string
  169.     {
  170.         return $this->name;
  171.     }
  172.     public function setName(?string $name): static
  173.     {
  174.         $this->name $name;
  175.         return $this;
  176.     }
  177.     public function isDisconnectionTask(): ?bool
  178.     {
  179.         return $this->disconnectionTask;
  180.     }
  181.     public function setDisconnectionTask(?bool $disconnectionTask): static
  182.     {
  183.         $this->disconnectionTask $disconnectionTask;
  184.         return $this;
  185.     }
  186.     public function isPlanedReplaceCounter(): ?bool
  187.     {
  188.         return $this->planedReplaceCounter;
  189.     }
  190.     public function setPlanedReplaceCounter(?bool $planedReplaceCounter): static
  191.     {
  192.         $this->planedReplaceCounter $planedReplaceCounter;
  193.         return $this;
  194.     }
  195. }