src/Core/Entity/InformacionPerfil/ProfesionPerfil.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Core\Entity\InformacionPerfil;
  3. use App\Core\Entity\InformacionPerfil;
  4. use App\Core\Repository\InformacionPerfil\ProfesionPerfilRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. /**
  8. * @ORM\Entity(repositoryClass=ProfesionPerfilRepository::class)
  9. */
  10. class ProfesionPerfil
  11. {
  12. const JSON_FIELDS = ['id', 'profesion' => Profesion::JSON_FIELDS, 'perfil' => ['id']];
  13. /**
  14. * @ORM\Id
  15. * @ORM\GeneratedValue
  16. * @ORM\Column(type="integer")
  17. * @Groups("profesionPerfil")
  18. */
  19. private $id;
  20. /**
  21. * @ORM\ManyToOne(targetEntity=Profesion::class)
  22. * @ORM\JoinColumn(nullable=false)
  23. * @Groups("profesionPerfil")
  24. */
  25. private $profesion;
  26. /**
  27. * @ORM\ManyToOne(targetEntity=InformacionPerfil::class, inversedBy="profesionPerfil")
  28. * @ORM\JoinColumn(nullable=false)
  29. */
  30. private $perfil;
  31. public function getId(): ?int
  32. {
  33. return $this->id;
  34. }
  35. public function getProfesion(): ?Profesion
  36. {
  37. return $this->profesion;
  38. }
  39. public function setProfesion(?Profesion $profesion): self
  40. {
  41. $this->profesion = $profesion;
  42. return $this;
  43. }
  44. public function getPerfil(): ?InformacionPerfil
  45. {
  46. return $this->perfil;
  47. }
  48. public function setPerfil(?InformacionPerfil $perfil): self
  49. {
  50. $this->perfil = $perfil;
  51. return $this;
  52. }
  53. }