src/Entity/OtrosContactosEmergencia.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OtrosContactosEmergenciaRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=OtrosContactosEmergenciaRepository::class)
  9. */
  10. class OtrosContactosEmergencia
  11. {
  12. /**
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\Column(type="string", length=255, nullable=true)
  20. */
  21. private $nombre;
  22. /**
  23. * @ORM\Column(type="string", length=255, nullable=true)
  24. */
  25. private $email;
  26. /**
  27. * @ORM\Column(type="string", length=255, nullable=true)
  28. */
  29. private $telefono;
  30. /**
  31. * @ORM\Column(type="string", length=255, nullable=true)
  32. */
  33. private $parentesco;
  34. /**
  35. * @ORM\ManyToMany(targetEntity=FichaEstudiantil::class, inversedBy="otrosContactosEmergencias", orphanRemoval=true)
  36. */
  37. private $ficha;
  38. public function __construct()
  39. {
  40. $this->ficha = new ArrayCollection();
  41. }
  42. public function getId(): ?int
  43. {
  44. return $this->id;
  45. }
  46. public function getNombre(): ?string
  47. {
  48. return $this->nombre;
  49. }
  50. public function setNombre(?string $nombre): self
  51. {
  52. $this->nombre = $nombre;
  53. return $this;
  54. }
  55. public function getEmail(): ?string
  56. {
  57. return $this->email;
  58. }
  59. public function setEmail(?string $email): self
  60. {
  61. $this->email = $email;
  62. return $this;
  63. }
  64. public function getTelefono(): ?string
  65. {
  66. return $this->telefono;
  67. }
  68. public function setTelefono(?string $telefono): self
  69. {
  70. $this->telefono = $telefono;
  71. return $this;
  72. }
  73. public function getParentesco(): ?string
  74. {
  75. return $this->parentesco;
  76. }
  77. public function setParentesco(?string $parentesco): self
  78. {
  79. $this->parentesco = $parentesco;
  80. return $this;
  81. }
  82. /**
  83. * @return Collection<int, FichaEstudiantil>
  84. */
  85. public function getFicha(): Collection
  86. {
  87. return $this->ficha;
  88. }
  89. public function addFicha(FichaEstudiantil $ficha): self
  90. {
  91. if (!$this->ficha->contains($ficha)) {
  92. $this->ficha[] = $ficha;
  93. }
  94. return $this;
  95. }
  96. public function removeFicha(FichaEstudiantil $ficha): self
  97. {
  98. $this->ficha->removeElement($ficha);
  99. return $this;
  100. }
  101. }