src/Core/Entity/Institucion/DirectorInstitucion.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Core\Entity\Institucion;
  3. use App\Core\Entity\Institucion\Director;
  4. use App\Core\Entity\Institucion\Institucion;
  5. use App\Core\Repository\Institucion\DirectorInstitucionRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=DirectorInstitucionRepository::class)
  9. */
  10. class DirectorInstitucion
  11. {
  12. /**
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\ManyToOne(targetEntity=Director::class, inversedBy="directorInstituciones")
  20. * @ORM\JoinColumn(nullable=false)
  21. */
  22. private $director;
  23. /**
  24. * @ORM\ManyToOne(targetEntity=Institucion::class, inversedBy="directoresInstitucion")
  25. * @ORM\JoinColumn(nullable=false)
  26. */
  27. private $institucion;
  28. public function getId(): ?int
  29. {
  30. return $this->id;
  31. }
  32. public function getDirector(): ?Director
  33. {
  34. return $this->director;
  35. }
  36. public function setDirector(?Director $director): self
  37. {
  38. $this->director = $director;
  39. return $this;
  40. }
  41. public function getInstitucion(): ?Institucion
  42. {
  43. return $this->institucion;
  44. }
  45. public function setInstitucion(?Institucion $institucion): self
  46. {
  47. $this->institucion = $institucion;
  48. return $this;
  49. }
  50. }