src/Core/Entity/CategoriaCurso.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Core\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity(repositoryClass="App\Core\Repository\CategoriaCursoRepository")
  6. */
  7. class CategoriaCurso
  8. {
  9. /**
  10. * @ORM\Id()
  11. * @ORM\GeneratedValue()
  12. * @ORM\Column(type="integer")
  13. */
  14. private $id;
  15. /**
  16. * @ORM\ManyToOne(targetEntity="App\Core\Entity\Categoria", inversedBy="cursosCategoria")
  17. * @ORM\JoinColumn(nullable=false)
  18. */
  19. private $categoria;
  20. /**
  21. * @ORM\ManyToOne(targetEntity="App\Core\Entity\Curso", inversedBy="cursoCategorias")
  22. * @ORM\JoinColumn(nullable=false)
  23. */
  24. private $curso;
  25. public function getId(): ?int
  26. {
  27. return $this->id;
  28. }
  29. public function getCategoria(): ?Categoria
  30. {
  31. return $this->categoria;
  32. }
  33. public function setCategoria(?Categoria $categoria): self
  34. {
  35. $this->categoria = $categoria;
  36. return $this;
  37. }
  38. public function getCurso(): ?Curso
  39. {
  40. return $this->curso;
  41. }
  42. public function setCurso(?Curso $curso): self
  43. {
  44. $this->curso = $curso;
  45. return $this;
  46. }
  47. }