<?php
namespace App\Entity\Gestiform\Formations\Session\Planning;
use App\Entity\AbstractEntity;
use App\Entity\Common\Upload;
use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
use App\Entity\Gestiform\Users\Formateur;
use App\Repository\Gestiform\Formations\Session\Planning\ApprenantLivrableRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ApprenantLivrableRepository::class)
*/
class ApprenantLivrable extends AbstractEntity
{
/**
* @ORM\ManyToOne(targetEntity=Formateur::class, inversedBy="apprenantLivrables")
* @ORM\JoinColumn(nullable=true)
*/
private ?Formateur $formateur = null;
/**
* @ORM\OneToOne(targetEntity=PlanningEvent::class, inversedBy="apprenantLivrable")
*/
private ?PlanningEvent $planningEvent = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $categorie = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $type = null;
/**
* @ORM\ManyToMany(targetEntity=Upload::class,cascade={"all"})
*/
private Collection $files;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $approuver = false;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private ?int $note = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $commentaire = null;
public function __construct()
{
$this->files = new ArrayCollection();
}
public function getNote(): ?int
{
return $this->note;
}
public function setNote(?int $note): static
{
$this->note = $note;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(?string $commentaire): self
{
$this->commentaire = $commentaire;
return $this;
}
public function getFormateur(): ?Formateur
{
return $this->formateur;
}
public function setFormateur(?Formateur $formateur): self
{
$this->formateur = $formateur;
return $this;
}
public function getPlanningEvent(): ?PlanningEvent
{
return $this->planningEvent;
}
public function setPlanningEvent(?PlanningEvent $planningEvent): self
{
$this->planningEvent = $planningEvent;
return $this;
}
public function getCategorie(): ?Masterlistelg
{
return $this->categorie;
}
public function setCategorie(?Masterlistelg $categorie): self
{
$this->categorie = $categorie;
return $this;
}
public function getType(): ?Masterlistelg
{
return $this->type;
}
public function setType(?Masterlistelg $type): self
{
$this->type = $type;
return $this;
}
/**
* @return Collection<int, Upload>
*/
public function getFiles(): Collection
{
return $this->files;
}
public function addFile(Upload $file): self
{
if (!$this->files->contains($file)) {
$this->files->add($file);
}
return $this;
}
public function removeFile(Upload $file): self
{
$this->files->removeElement($file);
return $this;
}
public function getApprouver(): ?bool
{
return $this->approuver;
}
public function setApprouver(?bool $approuver): self
{
$this->approuver = $approuver;
return $this;
}
}