<?php
namespace App\Entity\Addon;
use App\Entity\BaseEntity;
use App\Entity\Config\SmartAlternativeConfig;
use App\Entity\SocialsSharing\SocialsShare;
use App\Repository\Addon\InstallationRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: InstallationRepository::class)]
class Installation extends BaseEntity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column()]
private ?int $id = null;
#[ORM\Column(options: ["default" => true])]
private ?bool $active = true;
#[ORM\OneToOne(inversedBy: 'installation', cascade: ['persist', 'remove'], orphanRemoval: true)]
private ?Eshop $eshop = null;
#[ORM\OneToOne(inversedBy: 'installation', cascade: ['persist', 'remove'], orphanRemoval: true)]
private ?EshopToken $eshopToken = null;
#[ORM\OneToOne(inversedBy: 'installation', cascade: ['persist', 'remove'], orphanRemoval: true)]
private ?ApiToken $apiToken = null;
#[ORM\OneToOne(mappedBy: 'installation', cascade: ['persist', 'remove'], orphanRemoval: true)]
private ?SmartAlternativeConfig $config = null;
public function getId(): ?int
{
return $this->id;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getEshop(): ?Eshop
{
return $this->eshop;
}
public function setEshop(?Eshop $eshop): self
{
$this->eshop = $eshop;
return $this;
}
public function getEshopToken(): ?EshopToken
{
return $this->eshopToken;
}
public function setEshopToken(?EshopToken $token): self
{
$this->eshopToken = $token;
return $this;
}
public function getApiToken(): ?ApiToken
{
return $this->apiToken;
}
public function setApiToken(?ApiToken $apiToken): self
{
$this->apiToken = $apiToken;
return $this;
}
public function getConfig(): ?SmartAlternativeConfig
{
return $this->config;
}
public function setConfig(SmartAlternativeConfig $config): self
{
// set the owning side of the relation if necessary
if ($config->getInstallation() !== $this) {
$config->setInstallation($this);
}
$this->config = $config;
return $this;
}
}