src/Entity/CandidatFiche.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CandidatFicheRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCandidatFicheRepository::class)]
  8. class CandidatFiche
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(type'string'length255)]
  15.     private ?string $token null;
  16.     #[ORM\ManyToOne]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?DemandeServiceCandidat $candidat null;
  19.     #[ORM\ManyToOne(inversedBy'candidatFiches')]
  20.     #[ORM\JoinColumn(nullablefalse)]
  21.     private ?FicheEval $fiche null;
  22.     #[ORM\OneToMany(mappedBy'candidatFiche'targetEntityReponseCandidatFiche::class, orphanRemovaltrue)]
  23.     private Collection $reponseCandidatFiches;
  24.     #[ORM\ManyToOne(inversedBy'candidatFiches')]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private ?DemandeAffectation $demandeAffectation null;
  27.     #[ORM\ManyToOne]
  28.     private ?User $formateur null;
  29.     public function __construct()
  30.     {
  31.         $this->reponseCandidatFiches = new ArrayCollection();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getToken(): ?string
  38.     {
  39.         return $this->token;
  40.     }
  41.     public function setToken(string $token): self
  42.     {
  43.         $this->token $token;
  44.         return $this;
  45.     }
  46.     public function getCandidat(): ?DemandeServiceCandidat
  47.     {
  48.         return $this->candidat;
  49.     }
  50.     public function setCandidat(?DemandeServiceCandidat $candidat): self
  51.     {
  52.         $this->candidat $candidat;
  53.         return $this;
  54.     }
  55.     public function getFiche(): ?FicheEval
  56.     {
  57.         return $this->fiche;
  58.     }
  59.     public function setFiche(?FicheEval $fiche): self
  60.     {
  61.         $this->fiche $fiche;
  62.         return $this;
  63.     }
  64.     /**
  65.      * @return Collection<int, ReponseCandidatFiche>
  66.      */
  67.     public function getReponseCandidatFiches(): Collection
  68.     {
  69.         return $this->reponseCandidatFiches;
  70.     }
  71.     public function addReponseCandidatFich(ReponseCandidatFiche $reponseCandidatFich): self
  72.     {
  73.         if (!$this->reponseCandidatFiches->contains($reponseCandidatFich)) {
  74.             $this->reponseCandidatFiches->add($reponseCandidatFich);
  75.             $reponseCandidatFich->setCandidatFiche($this);
  76.         }
  77.         return $this;
  78.     }
  79.     public function removeReponseCandidatFich(ReponseCandidatFiche $reponseCandidatFich): self
  80.     {
  81.         if ($this->reponseCandidatFiches->removeElement($reponseCandidatFich)) {
  82.             // set the owning side to null (unless already changed)
  83.             if ($reponseCandidatFich->getCandidatFiche() === $this) {
  84.                 $reponseCandidatFich->setCandidatFiche(null);
  85.             }
  86.         }
  87.         return $this;
  88.     }
  89.     public function getDemandeAffectation(): ?DemandeAffectation
  90.     {
  91.         return $this->demandeAffectation;
  92.     }
  93.     public function setDemandeAffectation(?DemandeAffectation $demandeAffectation): self
  94.     {
  95.         $this->demandeAffectation $demandeAffectation;
  96.         return $this;
  97.     }
  98.     public function getFormateur(): ?User
  99.     {
  100.         return $this->formateur;
  101.     }
  102.     public function setFormateur(?User $formateur): self
  103.     {
  104.         $this->formateur $formateur;
  105.         return $this;
  106.     }
  107. }