src/Entity/Pays.php line 11
<?phpnamespace App\Entity;use App\Repository\PaysRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: PaysRepository::class)]class Pays{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 10, nullable: true)]private ?string $code_pays = null;#[ORM\Column(length: 255, nullable: true)]private ?string $nom_pays = null;#[ORM\OneToMany(mappedBy: 'pays', targetEntity: Filieres::class)]private Collection $filieres;public function __construct(){$this->filieres = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getCodePays(): ?string{return $this->code_pays;}public function setCodePays(?string $code_pays): self{$this->code_pays = $code_pays;return $this;}public function getNomPays(): ?string{return $this->nom_pays;}public function setNomPays(?string $nom_pays): self{$this->nom_pays = $nom_pays;return $this;}/*** @return Collection<int, Filieres>*/public function getFilieres(): Collection{return $this->filieres;}public function addFiliere(Filieres $filiere): self{if (!$this->filieres->contains($filiere)) {$this->filieres->add($filiere);$filiere->setIdPays($this);}return $this;}public function removeFiliere(Filieres $filiere): self{if ($this->filieres->removeElement($filiere)) {// set the owning side to null (unless already changed)if ($filiere->getIdPays() === $this) {$filiere->setIdPays(null);}}return $this;}}