<?phpnamespace App\Entity\Gos\RenewalOffer;use App\Entity\Gos\ProductVariant;use App\Repository\Gos\RenewalOffer\SuggestedVariantRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=SuggestedVariantRepository::class) */class SuggestedVariant{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=RenewalOffer::class, inversedBy="suggestedVariants") * @ORM\JoinColumn(nullable=false) */ private $renewalOffer; /** * @ORM\ManyToMany(targetEntity=ProductVariant::class) */ private $sourceVariant; /** * @ORM\ManyToOne(targetEntity=ProductVariant::class) * @ORM\JoinColumn(nullable=false) */ private $targetVariant; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $label; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $description; public function __construct() { $this->sourceVariant = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getRenewalOffer(): ?RenewalOffer { return $this->renewalOffer; } public function setRenewalOffer(?RenewalOffer $renewalOffer): self { $this->renewalOffer = $renewalOffer; return $this; } /** * @return Collection|ProductVariant[] */ public function getSourceVariant(): Collection { return $this->sourceVariant; } public function addSourceVariant(ProductVariant $sourceVariant): self { if (!$this->sourceVariant->contains($sourceVariant)) { $this->sourceVariant[] = $sourceVariant; } return $this; } public function removeSourceVariant(ProductVariant $sourceVariant): self { if ($this->sourceVariant->contains($sourceVariant)) { $this->sourceVariant->removeElement($sourceVariant); } return $this; } public function getTargetVariant(): ?ProductVariant { return $this->targetVariant; } public function setTargetVariant(?ProductVariant $targetVariant): self { $this->targetVariant = $targetVariant; return $this; } public function getLabel(): ?string { return $this->label; } public function setLabel(?string $label): self { $this->label = $label; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; }}