src/Entity/EntetePvCompetence.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EntetePvCompetenceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=EntetePvCompetenceRepository::class)
  9.  */
  10. class EntetePvCompetence
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Session::class, inversedBy="entetePvCompetences")
  20.      */
  21.     private $session;
  22.     /**
  23.      * @ORM\Column(type="datetime_immutable", nullable=true)
  24.      */
  25.     private $created_at;
  26.     /**
  27.      * @ORM\Column(type="datetime_immutable", nullable=true)
  28.      */
  29.     private $updated_at;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=LignePvCompetence::class, mappedBy="entetepvcompetence", cascade={"persist"})
  32.      */
  33.     private $lignePvCompetences;
  34.     public function __construct()
  35.     {
  36.         $this->lignePvCompetences = new ArrayCollection();
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getSession(): ?Session
  43.     {
  44.         return $this->session;
  45.     }
  46.     public function setSession(?Session $session): self
  47.     {
  48.         $this->session $session;
  49.         return $this;
  50.     }
  51.     public function getCreatedAt(): ?\DateTimeImmutable
  52.     {
  53.         return $this->created_at;
  54.     }
  55.     public function setCreatedAt(?\DateTimeImmutable $created_at): self
  56.     {
  57.         $this->created_at $created_at;
  58.         return $this;
  59.     }
  60.     public function getUpdatedAt(): ?\DateTimeImmutable
  61.     {
  62.         return $this->updated_at;
  63.     }
  64.     public function setUpdatedAt(?\DateTimeImmutable $updated_at): self
  65.     {
  66.         $this->updated_at $updated_at;
  67.         return $this;
  68.     }
  69.     /**
  70.      * @return Collection<int, LignePvCompetence>
  71.      */
  72.     public function getLignePvCompetences(): Collection
  73.     {
  74.         return $this->lignePvCompetences;
  75.     }
  76.     public function addLignePvCompetence(LignePvCompetence $lignePvCompetence): self
  77.     {
  78.         if (!$this->lignePvCompetences->contains($lignePvCompetence)) {
  79.             $this->lignePvCompetences[] = $lignePvCompetence;
  80.             $lignePvCompetence->setEntetepvcompetence($this);
  81.         }
  82.         return $this;
  83.     }
  84.     public function removeLignePvCompetence(LignePvCompetence $lignePvCompetence): self
  85.     {
  86.         if ($this->lignePvCompetences->removeElement($lignePvCompetence)) {
  87.             // set the owning side to null (unless already changed)
  88.             if ($lignePvCompetence->getEntetepvcompetence() === $this) {
  89.                 $lignePvCompetence->setEntetepvcompetence(null);
  90.             }
  91.         }
  92.         return $this;
  93.     }
  94. }