src/Core/Entity/InformacionPerfil/ColegioPerfil.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\ColegioPerfilRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. /**
  8. * @ORM\Entity(repositoryClass=ColegioPerfilRepository::class)
  9. */
  10. class ColegioPerfil
  11. {
  12. const JSON_FIELDS = ['id', 'colegio' => Colegio::JSON_FIELDS, 'perfil' => ['id']];
  13. /**
  14. * @ORM\Id
  15. * @ORM\GeneratedValue
  16. * @ORM\Column(type="integer")
  17. * @Groups("colegioPerfil")
  18. */
  19. private $id;
  20. /**
  21. * @ORM\ManyToOne(targetEntity=Colegio::class)
  22. * @ORM\JoinColumn(nullable=false)
  23. * @Groups("colegioPerfil")
  24. */
  25. private $colegio;
  26. /**
  27. * @ORM\ManyToOne(targetEntity=InformacionPerfil::class, inversedBy="colegioPerfil")
  28. * @ORM\JoinColumn(nullable=false)
  29. */
  30. private $perfil;
  31. public function getId(): ?int
  32. {
  33. return $this->id;
  34. }
  35. public function getColegio(): ?Colegio
  36. {
  37. return $this->colegio;
  38. }
  39. public function setColegio(?Colegio $colegio): self
  40. {
  41. $this->colegio = $colegio;
  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. }