<?php
namespace App\Entity;
use App\Repository\OtrosContactosEmergenciaRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=OtrosContactosEmergenciaRepository::class)
*/
class OtrosContactosEmergencia
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nombre;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $telefono;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $parentesco;
/**
* @ORM\ManyToMany(targetEntity=FichaEstudiantil::class, inversedBy="otrosContactosEmergencias", orphanRemoval=true)
*/
private $ficha;
public function __construct()
{
$this->ficha = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(?string $nombre): self
{
$this->nombre = $nombre;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getTelefono(): ?string
{
return $this->telefono;
}
public function setTelefono(?string $telefono): self
{
$this->telefono = $telefono;
return $this;
}
public function getParentesco(): ?string
{
return $this->parentesco;
}
public function setParentesco(?string $parentesco): self
{
$this->parentesco = $parentesco;
return $this;
}
/**
* @return Collection<int, FichaEstudiantil>
*/
public function getFicha(): Collection
{
return $this->ficha;
}
public function addFicha(FichaEstudiantil $ficha): self
{
if (!$this->ficha->contains($ficha)) {
$this->ficha[] = $ficha;
}
return $this;
}
public function removeFicha(FichaEstudiantil $ficha): self
{
$this->ficha->removeElement($ficha);
return $this;
}
}