<?phpnamespace App\Entity;use App\Repository\FeaturedOfferRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: FeaturedOfferRepository::class)]class FeaturedOffer{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255)] private $type; #[ORM\Column(type: 'string', length: 255)] private $duration; #[ORM\Column(type: 'string', length: 255)] private $price; #[ORM\OneToMany(targetEntity: FeaturedCourse::class, mappedBy: 'featuredOffer')] private $featureds; public function __construct() { $this->featureds = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getType(): ?string { return $this->type; } public function setType(string $type): self { $this->type = $type; return $this; } public function getDuration(): ?string { return $this->duration; } public function setDuration(string $duration): self { $this->duration = $duration; return $this; } public function getPrice(): ?string { return $this->price; } public function setPrice(string $price): self { $this->price = $price; return $this; } /** * @return Collection|FeaturedCourse[] */ public function getFeatureds(): Collection { return $this->featureds; } public function addFeatured(FeaturedCourse $featured): self { if (!$this->featureds->contains($featured)) { $this->featureds[] = $featured; $featured->setFeaturedOffer($this); } return $this; } public function removeFeatured(FeaturedCourse $featured): self { if ($this->featureds->removeElement($featured)) { // set the owning side to null (unless already changed) if ($featured->getFeaturedOffer() === $this) { $featured->setFeaturedOffer(null); } } return $this; }}