src/Entity/ModuleParticipation.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ModuleParticipationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JMS\Serializer\Annotation as Serializer;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. /**
  8. * @ORM\Entity(repositoryClass=ModuleParticipationRepository::class)
  9. * @Serializer\ExclusionPolicy("ALL")
  10. * @ORM\AssociationOverrides({
  11. * @ORM\AssociationOverride(
  12. * name="createdBy",
  13. * inversedBy="moduleParticipations",
  14. * joinColumns={@ORM\JoinColumn(name="created_by", referencedColumnName="id", nullable=true, onDelete="CASCADE")}
  15. * )
  16. * })
  17. */
  18. class ModuleParticipation extends BaseEntity
  19. {
  20. /**
  21. * @ORM\Id
  22. * @ORM\GeneratedValue
  23. * @ORM\Column(type="integer")
  24. */
  25. private $id;
  26. /**
  27. * @ORM\ManyToOne(targetEntity=Module::class, inversedBy="moduleParticipations")
  28. * @Serializer\Expose
  29. * @Serializer\Groups({"participation"})
  30. */
  31. private $module;
  32. /**
  33. * @ORM\ManyToOne(targetEntity=Course::class, inversedBy="moduleParticipations")
  34. * @Serializer\Expose
  35. * @Serializer\Groups({"course_participation"})
  36. */
  37. private $course;
  38. /**
  39. * @ORM\ManyToOne(targetEntity=Quiz::class, inversedBy="moduleParticipations")
  40. * @Serializer\Expose
  41. * @Serializer\Groups({"quiz_participation"})
  42. */
  43. private $quiz;
  44. /**
  45. * @ORM\ManyToOne(targetEntity=Live::class, inversedBy="moduleParticipations")
  46. * @Serializer\Expose
  47. * @Serializer\Groups({"live_participation"})
  48. */
  49. private $live;
  50. /**
  51. * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  52. * @Serializer\Expose
  53. * @Serializer\Groups({"quiz_participation"})
  54. */
  55. private $quizScore;
  56. /**
  57. * @ORM\ManyToOne(targetEntity=Program::class, inversedBy="moduleParticipations")
  58. * @Serializer\Expose
  59. * @Serializer\Groups({"participation"})
  60. */
  61. private $program;
  62. /**
  63. * @ORM\Column(type="datetime", nullable=true)
  64. */
  65. private $automaticEndAt;
  66. /**
  67. * @ORM\Column(type="boolean", nullable=true)
  68. */
  69. private $isNotePublished = true;
  70. /**
  71. * @ORM\Column(type="string", length=255, nullable=true)
  72. * @Serializer\Expose
  73. * @Serializer\Groups({"course_participation", "quiz_participation"})
  74. */
  75. private $quizCertificate;
  76. /**
  77. * @ORM\Column(type="string", length=255, nullable=true)
  78. * @Serializer\Expose
  79. * @Serializer\Groups({"course_participation", "quiz_participation"})
  80. */
  81. private $quizBadge;
  82. /**
  83. * @ORM\Column(type="string", length=255, nullable=true)
  84. * @Serializer\Expose
  85. * @Serializer\Groups({"course_participation", "quiz_participation"})
  86. */
  87. private $quizCertificateLabel;
  88. /**
  89. * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  90. */
  91. private $customAnswerNote;
  92. /**
  93. * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  94. */
  95. private $fileAnswerNote;
  96. /**
  97. * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  98. * @Serializer\Expose
  99. * @Serializer\Groups({"course_participation", "quiz_participation"})
  100. */
  101. private $quizTotalNote;
  102. /**
  103. * @ORM\Column(type="datetime", nullable=true)
  104. */
  105. private $startAt;
  106. /**
  107. * @ORM\Column(type="datetime", nullable=true)
  108. */
  109. private $endAt;
  110. /**
  111. * @ORM\Column(type="string", length=255, nullable=true)
  112. * @Serializer\Expose
  113. * @Serializer\Groups({"course_participation", "quiz_participation"})
  114. */
  115. private $quizBadgeLabel;
  116. /**
  117. * @ORM\Column(type="integer", nullable=true)
  118. */
  119. private $customAnswerCount;
  120. /**
  121. * @ORM\Column(type="json", nullable=true)
  122. */
  123. private $quizQuestionIds = [];
  124. public function getId(): ?int
  125. {
  126. return $this->id;
  127. }
  128. public function getModule(): ?Module
  129. {
  130. return $this->module;
  131. }
  132. public function setModule(?Module $module): self
  133. {
  134. $this->module = $module;
  135. return $this;
  136. }
  137. public function getCourse(): ?Course
  138. {
  139. return $this->course;
  140. }
  141. public function setCourse(?Course $course): self
  142. {
  143. $this->course = $course;
  144. return $this;
  145. }
  146. public function getQuiz(): ?Quiz
  147. {
  148. return $this->quiz;
  149. }
  150. public function setQuiz(?Quiz $quiz): self
  151. {
  152. $this->quiz = $quiz;
  153. return $this;
  154. }
  155. public function getLive(): ?Live
  156. {
  157. return $this->live;
  158. }
  159. public function setLive(?Live $live): self
  160. {
  161. $this->live = $live;
  162. return $this;
  163. }
  164. public function getQuizScore(): ?string
  165. {
  166. return $this->quizScore;
  167. }
  168. public function setQuizScore(?string $quizScore): self
  169. {
  170. $this->quizScore = $quizScore;
  171. return $this;
  172. }
  173. public function getProgram(): ?Program
  174. {
  175. return $this->program;
  176. }
  177. public function setProgram(?Program $program): self
  178. {
  179. $this->program = $program;
  180. return $this;
  181. }
  182. public function getAutomaticEndAt(): ?\DateTimeInterface
  183. {
  184. return $this->automaticEndAt;
  185. }
  186. public function setAutomaticEndAt(?\DateTimeInterface $automaticEndAt): self
  187. {
  188. $this->automaticEndAt = $automaticEndAt;
  189. return $this;
  190. }
  191. public function isIsNotePublished(): ?bool
  192. {
  193. return $this->isNotePublished;
  194. }
  195. public function setIsNotePublished(?bool $isNotePublished): self
  196. {
  197. $this->isNotePublished = $isNotePublished;
  198. return $this;
  199. }
  200. public function getQuizCertificate(): ?string
  201. {
  202. return $this->quizCertificate;
  203. }
  204. public function setQuizCertificate(?string $quizCertificate): self
  205. {
  206. $this->quizCertificate = $quizCertificate;
  207. return $this;
  208. }
  209. public function getQuizBadge(): ?string
  210. {
  211. return $this->quizBadge;
  212. }
  213. public function setQuizBadge(?string $quizBadge): self
  214. {
  215. $this->quizBadge = $quizBadge;
  216. return $this;
  217. }
  218. public function getQuizCertificateLabel(): ?string
  219. {
  220. return $this->quizCertificateLabel;
  221. }
  222. public function setQuizCertificateLabel(?string $quizCertificateLabel): self
  223. {
  224. $this->quizCertificateLabel = $quizCertificateLabel;
  225. return $this;
  226. }
  227. public function getCustomAnswerNote(): ?string
  228. {
  229. return $this->customAnswerNote;
  230. }
  231. public function setCustomAnswerNote(?string $customAnswerNote): self
  232. {
  233. $this->customAnswerNote = $customAnswerNote;
  234. return $this;
  235. }
  236. public function getFileAnswerNote(): ?string
  237. {
  238. return $this->fileAnswerNote;
  239. }
  240. public function setFileAnswerNote(?string $fileAnswerNote): self
  241. {
  242. $this->fileAnswerNote = $fileAnswerNote;
  243. return $this;
  244. }
  245. public function getQuizTotalNote(): ?string
  246. {
  247. return $this->quizTotalNote;
  248. }
  249. public function setQuizTotalNote(?string $quizTotalNote): self
  250. {
  251. $this->quizTotalNote = $quizTotalNote;
  252. return $this;
  253. }
  254. public function getStartAt(): ?\DateTimeInterface
  255. {
  256. return $this->startAt;
  257. }
  258. public function setStartAt(?\DateTimeInterface $startAt): self
  259. {
  260. $this->startAt = $startAt;
  261. return $this;
  262. }
  263. public function getEndAt(): ?\DateTimeInterface
  264. {
  265. return $this->endAt;
  266. }
  267. public function setEndAt(?\DateTimeInterface $endAt): self
  268. {
  269. $this->endAt = $endAt;
  270. return $this;
  271. }
  272. public function getQuizBadgeLabel(): ?string
  273. {
  274. return $this->quizBadgeLabel;
  275. }
  276. public function setQuizBadgeLabel(?string $quizBadgeLabel): self
  277. {
  278. $this->quizBadgeLabel = $quizBadgeLabel;
  279. return $this;
  280. }
  281. public function getCustomAnswerCount(): ?int
  282. {
  283. return $this->customAnswerCount;
  284. }
  285. public function setCustomAnswerCount(?int $customAnswerCount): self
  286. {
  287. $this->customAnswerCount = $customAnswerCount;
  288. return $this;
  289. }
  290. public function getQuizQuestionIds(): ?array
  291. {
  292. return $this->quizQuestionIds;
  293. }
  294. public function setQuizQuestionIds(?array $quizQuestionIds): self
  295. {
  296. $this->quizQuestionIds = $quizQuestionIds;
  297. return $this;
  298. }
  299. }