<?phpnamespace App\Entity;use App\Repository\TribuneRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: TribuneRepository::class)]class Tribune{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\ManyToOne] private ?Events $event = null; #[ORM\Column(length: 255)] private ?string $nom = null; #[ORM\OneToMany(mappedBy: 'tribune', targetEntity: SerieBillet::class)] private Collection $serieBillets; public function __construct() { $this->serieBillets = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getEvent(): ?Events { return $this->event; } public function setEvent(?Events $event): self { $this->event = $event; return $this; } public function getNom(): ?string { return $this->nom; } public function setNom(string $nom): self { $this->nom = $nom; return $this; } /** * @return Collection<int, SerieBillet> */ public function getSerieBillets(): Collection { return $this->serieBillets; } public function addSerieBillet(SerieBillet $serieBillet): self { if (!$this->serieBillets->contains($serieBillet)) { $this->serieBillets->add($serieBillet); $serieBillet->setTribune($this); } return $this; } public function removeSerieBillet(SerieBillet $serieBillet): self { if ($this->serieBillets->removeElement($serieBillet)) { // set the owning side to null (unless already changed) if ($serieBillet->getTribune() === $this) { $serieBillet->setTribune(null); } } return $this; } public function __toString() { return $this->getNom(); } public function __clone(): void { if ($this->id) { $this->id = null; $this->event = null; $this->serieBillets = new ArrayCollection(); } }}