src/Entity/Core/SelfStudy/SelfStudyExamQuiz.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core\SelfStudy;
  3. use App\Entity\Core\Quiz\Quiz;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Table('self_study_exam_quiz')]
  7. #[ORM\Entity]
  8. class SelfStudyExamQuiz
  9. {
  10. /**
  11. * @var ?int
  12. */
  13. #[ORM\Column(name: 'id', type: 'integer')]
  14. #[ORM\Id]
  15. #[ORM\GeneratedValue(strategy: 'AUTO')]
  16. private ?int $id = null;
  17. /**
  18. * @var string
  19. */
  20. #[ORM\Column(name: 'display_name', type: 'string', length: 255)]
  21. private string $displayName;
  22. /**
  23. * @var ?Quiz
  24. */
  25. #[ORM\JoinColumn(name: 'quiz', referencedColumnName: 'id')]
  26. #[ORM\ManyToOne(targetEntity: Quiz::class)]
  27. private ?Quiz $quiz;
  28. /**
  29. * @var ?SelfStudy
  30. */
  31. #[ORM\JoinColumn(name: 'self_study_id', referencedColumnName: 'id')]
  32. #[ORM\ManyToOne(targetEntity: SelfStudy::class, inversedBy: 'selfStudyExamQuizzes')]
  33. private ?SelfStudy $selfStudy;
  34. /**
  35. * @var int $totalDuration
  36. */
  37. #[ORM\Column(name: 'total_duration', type: 'integer')]
  38. private int $totalDuration;
  39. /**
  40. * @var int $durationWithoutCAS
  41. */
  42. #[ORM\Column(name: 'duration_without_cas', type: 'integer')]
  43. private int $durationWithoutCAS;
  44. private ArrayCollection $selfStudyCategories;
  45. private ArrayCollection $typicalExamProblems;
  46. public function __construct()
  47. {
  48. $this->selfStudyCategories = new ArrayCollection();
  49. $this->typicalExamProblems = new ArrayCollection();
  50. }
  51. public function getId(): ?int
  52. {
  53. return $this->id;
  54. }
  55. public function getDisplayName(): string
  56. {
  57. return $this->displayName;
  58. }
  59. public function setDisplayName(string $displayName): void
  60. {
  61. $this->displayName = $displayName;
  62. }
  63. public function getQuiz(): ?Quiz
  64. {
  65. return $this->quiz;
  66. }
  67. public function setQuiz(Quiz $quiz): void
  68. {
  69. $this->quiz = $quiz;
  70. }
  71. public function getTotalDuration(): int
  72. {
  73. return $this->totalDuration;
  74. }
  75. public function setTotalDuration(int $totalDuration): void
  76. {
  77. $this->totalDuration = $totalDuration;
  78. }
  79. public function getDurationWithoutCAS(): int
  80. {
  81. return $this->durationWithoutCAS;
  82. }
  83. public function setDurationWithoutCAS(int $durationWithoutCAS): void
  84. {
  85. $this->durationWithoutCAS = $durationWithoutCAS;
  86. }
  87. public function getSelfStudy(): ?SelfStudy
  88. {
  89. return $this->selfStudy;
  90. }
  91. public function setSelfStudy(SelfStudy $selfStudy): void
  92. {
  93. $this->selfStudy = $selfStudy;
  94. }
  95. }