<?php
namespace App\Core\Entity;
use App\Core\Entity\City;
use App\Core\Entity\InformacionPerfil\ColegioPerfil;
use App\Core\Entity\InformacionPerfil\EmpleoPerfil;
use App\Core\Entity\InformacionPerfil\IdiomaPerfil;
use App\Core\Entity\InformacionPerfil\ProfesionPerfil;
use Symfony\Component\Serializer\Annotation\Groups;
use App\Core\Entity\InformacionPerfil\UniversidadPerfil;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Core\Repository\InformacionPerfilRepository")
*/
class InformacionPerfil
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="text")
* @Groups("informacionPerfil")
*/
private $descripcionPersonal;
/**
* @ORM\ManyToOne(targetEntity="App\Core\Entity\City")
* @ORM\JoinColumn(nullable=true)
* @Groups("informacionPerfil")
*/
private $municipio;
/**
* @ORM\OneToMany(targetEntity=IdiomaPerfil::class, mappedBy="perfil", orphanRemoval=true)
* @Groups("informacionPerfil")
*/
private $idiomaPerfil;
/**
* @ORM\OneToMany(targetEntity=EmpleoPerfil::class, mappedBy="perfil", orphanRemoval=true)
* @Groups("informacionPerfil")
*/
private $empleoPerfil;
/**
* @ORM\OneToMany(targetEntity=ColegioPerfil::class, mappedBy="perfil", orphanRemoval=true)
* @Groups("informacionPerfil")
*/
private $colegioPerfil;
/**
* @ORM\OneToMany(targetEntity=ProfesionPerfil::class, mappedBy="perfil", orphanRemoval=true)
* @Groups("informacionPerfil")
*/
private $profesionPerfil;
/**
* @ORM\OneToMany(targetEntity=UniversidadPerfil::class, mappedBy="perfil", orphanRemoval=true)
* @Groups("informacionPerfil")
*/
private $universidadPerfil;
public function __construct()
{
$this->idiomaPerfil = new ArrayCollection();
$this->empleoPerfil = new ArrayCollection();
$this->colegioPerfil = new ArrayCollection();
$this->profesionPerfil = new ArrayCollection();
$this->universidadPerfil = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getDescripcionPersonal(): ?string
{
return $this->descripcionPersonal;
}
public function setDescripcionPersonal(string $descripcionPersonal): self
{
$this->descripcionPersonal = $descripcionPersonal;
return $this;
}
public function getMunicipio(): ?City
{
return $this->municipio;
}
public function setMunicipio(?City $municipio): self
{
$this->municipio = $municipio;
return $this;
}
/**
* @return Collection|IdiomaPerfil[]
*/
public function getIdiomaPerfil(): Collection
{
return $this->idiomaPerfil;
}
public function addIdiomaPerfil(IdiomaPerfil $idiomaPerfil): self
{
if (!$this->idiomaPerfil->contains($idiomaPerfil)) {
$this->idiomaPerfil[] = $idiomaPerfil;
$idiomaPerfil->setPerfil($this);
}
return $this;
}
public function removeIdiomaPerfil(IdiomaPerfil $idiomaPerfil): self
{
if ($this->idiomaPerfil->removeElement($idiomaPerfil)) {
// set the owning side to null (unless already changed)
if ($idiomaPerfil->getPerfil() === $this) {
$idiomaPerfil->setPerfil(null);
}
}
return $this;
}
/**
* @return Collection|EmpleoPerfil[]
*/
public function getEmpleoPerfil(): Collection
{
return $this->empleoPerfil;
}
public function addEmpleoPerfil(EmpleoPerfil $empleoPerfil): self
{
if (!$this->empleoPerfil->contains($empleoPerfil)) {
$this->empleoPerfil[] = $empleoPerfil;
$empleoPerfil->setPerfil($this);
}
return $this;
}
public function removeEmpleoPerfil(EmpleoPerfil $empleoPerfil): self
{
if ($this->empleoPerfil->removeElement($empleoPerfil)) {
// set the owning side to null (unless already changed)
if ($empleoPerfil->getPerfil() === $this) {
$empleoPerfil->setPerfil(null);
}
}
return $this;
}
/**
* @return Collection|ColegioPerfil[]
*/
public function getColegioPerfil(): Collection
{
return $this->colegioPerfil;
}
public function addColegioPerfil(ColegioPerfil $colegioPerfil): self
{
if (!$this->colegioPerfil->contains($colegioPerfil)) {
$this->colegioPerfil[] = $colegioPerfil;
$colegioPerfil->setPerfil($this);
}
return $this;
}
public function removeColegioPerfil(ColegioPerfil $colegioPerfil): self
{
if ($this->colegioPerfil->removeElement($colegioPerfil)) {
// set the owning side to null (unless already changed)
if ($colegioPerfil->getPerfil() === $this) {
$colegioPerfil->setPerfil(null);
}
}
return $this;
}
/**
* @return Collection|ProfesionPerfil[]
*/
public function getProfesionPerfil(): Collection
{
return $this->profesionPerfil;
}
public function addProfesionPerfil(ProfesionPerfil $profesionPerfil): self
{
if (!$this->profesionPerfil->contains($profesionPerfil)) {
$this->profesionPerfil[] = $profesionPerfil;
$profesionPerfil->setPerfil($this);
}
return $this;
}
public function removeProfesionPerfil(ProfesionPerfil $profesionPerfil): self
{
if ($this->profesionPerfil->removeElement($profesionPerfil)) {
// set the owning side to null (unless already changed)
if ($profesionPerfil->getPerfil() === $this) {
$profesionPerfil->setPerfil(null);
}
}
return $this;
}
/**
* @return Collection|UniversidadPerfil[]
*/
public function getUniversidadPerfil(): Collection
{
return $this->universidadPerfil;
}
public function addUniversidadPerfil(UniversidadPerfil $universidadPerfil): self
{
if (!$this->universidadPerfil->contains($universidadPerfil)) {
$this->universidadPerfil[] = $universidadPerfil;
$universidadPerfil->setPerfil($this);
}
return $this;
}
public function removeUniversidadPerfil(UniversidadPerfil $universidadPerfil): self
{
if ($this->universidadPerfil->removeElement($universidadPerfil)) {
// set the owning side to null (unless already changed)
if ($universidadPerfil->getPerfil() === $this) {
$universidadPerfil->setPerfil(null);
}
}
return $this;
}
}