src/Entity/Gestiform/Formations/Session/Planning/ApprenantLivrable.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gestiform\Formations\Session\Planning;
  3. use App\Entity\AbstractEntity;
  4. use App\Entity\Common\Upload;
  5. use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
  6. use App\Entity\Gestiform\Users\Formateur;
  7. use App\Repository\Gestiform\Formations\Session\Planning\ApprenantLivrableRepository;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * @ORM\Entity(repositoryClass=ApprenantLivrableRepository::class)
  13.  */
  14. class ApprenantLivrable extends AbstractEntity
  15. {
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Formateur::class, inversedBy="apprenantLivrables")
  18.      * @ORM\JoinColumn(nullable=true)
  19.      */
  20.     private ?Formateur $formateur null;
  21.     /**
  22.      * @ORM\OneToOne(targetEntity=PlanningEvent::class, inversedBy="apprenantLivrable")
  23.      */
  24.     private ?PlanningEvent $planningEvent null;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Masterlistelg::class)
  27.      * @ORM\JoinColumn(nullable=true)
  28.      */
  29.     private ?Masterlistelg $categorie null;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=Masterlistelg::class)
  32.      * @ORM\JoinColumn(nullable=true)
  33.      */
  34.     private ?Masterlistelg $type null;
  35.     /**
  36.      * @ORM\ManyToMany(targetEntity=Upload::class,cascade={"all"})
  37.      */
  38.     private Collection $files;
  39.     /**
  40.      * @ORM\Column(type="boolean", nullable=true)
  41.      */
  42.     private ?bool $approuver false;
  43.     /**
  44.      * @ORM\Column(type="integer", nullable=true)
  45.      */
  46.     private ?int $note null;
  47.     /**
  48.      * @ORM\Column(type="string", length=255, nullable=true)
  49.      */
  50.     private ?string $commentaire null;
  51.     public function __construct()
  52.     {
  53.         $this->files = new ArrayCollection();
  54.     }
  55.     public function getNote(): ?int
  56.     {
  57.         return $this->note;
  58.     }
  59.     public function setNote(?int $note): static
  60.     {
  61.         $this->note $note;
  62.         return $this;
  63.     }
  64.     public function getCommentaire(): ?string
  65.     {
  66.         return $this->commentaire;
  67.     }
  68.     public function setCommentaire(?string $commentaire): self
  69.     {
  70.         $this->commentaire $commentaire;
  71.         return $this;
  72.     }
  73.     public function getFormateur(): ?Formateur
  74.     {
  75.         return $this->formateur;
  76.     }
  77.     public function setFormateur(?Formateur $formateur): self
  78.     {
  79.         $this->formateur $formateur;
  80.         return $this;
  81.     }
  82.     public function getPlanningEvent(): ?PlanningEvent
  83.     {
  84.         return $this->planningEvent;
  85.     }
  86.     public function setPlanningEvent(?PlanningEvent $planningEvent): self
  87.     {
  88.         $this->planningEvent $planningEvent;
  89.         return $this;
  90.     }
  91.     public function getCategorie(): ?Masterlistelg
  92.     {
  93.         return $this->categorie;
  94.     }
  95.     public function setCategorie(?Masterlistelg $categorie): self
  96.     {
  97.         $this->categorie $categorie;
  98.         return $this;
  99.     }
  100.     public function getType(): ?Masterlistelg
  101.     {
  102.         return $this->type;
  103.     }
  104.     public function setType(?Masterlistelg $type): self
  105.     {
  106.         $this->type $type;
  107.         return $this;
  108.     }
  109.     /**
  110.      * @return Collection<int, Upload>
  111.      */
  112.     public function getFiles(): Collection
  113.     {
  114.         return $this->files;
  115.     }
  116.     public function addFile(Upload $file): self
  117.     {
  118.         if (!$this->files->contains($file)) {
  119.             $this->files->add($file);
  120.         }
  121.         return $this;
  122.     }
  123.     public function removeFile(Upload $file): self
  124.     {
  125.         $this->files->removeElement($file);
  126.         return $this;
  127.     }
  128.     public function getApprouver(): ?bool
  129.     {
  130.         return $this->approuver;
  131.     }
  132.     public function setApprouver(?bool $approuver): self
  133.     {
  134.         $this->approuver $approuver;
  135.         return $this;
  136.     }
  137. }