<?phpnamespace App\Entity;use App\Repository\EnqueteEntrepriseSectionRepository;use DateTimeImmutable;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=EnqueteEntrepriseSectionRepository::class) */class EnqueteEntrepriseSection{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="text") */ private $libelle; /** * @ORM\Column(type="datetime_immutable") */ private $createdAt; /** * @ORM\OrderBy({"position" = "ASC"}) * @ORM\OneToMany(targetEntity=EnqueteEntrepriseSectionChild::class, mappedBy="enqueteEntrepriseSection",cascade={"persist"}) */ private $enqueteEntrepriseSectionChildren; public function __construct() { $this->enqueteEntrepriseSectionChildren = new ArrayCollection(); $this->createdAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getLibelle(): ?string { return $this->libelle; } public function setLibelle(string $libelle): self { $this->libelle = $libelle; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): self { $this->createdAt = $createdAt; return $this; } /** * @return Collection<int, EnqueteEntrepriseSectionChild> */ public function getEnqueteEntrepriseSectionChildren(): Collection { return $this->enqueteEntrepriseSectionChildren; } public function addEnqueteEntrepriseSectionChild(EnqueteEntrepriseSectionChild $enqueteEntrepriseSectionChild): self { if (!$this->enqueteEntrepriseSectionChildren->contains($enqueteEntrepriseSectionChild)) { $this->enqueteEntrepriseSectionChildren[] = $enqueteEntrepriseSectionChild; $enqueteEntrepriseSectionChild->setEnqueteEntrepriseSection($this); } return $this; } public function removeEnqueteEntrepriseSectionChild(EnqueteEntrepriseSectionChild $enqueteEntrepriseSectionChild): self { if ($this->enqueteEntrepriseSectionChildren->removeElement($enqueteEntrepriseSectionChild)) { // set the owning side to null (unless already changed) if ($enqueteEntrepriseSectionChild->getEnqueteEntrepriseSection() === $this) { $enqueteEntrepriseSectionChild->setEnqueteEntrepriseSection(null); } } return $this; }}