src/Entity/QuizView.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\QuizViewRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=QuizViewRepository::class)
  7. */
  8. class QuizView extends BaseEntity
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\ManyToOne(targetEntity=Quiz::class, inversedBy="quizViews")
  18. * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  19. */
  20. private $quiz;
  21. public function getId(): ?int
  22. {
  23. return $this->id;
  24. }
  25. public function getQuiz(): ?Quiz
  26. {
  27. return $this->quiz;
  28. }
  29. public function setQuiz(?Quiz $quiz): self
  30. {
  31. $this->quiz = $quiz;
  32. return $this;
  33. }
  34. }