<?phpnamespace App\Entity\Gos;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;/** * @ORM\Entity() */class CouponCascadeType{ const NetPrice = 'net-price'; const GrossPrice = 'gross-price'; const NumberOfProducts = 'number-of-products'; /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $name; /** * @Gedmo\Slug(fields={"name"}) * @ORM\Column(type="string", length=255, nullable=true) */ private $slug; /** * @ORM\OneToMany(targetEntity="CouponCascadeSettings", mappedBy="type") */ private $cascadeSettings; public function __construct() { $this->cascadeSettings = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(?string $name): self { $this->name = $name; return $this; } public function getSlug(): ?string { return $this->slug; } public function setSlug(?string $slug): self { $this->slug = $slug; return $this; } /** * @return Collection|CouponCascadeSettings[] */ public function getCascadeSettings(): Collection { return $this->cascadeSettings; } public function addCascadeSetting(CouponCascadeSettings $cascadeSetting): self { if (!$this->cascadeSettings->contains($cascadeSetting)) { $this->cascadeSettings[] = $cascadeSetting; $cascadeSetting->setType($this); } return $this; } public function removeCascadeSetting(CouponCascadeSettings $cascadeSetting): self { if ($this->cascadeSettings->contains($cascadeSetting)) { $this->cascadeSettings->removeElement($cascadeSetting); // set the owning side to null (unless already changed) if ($cascadeSetting->getType() === $this) { $cascadeSetting->setType(null); } } return $this; }}