src/Entity/Addon/Installation.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Addon;
  3. use App\Entity\BaseEntity;
  4. use App\Entity\Config\SmartAlternativeConfig;
  5. use App\Entity\SocialsSharing\SocialsShare;
  6. use App\Repository\Addon\InstallationRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassInstallationRepository::class)]
  9. class Installation extends BaseEntity
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column()]
  14.     private ?int $id null;
  15.     #[ORM\Column(options: ["default" => true])]
  16.     private ?bool $active true;
  17.     #[ORM\OneToOne(inversedBy'installation'cascade: ['persist''remove'], orphanRemovaltrue)]
  18.     private ?Eshop $eshop null;
  19.     #[ORM\OneToOne(inversedBy'installation'cascade: ['persist''remove'], orphanRemovaltrue)]
  20.     private ?EshopToken $eshopToken null;
  21.     #[ORM\OneToOne(inversedBy'installation'cascade: ['persist''remove'], orphanRemovaltrue)]
  22.     private ?ApiToken $apiToken null;
  23.     #[ORM\OneToOne(mappedBy'installation'cascade: ['persist''remove'], orphanRemovaltrue)]
  24.     private ?SmartAlternativeConfig $config null;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function isActive(): ?bool
  30.     {
  31.         return $this->active;
  32.     }
  33.     public function setActive(bool $active): self
  34.     {
  35.         $this->active $active;
  36.         return $this;
  37.     }
  38.     public function getEshop(): ?Eshop
  39.     {
  40.         return $this->eshop;
  41.     }
  42.     public function setEshop(?Eshop $eshop): self
  43.     {
  44.         $this->eshop $eshop;
  45.         return $this;
  46.     }
  47.     public function getEshopToken(): ?EshopToken
  48.     {
  49.         return $this->eshopToken;
  50.     }
  51.     public function setEshopToken(?EshopToken $token): self
  52.     {
  53.         $this->eshopToken $token;
  54.         return $this;
  55.     }
  56.     public function getApiToken(): ?ApiToken
  57.     {
  58.         return $this->apiToken;
  59.     }
  60.     public function setApiToken(?ApiToken $apiToken): self
  61.     {
  62.         $this->apiToken $apiToken;
  63.         return $this;
  64.     }
  65.     public function getConfig(): ?SmartAlternativeConfig
  66.     {
  67.         return $this->config;
  68.     }
  69.     public function setConfig(SmartAlternativeConfig $config): self
  70.     {
  71.         // set the owning side of the relation if necessary
  72.         if ($config->getInstallation() !== $this) {
  73.             $config->setInstallation($this);
  74.         }
  75.         $this->config $config;
  76.         return $this;
  77.     }
  78. }