<?phpnamespace App\Entity;use App\Repository\CandidatFicheRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: CandidatFicheRepository::class)]class CandidatFiche{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(type: 'string', length: 255)] private ?string $token = null; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?DemandeServiceCandidat $candidat = null; #[ORM\ManyToOne(inversedBy: 'candidatFiches')] #[ORM\JoinColumn(nullable: false)] private ?FicheEval $fiche = null; #[ORM\OneToMany(mappedBy: 'candidatFiche', targetEntity: ReponseCandidatFiche::class, orphanRemoval: true)] private Collection $reponseCandidatFiches; #[ORM\ManyToOne(inversedBy: 'candidatFiches')] #[ORM\JoinColumn(nullable: false)] private ?DemandeAffectation $demandeAffectation = null; #[ORM\ManyToOne] private ?User $formateur = null; public function __construct() { $this->reponseCandidatFiches = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getToken(): ?string { return $this->token; } public function setToken(string $token): self { $this->token = $token; return $this; } public function getCandidat(): ?DemandeServiceCandidat { return $this->candidat; } public function setCandidat(?DemandeServiceCandidat $candidat): self { $this->candidat = $candidat; return $this; } public function getFiche(): ?FicheEval { return $this->fiche; } public function setFiche(?FicheEval $fiche): self { $this->fiche = $fiche; return $this; } /** * @return Collection<int, ReponseCandidatFiche> */ public function getReponseCandidatFiches(): Collection { return $this->reponseCandidatFiches; } public function addReponseCandidatFich(ReponseCandidatFiche $reponseCandidatFich): self { if (!$this->reponseCandidatFiches->contains($reponseCandidatFich)) { $this->reponseCandidatFiches->add($reponseCandidatFich); $reponseCandidatFich->setCandidatFiche($this); } return $this; } public function removeReponseCandidatFich(ReponseCandidatFiche $reponseCandidatFich): self { if ($this->reponseCandidatFiches->removeElement($reponseCandidatFich)) { // set the owning side to null (unless already changed) if ($reponseCandidatFich->getCandidatFiche() === $this) { $reponseCandidatFich->setCandidatFiche(null); } } return $this; } public function getDemandeAffectation(): ?DemandeAffectation { return $this->demandeAffectation; } public function setDemandeAffectation(?DemandeAffectation $demandeAffectation): self { $this->demandeAffectation = $demandeAffectation; return $this; } public function getFormateur(): ?User { return $this->formateur; } public function setFormateur(?User $formateur): self { $this->formateur = $formateur; return $this; }}