<?phpnamespace App\Entity;use App\Repository\EntetePvCompetenceRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=EntetePvCompetenceRepository::class) */class EntetePvCompetence{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Session::class, inversedBy="entetePvCompetences") */ private $session; /** * @ORM\Column(type="datetime_immutable", nullable=true) */ private $created_at; /** * @ORM\Column(type="datetime_immutable", nullable=true) */ private $updated_at; /** * @ORM\OneToMany(targetEntity=LignePvCompetence::class, mappedBy="entetepvcompetence", cascade={"persist"}) */ private $lignePvCompetences; public function __construct() { $this->lignePvCompetences = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getSession(): ?Session { return $this->session; } public function setSession(?Session $session): self { $this->session = $session; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->created_at; } public function setCreatedAt(?\DateTimeImmutable $created_at): self { $this->created_at = $created_at; return $this; } public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updated_at; } public function setUpdatedAt(?\DateTimeImmutable $updated_at): self { $this->updated_at = $updated_at; return $this; } /** * @return Collection<int, LignePvCompetence> */ public function getLignePvCompetences(): Collection { return $this->lignePvCompetences; } public function addLignePvCompetence(LignePvCompetence $lignePvCompetence): self { if (!$this->lignePvCompetences->contains($lignePvCompetence)) { $this->lignePvCompetences[] = $lignePvCompetence; $lignePvCompetence->setEntetepvcompetence($this); } return $this; } public function removeLignePvCompetence(LignePvCompetence $lignePvCompetence): self { if ($this->lignePvCompetences->removeElement($lignePvCompetence)) { // set the owning side to null (unless already changed) if ($lignePvCompetence->getEntetepvcompetence() === $this) { $lignePvCompetence->setEntetepvcompetence(null); } } return $this; }}