<?phpnamespace App\Entity;use App\Repository\EnjeuxRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: EnjeuxRepository::class)]class Enjeux{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $name = null; #[ORM\Column(type: Types::TEXT)] private ?string $description = null; #[ORM\OneToMany(mappedBy: 'enjeux', targetEntity: Orientation::class)] private Collection $orientation; #[ORM\ManyToOne(inversedBy: 'enjeuxes')] private ?PSG $Psg = null; public function __construct() { $this->orientation = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): static { $this->description = $description; return $this; } /** * @return Collection<int, Orientation> */ public function getOrientation(): Collection { return $this->orientation; } public function addOrientation(Orientation $orientation): static { if (!$this->orientation->contains($orientation)) { $this->orientation->add($orientation); $orientation->setEnjeux($this); } return $this; } public function removeOrientation(Orientation $orientation): static { if ($this->orientation->removeElement($orientation)) { // set the owning side to null (unless already changed) if ($orientation->getEnjeux() === $this) { $orientation->setEnjeux(null); } } return $this; } public function getPsg(): ?PSG { return $this->Psg; } public function setPsg(?PSG $Psg): static { $this->Psg = $Psg; return $this; } public function __tostring(): string { return $this->name; }}