src/Core/Entity/InformacionPerfil.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Core\Entity;
  3. use App\Core\Entity\City;
  4. use App\Core\Entity\InformacionPerfil\ColegioPerfil;
  5. use App\Core\Entity\InformacionPerfil\EmpleoPerfil;
  6. use App\Core\Entity\InformacionPerfil\IdiomaPerfil;
  7. use App\Core\Entity\InformacionPerfil\ProfesionPerfil;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. use App\Core\Entity\InformacionPerfil\UniversidadPerfil;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use Doctrine\ORM\Mapping as ORM;
  13. /**
  14. * @ORM\Entity(repositoryClass="App\Core\Repository\InformacionPerfilRepository")
  15. */
  16. class InformacionPerfil
  17. {
  18. /**
  19. * @ORM\Id()
  20. * @ORM\GeneratedValue()
  21. * @ORM\Column(type="integer")
  22. */
  23. private $id;
  24. /**
  25. * @ORM\Column(type="text")
  26. * @Groups("informacionPerfil")
  27. */
  28. private $descripcionPersonal;
  29. /**
  30. * @ORM\ManyToOne(targetEntity="App\Core\Entity\City")
  31. * @ORM\JoinColumn(nullable=true)
  32. * @Groups("informacionPerfil")
  33. */
  34. private $municipio;
  35. /**
  36. * @ORM\OneToMany(targetEntity=IdiomaPerfil::class, mappedBy="perfil", orphanRemoval=true)
  37. * @Groups("informacionPerfil")
  38. */
  39. private $idiomaPerfil;
  40. /**
  41. * @ORM\OneToMany(targetEntity=EmpleoPerfil::class, mappedBy="perfil", orphanRemoval=true)
  42. * @Groups("informacionPerfil")
  43. */
  44. private $empleoPerfil;
  45. /**
  46. * @ORM\OneToMany(targetEntity=ColegioPerfil::class, mappedBy="perfil", orphanRemoval=true)
  47. * @Groups("informacionPerfil")
  48. */
  49. private $colegioPerfil;
  50. /**
  51. * @ORM\OneToMany(targetEntity=ProfesionPerfil::class, mappedBy="perfil", orphanRemoval=true)
  52. * @Groups("informacionPerfil")
  53. */
  54. private $profesionPerfil;
  55. /**
  56. * @ORM\OneToMany(targetEntity=UniversidadPerfil::class, mappedBy="perfil", orphanRemoval=true)
  57. * @Groups("informacionPerfil")
  58. */
  59. private $universidadPerfil;
  60. public function __construct()
  61. {
  62. $this->idiomaPerfil = new ArrayCollection();
  63. $this->empleoPerfil = new ArrayCollection();
  64. $this->colegioPerfil = new ArrayCollection();
  65. $this->profesionPerfil = new ArrayCollection();
  66. $this->universidadPerfil = new ArrayCollection();
  67. }
  68. public function getId(): ?int
  69. {
  70. return $this->id;
  71. }
  72. public function getDescripcionPersonal(): ?string
  73. {
  74. return $this->descripcionPersonal;
  75. }
  76. public function setDescripcionPersonal(string $descripcionPersonal): self
  77. {
  78. $this->descripcionPersonal = $descripcionPersonal;
  79. return $this;
  80. }
  81. public function getMunicipio(): ?City
  82. {
  83. return $this->municipio;
  84. }
  85. public function setMunicipio(?City $municipio): self
  86. {
  87. $this->municipio = $municipio;
  88. return $this;
  89. }
  90. /**
  91. * @return Collection|IdiomaPerfil[]
  92. */
  93. public function getIdiomaPerfil(): Collection
  94. {
  95. return $this->idiomaPerfil;
  96. }
  97. public function addIdiomaPerfil(IdiomaPerfil $idiomaPerfil): self
  98. {
  99. if (!$this->idiomaPerfil->contains($idiomaPerfil)) {
  100. $this->idiomaPerfil[] = $idiomaPerfil;
  101. $idiomaPerfil->setPerfil($this);
  102. }
  103. return $this;
  104. }
  105. public function removeIdiomaPerfil(IdiomaPerfil $idiomaPerfil): self
  106. {
  107. if ($this->idiomaPerfil->removeElement($idiomaPerfil)) {
  108. // set the owning side to null (unless already changed)
  109. if ($idiomaPerfil->getPerfil() === $this) {
  110. $idiomaPerfil->setPerfil(null);
  111. }
  112. }
  113. return $this;
  114. }
  115. /**
  116. * @return Collection|EmpleoPerfil[]
  117. */
  118. public function getEmpleoPerfil(): Collection
  119. {
  120. return $this->empleoPerfil;
  121. }
  122. public function addEmpleoPerfil(EmpleoPerfil $empleoPerfil): self
  123. {
  124. if (!$this->empleoPerfil->contains($empleoPerfil)) {
  125. $this->empleoPerfil[] = $empleoPerfil;
  126. $empleoPerfil->setPerfil($this);
  127. }
  128. return $this;
  129. }
  130. public function removeEmpleoPerfil(EmpleoPerfil $empleoPerfil): self
  131. {
  132. if ($this->empleoPerfil->removeElement($empleoPerfil)) {
  133. // set the owning side to null (unless already changed)
  134. if ($empleoPerfil->getPerfil() === $this) {
  135. $empleoPerfil->setPerfil(null);
  136. }
  137. }
  138. return $this;
  139. }
  140. /**
  141. * @return Collection|ColegioPerfil[]
  142. */
  143. public function getColegioPerfil(): Collection
  144. {
  145. return $this->colegioPerfil;
  146. }
  147. public function addColegioPerfil(ColegioPerfil $colegioPerfil): self
  148. {
  149. if (!$this->colegioPerfil->contains($colegioPerfil)) {
  150. $this->colegioPerfil[] = $colegioPerfil;
  151. $colegioPerfil->setPerfil($this);
  152. }
  153. return $this;
  154. }
  155. public function removeColegioPerfil(ColegioPerfil $colegioPerfil): self
  156. {
  157. if ($this->colegioPerfil->removeElement($colegioPerfil)) {
  158. // set the owning side to null (unless already changed)
  159. if ($colegioPerfil->getPerfil() === $this) {
  160. $colegioPerfil->setPerfil(null);
  161. }
  162. }
  163. return $this;
  164. }
  165. /**
  166. * @return Collection|ProfesionPerfil[]
  167. */
  168. public function getProfesionPerfil(): Collection
  169. {
  170. return $this->profesionPerfil;
  171. }
  172. public function addProfesionPerfil(ProfesionPerfil $profesionPerfil): self
  173. {
  174. if (!$this->profesionPerfil->contains($profesionPerfil)) {
  175. $this->profesionPerfil[] = $profesionPerfil;
  176. $profesionPerfil->setPerfil($this);
  177. }
  178. return $this;
  179. }
  180. public function removeProfesionPerfil(ProfesionPerfil $profesionPerfil): self
  181. {
  182. if ($this->profesionPerfil->removeElement($profesionPerfil)) {
  183. // set the owning side to null (unless already changed)
  184. if ($profesionPerfil->getPerfil() === $this) {
  185. $profesionPerfil->setPerfil(null);
  186. }
  187. }
  188. return $this;
  189. }
  190. /**
  191. * @return Collection|UniversidadPerfil[]
  192. */
  193. public function getUniversidadPerfil(): Collection
  194. {
  195. return $this->universidadPerfil;
  196. }
  197. public function addUniversidadPerfil(UniversidadPerfil $universidadPerfil): self
  198. {
  199. if (!$this->universidadPerfil->contains($universidadPerfil)) {
  200. $this->universidadPerfil[] = $universidadPerfil;
  201. $universidadPerfil->setPerfil($this);
  202. }
  203. return $this;
  204. }
  205. public function removeUniversidadPerfil(UniversidadPerfil $universidadPerfil): self
  206. {
  207. if ($this->universidadPerfil->removeElement($universidadPerfil)) {
  208. // set the owning side to null (unless already changed)
  209. if ($universidadPerfil->getPerfil() === $this) {
  210. $universidadPerfil->setPerfil(null);
  211. }
  212. }
  213. return $this;
  214. }
  215. }