src/Entity/TrainingReport.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TrainingReportRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=TrainingReportRepository::class)
  9. */
  10. class TrainingReport
  11. {
  12. /**
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="trainingReports")
  20. * @ORM\JoinColumn(nullable=false)
  21. */
  22. private $user;
  23. /**
  24. * @ORM\ManyToOne(targetEntity=Child::class, inversedBy="trainingReports")
  25. */
  26. private $participant;
  27. /**
  28. * @ORM\ManyToOne(targetEntity=Subject::class, inversedBy="trainingReports")
  29. * @ORM\JoinColumn(nullable=false)
  30. */
  31. private $program;
  32. /**
  33. * @ORM\ManyToOne(targetEntity=SubjectLevel::class, inversedBy="trainingReports")
  34. */
  35. private $level;
  36. /**
  37. * @ORM\ManyToOne(targetEntity=SubscriptionOrder::class, inversedBy="trainingReports")
  38. */
  39. private $relatedToSubscription;
  40. /**
  41. * @ORM\ManyToOne(targetEntity=SessionOrder::class, inversedBy="trainingReports")
  42. */
  43. private $relatedToGroupCourse;
  44. /**
  45. * @ORM\Column(type="datetime")
  46. */
  47. private $askAt;
  48. /**
  49. * @ORM\Column(type="boolean", options={"default":false})
  50. */
  51. private $hadMidExam;
  52. /**
  53. * @ORM\Column(type="date", nullable=true)
  54. */
  55. private $deadLineForMid;
  56. /**
  57. * @ORM\Column(type="decimal", precision=25, scale=15, nullable=true)
  58. */
  59. private $midGradeWriting;
  60. /**
  61. * @ORM\Column(type="date", nullable=true)
  62. */
  63. private $deadLineForEnd;
  64. /**
  65. * @ORM\Column(type="decimal", precision=25, scale=15, nullable=true)
  66. */
  67. private $endGradeWriting;
  68. /**
  69. * @ORM\Column(type="decimal", precision=25, scale=15, nullable=true)
  70. */
  71. private $endGradeSpeaking;
  72. /**
  73. * @ORM\Column(type="decimal", precision=25, scale=15, nullable=true)
  74. */
  75. private $finalGrade;
  76. /**
  77. * @ORM\Column(type="string", length=50, nullable=true)
  78. */
  79. private $mention;
  80. /**
  81. * @ORM\Column(type="text", nullable=true)
  82. */
  83. private $comments;
  84. /**
  85. * @ORM\Column(type="boolean", options={"default":false})
  86. */
  87. private $isReadyToSend;
  88. /**
  89. * @ORM\ManyToOne(targetEntity=Teacher::class, inversedBy="trainingReports")
  90. */
  91. private $teacher;
  92. /**
  93. * @ORM\OneToMany(targetEntity=Exam::class, mappedBy="relatedToTrainingReport")
  94. */
  95. private $exams;
  96. /**
  97. * @ORM\Column(type="string", length=255, nullable=true)
  98. */
  99. private $updateBy;
  100. /**
  101. * @ORM\Column(type="boolean", nullable=true)
  102. */
  103. private $isSent = false;
  104. /**
  105. * @ORM\Column(type="datetime_immutable", nullable=true)
  106. */
  107. private $sentAt;
  108. public function __construct()
  109. {
  110. $this->exams = new ArrayCollection();
  111. }
  112. public function getId(): ?int
  113. {
  114. return $this->id;
  115. }
  116. public function getUser(): ?User
  117. {
  118. return $this->user;
  119. }
  120. public function setUser(?User $user): self
  121. {
  122. $this->user = $user;
  123. return $this;
  124. }
  125. public function getParticipant(): ?Child
  126. {
  127. return $this->participant;
  128. }
  129. public function setParticipant(?Child $participant): self
  130. {
  131. $this->participant = $participant;
  132. return $this;
  133. }
  134. public function getProgram(): ?Subject
  135. {
  136. return $this->program;
  137. }
  138. public function setProgram(?Subject $program): self
  139. {
  140. $this->program = $program;
  141. return $this;
  142. }
  143. public function getLevel(): ?SubjectLevel
  144. {
  145. return $this->level;
  146. }
  147. public function setLevel(?SubjectLevel $level): self
  148. {
  149. $this->level = $level;
  150. return $this;
  151. }
  152. public function getRelatedToSubscription(): ?SubscriptionOrder
  153. {
  154. return $this->relatedToSubscription;
  155. }
  156. public function setRelatedToSubscription(?SubscriptionOrder $relatedToSubscription): self
  157. {
  158. $this->relatedToSubscription = $relatedToSubscription;
  159. return $this;
  160. }
  161. public function getRelatedToGroupCourse(): ?SessionOrder
  162. {
  163. return $this->relatedToGroupCourse;
  164. }
  165. public function setRelatedToGroupCourse(?SessionOrder $relatedToGroupCourse): self
  166. {
  167. $this->relatedToGroupCourse = $relatedToGroupCourse;
  168. return $this;
  169. }
  170. public function getAskAt(): ?\DateTimeInterface
  171. {
  172. return $this->askAt;
  173. }
  174. public function setAskAt(\DateTimeInterface $askAt): self
  175. {
  176. $this->askAt = $askAt;
  177. return $this;
  178. }
  179. public function getHadMidExam(): ?bool
  180. {
  181. return $this->hadMidExam;
  182. }
  183. public function setHadMidExam(bool $hadMidExam): self
  184. {
  185. $this->hadMidExam = $hadMidExam;
  186. return $this;
  187. }
  188. public function getDeadLineForMid(): ?\DateTimeInterface
  189. {
  190. return $this->deadLineForMid;
  191. }
  192. public function setDeadLineForMid(?\DateTimeInterface $deadLineForMid): self
  193. {
  194. $this->deadLineForMid = $deadLineForMid;
  195. return $this;
  196. }
  197. public function getMidGradeWriting(): ?float
  198. {
  199. return $this->midGradeWriting;
  200. }
  201. public function setMidGradeWriting(?float $midGradeWriting): self
  202. {
  203. if ($midGradeWriting !== null) {
  204. $midGradeWriting = round($midGradeWriting, 2);
  205. }
  206. $this->midGradeWriting = $midGradeWriting;
  207. return $this;
  208. }
  209. public function getDeadLineForEnd(): ?\DateTimeInterface
  210. {
  211. return $this->deadLineForEnd;
  212. }
  213. public function setDeadLineForEnd(?\DateTimeInterface $deadLineForEnd): self
  214. {
  215. $this->deadLineForEnd = $deadLineForEnd;
  216. return $this;
  217. }
  218. public function getEndGradeWriting(): ?float
  219. {
  220. return $this->endGradeWriting;
  221. }
  222. public function setEndGradeWriting(?float $endGradeWriting): self
  223. {
  224. if($endGradeWriting !== null) {
  225. $endGradeWriting = round($endGradeWriting, 2);
  226. }
  227. $this->endGradeWriting = $endGradeWriting;
  228. return $this;
  229. }
  230. public function getEndGradeSpeaking(): ?float
  231. {
  232. return $this->endGradeSpeaking;
  233. }
  234. public function setEndGradeSpeaking(?float $endGradeSpeaking): self
  235. {
  236. if($endGradeSpeaking !== null) {
  237. $endGradeSpeaking = round($endGradeSpeaking, 2);
  238. }
  239. $this->endGradeSpeaking = $endGradeSpeaking;
  240. return $this;
  241. }
  242. public function getFinalGrade(): ?float
  243. {
  244. return $this->finalGrade;
  245. }
  246. public function setFinalGrade(?float $finalGrade): self
  247. {
  248. $this->finalGrade = round($finalGrade, 2);
  249. return $this;
  250. }
  251. public function getMention(): ?string
  252. {
  253. return $this->mention;
  254. }
  255. public function setMention(?string $mention): self
  256. {
  257. $this->mention = $mention;
  258. return $this;
  259. }
  260. public function getComments(): ?string
  261. {
  262. return $this->comments;
  263. }
  264. public function setComments(?string $comments): self
  265. {
  266. $this->comments = $comments;
  267. return $this;
  268. }
  269. public function getIsReadyToSend(): ?bool
  270. {
  271. return $this->isReadyToSend;
  272. }
  273. public function setIsReadyToSend(bool $isReadyToSend): self
  274. {
  275. $this->isReadyToSend = $isReadyToSend;
  276. return $this;
  277. }
  278. public function getTeacher(): ?Teacher
  279. {
  280. return $this->teacher;
  281. }
  282. public function setTeacher(?Teacher $teacher): self
  283. {
  284. $this->teacher = $teacher;
  285. return $this;
  286. }
  287. /**
  288. * @return Collection|Exam[]
  289. */
  290. public function getExams(): Collection
  291. {
  292. return $this->exams;
  293. }
  294. public function addExam(Exam $exam): self
  295. {
  296. if ( ! $this->exams->contains($exam)) {
  297. $this->exams[] = $exam;
  298. $exam->setRelatedToTrainingReport($this);
  299. }
  300. return $this;
  301. }
  302. public function removeExam(Exam $exam): self
  303. {
  304. if ($this->exams->removeElement($exam)) {
  305. // set the owning side to null (unless already changed)
  306. if ($exam->getRelatedToTrainingReport() === $this) {
  307. $exam->setRelatedToTrainingReport(null);
  308. }
  309. }
  310. return $this;
  311. }
  312. public function getUpdateBy(): ?string
  313. {
  314. return $this->updateBy;
  315. }
  316. public function setUpdateBy(?string $updateBy): self
  317. {
  318. $this->updateBy = $updateBy;
  319. return $this;
  320. }
  321. public function getIsSent(): ?bool
  322. {
  323. return $this->isSent;
  324. }
  325. public function setIsSent(?bool $isSent): self
  326. {
  327. $this->isSent = $isSent;
  328. return $this;
  329. }
  330. public function getSentAt(): ?\DateTimeImmutable
  331. {
  332. return $this->sentAt;
  333. }
  334. public function setSentAt(?\DateTimeImmutable $sentAt): self
  335. {
  336. $this->sentAt = $sentAt;
  337. return $this;
  338. }
  339. }