src/Entity/DirectionRegionale.php line 10
<?phpnamespace App\Entity;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity()]class DirectionRegionale{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column(type: 'integer')]private $id;#[ORM\Column(type: 'string', length: 255)]private $nom;#[ORM\Column(type: 'string', length: 255, nullable: true)]private $chefLieu;#[ORM\ManyToOne(targetEntity: User::class)]#[ORM\JoinColumn(nullable: true)]private $user;#[ORM\Column(type: 'date', nullable: true)]private $creation;#[ORM\Column(type: 'datetime', nullable: true)]private $modification;#[ORM\OneToMany(mappedBy: 'directionRegionale', targetEntity: Etablissement::class)]private $etablissements;#[ORM\OneToMany(mappedBy: 'directionRegionale', targetEntity: Localite::class)]private $localites;public function __construct(){$this->etablissements = new ArrayCollection();$this->localites = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getNom(): ?string{return $this->nom;}public function setNom(string $nom): self{$this->nom = $nom;return $this;}public function getChefLieu(): ?string{return $this->chefLieu;}public function setChefLieu(?string $chefLieu): self{$this->chefLieu = $chefLieu;return $this;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): self{$this->user = $user;return $this;}public function getCreation(): ?\DateTimeInterface{return $this->creation;}public function setCreation(?\DateTimeInterface $creation): self{$this->creation = $creation;return $this;}public function getModification(): ?\DateTimeInterface{return $this->modification;}public function setModification(?\DateTimeInterface $modification): self{$this->modification = $modification;return $this;}/*** @return Collection<int, Etablissement>*/public function getEtablissements(): Collection{return $this->etablissements;}public function addEtablissement(Etablissement $etablissement): self{if (!$this->etablissements->contains($etablissement)) {$this->etablissements[] = $etablissement;$etablissement->setDirectionRegionale($this);}return $this;}public function removeEtablissement(Etablissement $etablissement): self{if ($this->etablissements->removeElement($etablissement)) {if ($etablissement->getDirectionRegionale() === $this) {$etablissement->setDirectionRegionale(null);}}return $this;}/*** @return Collection<int, Localite>*/public function getLocalites(): Collection{return $this->localites;}public function addLocalite(Localite $localite): self{if (!$this->localites->contains($localite)) {$this->localites[] = $localite;$localite->setDirectionRegionale($this);}return $this;}public function removeLocalite(Localite $localite): self{if ($this->localites->removeElement($localite)) {if ($localite->getDirectionRegionale() === $this) {$localite->setDirectionRegionale(null);}}return $this;}public function __toString(): string{return $this->nom ?? '';}}