<?phpnamespace App\Entity;use App\Repository\ParTipoConvocatoriaRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParTipoConvocatoriaRepository::class)]class ParTipoConvocatoria{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $tipoConvocatoria = null; #[ORM\ManyToMany(targetEntity: GHVacante::class, mappedBy: 'ParTipoConvocatoria')] private Collection $idVacante; #[ORM\OneToMany(mappedBy: 'tipoConvocatoria', targetEntity: GHCandidato::class)] private Collection $candidato; public function __construct() { $this->idVacante = new ArrayCollection(); $this->candidato = new ArrayCollection(); } public function __toString() { return $this->getTipoConvocatoria(); } public function getId(): ?int { return $this->id; } public function getTipoConvocatoria(): ?string { return $this->tipoConvocatoria; } public function setTipoConvocatoria(string $tipoConvocatoria): static { $this->tipoConvocatoria = $tipoConvocatoria; return $this; } /** * @return Collection<int, GHVacante> */ public function getIdVacante(): Collection { return $this->idVacante; } public function addIdVacante(GHVacante $idVacante): static { if (!$this->idVacante->contains($idVacante)) { $this->idVacante->add($idVacante); } return $this; } public function removeIdVacante(GHVacante $idVacante): static { $this->idVacante->removeElement($idVacante); return $this; } /** * @return Collection<int, GHCandidato> */ public function getCandidato(): Collection { return $this->candidato; } public function addCandidato(GHCandidato $idCandidato): static { if (!$this->candidato->contains($idCandidato)) { $this->candidato->add($idCandidato); $idCandidato->setTipoConvocatoriaId($this); } return $this; } public function removeCandidato(GHCandidato $idCandidato): static { if ($this->candidato->removeElement($idCandidato)) { // set the owning side to null (unless already changed) if ($idCandidato->getTipoConvocatoriaId() === $this) { $idCandidato->setTipoConvocatoriaId(null); } } return $this; }}