src/Entity/ModuleItem.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ModuleItemRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JMS\Serializer\Annotation as Serializer;
  6. /**
  7. * @ORM\Entity(repositoryClass=ModuleItemRepository::class)
  8. * @Serializer\ExclusionPolicy("ALL")
  9. */
  10. class ModuleItem extends BaseEntity
  11. {
  12. /**
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\ManyToOne(targetEntity=Course::class, inversedBy="moduleItems")
  20. * @Serializer\Expose
  21. * @Serializer\Groups({"module_detail"})
  22. */
  23. private $course;
  24. /**
  25. * @ORM\ManyToOne(targetEntity=Quiz::class, inversedBy="moduleItems")
  26. * @Serializer\Expose
  27. * @Serializer\Groups({"module_detail"})
  28. */
  29. private $quiz;
  30. /**
  31. * @ORM\ManyToOne(targetEntity=Module::class, inversedBy="moduleItems")
  32. */
  33. private $module;
  34. /**
  35. * @ORM\Column(type="integer")
  36. */
  37. private $itemOrder = 100;
  38. /**
  39. * @ORM\Column(type="string", length=255)
  40. * @Serializer\Expose
  41. * @Serializer\Groups({"module_detail"})
  42. */
  43. private $type;
  44. /**
  45. * @ORM\ManyToOne(targetEntity=Live::class, inversedBy="moduleItems")
  46. * @Serializer\Expose
  47. * @Serializer\Groups({"module_detail"})
  48. */
  49. private $live;
  50. public function getId(): ?int
  51. {
  52. return $this->id;
  53. }
  54. public function getCourse(): ?Course
  55. {
  56. return $this->course;
  57. }
  58. public function setCourse(?Course $course): self
  59. {
  60. $this->course = $course;
  61. return $this;
  62. }
  63. public function getQuiz(): ?Quiz
  64. {
  65. return $this->quiz;
  66. }
  67. public function setQuiz(?Quiz $quiz): self
  68. {
  69. $this->quiz = $quiz;
  70. return $this;
  71. }
  72. public function getModule(): ?Module
  73. {
  74. return $this->module;
  75. }
  76. public function setModule(?Module $module): self
  77. {
  78. $this->module = $module;
  79. return $this;
  80. }
  81. public function getItemOrder(): ?int
  82. {
  83. return $this->itemOrder;
  84. }
  85. public function setItemOrder(int $itemOrder): self
  86. {
  87. $this->itemOrder = $itemOrder;
  88. return $this;
  89. }
  90. public function getType(): ?string
  91. {
  92. return $this->type;
  93. }
  94. public function setType(string $type): self
  95. {
  96. $this->type = $type;
  97. return $this;
  98. }
  99. public function getLive(): ?Live
  100. {
  101. return $this->live;
  102. }
  103. public function setLive(?Live $live): self
  104. {
  105. $this->live = $live;
  106. return $this;
  107. }
  108. }