src/Entity/Evaluation.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EvaluationRepository;
  4. use DateTimeImmutable;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity(repositoryClass=EvaluationRepository::class)
  10.  */
  11. class Evaluation
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="datetime")
  21.      */
  22.     private $datedebut;
  23.     /**
  24.      * @ORM\Column(type="datetime")
  25.      */
  26.     private $datefin;
  27.     /**
  28.      * @ORM\ManyToMany(targetEntity=Question::class, inversedBy="evaluations")
  29.      * @ORM\OrderBy({"id" = "ASC"})
  30.      */
  31.     private $question;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity=Session::class, inversedBy="evaluations")
  34.      * @ORM\JoinColumn(nullable=false)
  35.      */
  36.     private $session;
  37.     /**
  38.      * @ORM\OneToMany(targetEntity=EvaluationLog::class, mappedBy="evaluation")
  39.      */
  40.     private $evaluationLogs;
  41.     /**
  42.      * @ORM\OneToMany(targetEntity=EvaluationRepondu::class, mappedBy="evaluation")
  43.      */
  44.     private $evaluationRepondus;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=ModuleSession::class, inversedBy="evaluations")
  47.      * @ORM\JoinColumn(nullable=true)
  48.      */
  49.     private $modulesession;
  50.     /**
  51.      * @ORM\Column(type="boolean",nullable=true)
  52.      */
  53.     private $envoyer;
  54.      /**
  55.      * @ORM\OneToMany(targetEntity=EvaluationEnvoyer::class, mappedBy="evaluation")
  56.      */
  57.     private $evaluationEnvoyers;
  58.     /**
  59.      * @ORM\Column(type="text",nullable=true)
  60.      */
  61.     private $uuid;
  62.     /**
  63.      * @ORM\Column(type="datetime", nullable=true)
  64.      */
  65.     private $created_at;
  66.     public function __construct()
  67.     {
  68.         $this->question = new ArrayCollection();
  69.         $this->evaluationLogs = new ArrayCollection();
  70.         $this->evaluationRepondus = new ArrayCollection();
  71.         $this->evaluationEnvoyers = new ArrayCollection();
  72.         $this->created_at = new DateTimeImmutable();
  73.     }
  74.     public function getId(): ?int
  75.     {
  76.         return $this->id;
  77.     }
  78.     public function getDatedebut(): ?\DateTimeInterface
  79.     {
  80.         return $this->datedebut;
  81.     }
  82.     public function setDatedebut(\DateTimeInterface $datedebut): self
  83.     {
  84.         $this->datedebut $datedebut;
  85.         return $this;
  86.     }
  87.     public function getDatefin(): ?\DateTimeInterface
  88.     {
  89.         return $this->datefin;
  90.     }
  91.     public function setDatefin(\DateTimeInterface $datefin): self
  92.     {
  93.         $this->datefin $datefin;
  94.         return $this;
  95.     }
  96.     /**
  97.      * @return Collection<int, Question>
  98.      */
  99.     public function getQuestion(): Collection
  100.     {
  101.         return $this->question;
  102.     }
  103.     public function addQuestion(Question $question): self
  104.     {
  105.         if (!$this->question->contains($question)) {
  106.             $this->question[] = $question;
  107.         }
  108.         return $this;
  109.     }
  110.     public function removeQuestion(Question $question): self
  111.     {
  112.         $this->question->removeElement($question);
  113.         return $this;
  114.     }
  115.     public function getSession(): ?Session
  116.     {
  117.         return $this->session;
  118.     }
  119.     public function setSession(?Session $session): self
  120.     {
  121.         $this->session $session;
  122.         return $this;
  123.     }
  124.     /**
  125.      * @return Collection<int, EvaluationLog>
  126.      */
  127.     public function getEvaluationLogs(): Collection
  128.     {
  129.         return $this->evaluationLogs;
  130.     }
  131.     public function addEvaluationLog(EvaluationLog $evaluationLog): self
  132.     {
  133.         if (!$this->evaluationLogs->contains($evaluationLog)) {
  134.             $this->evaluationLogs[] = $evaluationLog;
  135.             $evaluationLog->setEvaluation($this);
  136.         }
  137.         return $this;
  138.     }
  139.     public function removeEvaluationLog(EvaluationLog $evaluationLog): self
  140.     {
  141.         if ($this->evaluationLogs->removeElement($evaluationLog)) {
  142.             // set the owning side to null (unless already changed)
  143.             if ($evaluationLog->getEvaluation() === $this) {
  144.                 $evaluationLog->setEvaluation(null);
  145.             }
  146.         }
  147.         return $this;
  148.     }
  149.     /**
  150.      * @return Collection<int, EvaluationRepondu>
  151.      */
  152.     public function getEvaluationRepondus(): Collection
  153.     {
  154.         return $this->evaluationRepondus;
  155.     }
  156.     public function addEvaluationRepondu(EvaluationRepondu $evaluationRepondu): self
  157.     {
  158.         if (!$this->evaluationRepondus->contains($evaluationRepondu)) {
  159.             $this->evaluationRepondus[] = $evaluationRepondu;
  160.             $evaluationRepondu->setEvaluation($this);
  161.         }
  162.         return $this;
  163.     }
  164.     public function removeEvaluationRepondu(EvaluationRepondu $evaluationRepondu): self
  165.     {
  166.         if ($this->evaluationRepondus->removeElement($evaluationRepondu)) {
  167.             // set the owning side to null (unless already changed)
  168.             if ($evaluationRepondu->getEvaluation() === $this) {
  169.                 $evaluationRepondu->setEvaluation(null);
  170.             }
  171.         }
  172.         return $this;
  173.     }
  174.     public function getModuleSession(): ?ModuleSession
  175.     {
  176.         return $this->modulesession;
  177.     }
  178.     public function setModuleSession(?ModuleSession $session): self
  179.     {
  180.         $this->modulesession $session;
  181.         return $this;
  182.     }
  183.     public function getEnvoyer(): ?bool
  184.     {
  185.         return $this->envoyer;
  186.     }
  187.     public function setEnvoyer(?bool $session): self
  188.     {
  189.         $this->envoyer $session;
  190.         return $this;
  191.     }
  192.       /**
  193.      * @return Collection<int, EvaluationEnvoyer>
  194.      */
  195.     public function getEvaluationEnvoyers(): Collection
  196.     {
  197.         return $this->evaluationEnvoyers;
  198.     }
  199.     public function addEvaluationEnvoyer(EvaluationEnvoyer $evaluationEnvoyer): self
  200.     {
  201.         if (!$this->evaluationEnvoyers->contains($evaluationEnvoyer)) {
  202.             $this->evaluationEnvoyers[] = $evaluationEnvoyer;
  203.             $evaluationEnvoyer->setEvaluation($this);
  204.         }
  205.         return $this;
  206.     }
  207.     public function removeEvaluationEnvoyer(EvaluationEnvoyer $evaluationEnvoyer): self
  208.     {
  209.         if ($this->evaluationEnvoyers->removeElement($evaluationEnvoyer)) {
  210.             // set the owning side to null (unless already changed)
  211.             if ($evaluationEnvoyer->getEvaluation() === $this) {
  212.                 $evaluationEnvoyer->setEvaluation(null);
  213.             }
  214.         }
  215.         return $this;
  216.     }
  217.     public function getUuid(): ?string
  218.     {
  219.         return $this->uuid;
  220.     }
  221.     public function setUuid(?string $session): self
  222.     {
  223.         $this->uuid $session;
  224.         return $this;
  225.     }
  226.     public function getCreatedAt(): ?\DateTimeImmutable
  227.     {
  228.         return $this->created_at;
  229.     }
  230.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  231.     {
  232.         $this->created_at $created_at;
  233.         return $this;
  234.     }
  235. }