<?php
namespace App\Entity;
use App\Repository\ParTipoSeleccionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ParTipoSeleccionRepository::class)]
class ParTipoSeleccion
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\OneToMany(mappedBy: 'ParTipoSeleccion', targetEntity: GHVacante::class)]
private Collection $idVacante;
#[ORM\Column(length: 100)]
private ?string $nombre = null;
public function __construct()
{
$this->idVacante = new ArrayCollection();
}
public function __toString() {
return $this->getNombre();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @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);
$idVacante->setParTipoSeleccion($this);
}
return $this;
}
public function removeIdVacante(GHVacante $idVacante): static
{
if ($this->idVacante->removeElement($idVacante)) {
// set the owning side to null (unless already changed)
if ($idVacante->getParTipoSeleccion() === $this) {
$idVacante->setParTipoSeleccion(null);
}
}
return $this;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(string $nombre): static
{
$this->nombre = $nombre;
return $this;
}
}