<?phpnamespace App\Entity;use App\Repository\ParTenenciaResidenciaRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParTenenciaResidenciaRepository::class)]class ParTenenciaResidencia{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 100)] private ?string $nombre = null; #[ORM\OneToMany(mappedBy: 'tenenciaResidencia', targetEntity: GHEntrevista::class)] private Collection $entrevista; #[ORM\OneToMany(mappedBy: 'tenenciaResidencia', targetEntity: TerPersona::class)] private Collection $persona; public function __construct() { $this->entrevista = new ArrayCollection(); $this->persona = new ArrayCollection(); } public function __toString() { return $this->getNombre(); } public function getId(): ?int { return $this->id; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(string $nombre): static { $this->nombre = $nombre; return $this; } /** * @return Collection<int, GHEntrevista> */ public function getEntrevista(): Collection { return $this->entrevista; } public function addEntrevistum(GHEntrevista $idEntrevistum): static { if (!$this->entrevista->contains($idEntrevistum)) { $this->entrevista->add($idEntrevistum); $idEntrevistum->setTenenciaResidencia($this); } return $this; } public function removeEntrevistum(GHEntrevista $idEntrevistum): static { if ($this->entrevista->removeElement($idEntrevistum)) { // set the owning side to null (unless already changed) if ($idEntrevistum->getTenenciaResidencia() === $this) { $idEntrevistum->setTenenciaResidencia(null); } } return $this; } /** * @return Collection<int, TerPersona> */ public function getPersona(): Collection { return $this->persona; } public function addPersona(TerPersona $persona): static { if (!$this->persona->contains($persona)) { $this->persona->add($persona); $persona->setTenenciaResidencia($this); } return $this; } public function removePersona(TerPersona $persona): static { if ($this->persona->removeElement($persona)) { // set the owning side to null (unless already changed) if ($persona->getTenenciaResidencia() === $this) { $persona->setTenenciaResidencia(null); } } return $this; }}