src/Entity/SessionMasse.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SessionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SessionRepository::class)
  9.  */
  10. class SessionMasse
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="date")
  20.      */
  21.     private $start_date;
  22.     /**
  23.      * @ORM\Column(type="date")
  24.      */
  25.     private $end_date;
  26.     /**
  27.      * @ORM\Column(type="date",nullable="true")
  28.      */
  29.     private $exam;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=Status::class, inversedBy="sessions")
  32.      */
  33.     private $status;
  34.     
  35.     /**
  36.      * @ORM\ManyToMany(targetEntity=Formateur::class, inversedBy="sessions")
  37.      */
  38.     private $formateur;
  39.     
  40.     /**
  41.      * @ORM\Column(type="boolean", nullable=true)
  42.      */
  43.     private $sessionExterne;
  44.     public function __construct()
  45.     {
  46.         $this->formateur = new ArrayCollection();
  47.     }
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getStartDate(): ?\DateTimeInterface
  53.     {
  54.         return $this->start_date;
  55.     }
  56.     public function setStartDate(\DateTimeInterface $start_date): self
  57.     {
  58.         $this->start_date $start_date;
  59.         return $this;
  60.     }
  61.     public function getEndDate(): ?\DateTimeInterface
  62.     {
  63.         return $this->end_date;
  64.     }
  65.     public function setEndDate(\DateTimeInterface $end_date): self
  66.     {
  67.         $this->end_date $end_date;
  68.         return $this;
  69.     }
  70.     public function getExam(): ?\DateTimeInterface
  71.     {
  72.         return $this->exam;
  73.     }
  74.     public function setExam(\DateTimeInterface $exam): self
  75.     {
  76.         $this->exam $exam;
  77.         return $this;
  78.     }
  79.     public function getStatus(): ?Status
  80.     {
  81.         return $this->status;
  82.     }
  83.     public function setStatus(?Status $status): self
  84.     {
  85.         $this->status $status;
  86.         return $this;
  87.     }
  88.     
  89.     
  90.     /**
  91.      * @return Collection<int, Formateur>
  92.      */
  93.     public function getFormateur(): Collection
  94.     {
  95.         return $this->formateur;
  96.     }
  97.     public function addFormateur(Formateur $formateur): self
  98.     {
  99.         if (!$this->formateur->contains($formateur)) {
  100.             $this->formateur[] = $formateur;
  101.         }
  102.         return $this;
  103.     }
  104.     public function removeFormateur(Formateur $formateur): self
  105.     {
  106.         $this->formateur->removeElement($formateur);
  107.         return $this;
  108.     }
  109.     
  110.     public function isSessionExterne(): ?bool
  111.     {
  112.         return $this->sessionExterne;
  113.     }
  114.     public function setSessionExterne(?bool $sessionExterne): self
  115.     {
  116.         $this->sessionExterne $sessionExterne;
  117.         return $this;
  118.     }
  119.     
  120. }