src/Entity/LessonDeleted.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LessonDeletedRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. use Symfony\Component\Validator\Context\ExecutionContextInterface;
  10. /**
  11. * @ORM\Entity(repositoryClass=LessonDeletedRepository::class)
  12. */
  13. class LessonDeleted
  14. {
  15. /**
  16. * @ORM\Id
  17. * @ORM\GeneratedValue
  18. * @ORM\Column(type="integer")
  19. */
  20. private $id;
  21. /**
  22. * @ORM\Column(type="string", length=255, nullable=true)
  23. */
  24. private $type;
  25. /**
  26. * @ORM\Column(type="integer", nullable=true)
  27. */
  28. private $class;
  29. /**
  30. * @ORM\ManyToOne(targetEntity=Discipline::class)
  31. */
  32. private $discipline;
  33. /**
  34. * @ORM\ManyToOne(targetEntity=Teacher::class)
  35. */
  36. private $teacher;
  37. /**
  38. * @ORM\Column(type="datetime", nullable=true)
  39. */
  40. private $startTime;
  41. /**
  42. * @ORM\Column(type="datetime", nullable=true)
  43. */
  44. private $endTime;
  45. /**
  46. * @ORM\Column(type="integer", nullable=true)
  47. */
  48. private $duration;
  49. /**
  50. * @ORM\Column(type="string", length=255, nullable=true)
  51. */
  52. private $comment;
  53. /**
  54. * @ORM\Column(type="string", length=255, nullable=true)
  55. */
  56. private $status;
  57. /**
  58. * @ORM\ManyToOne(targetEntity=Child::class)
  59. */
  60. private $child;
  61. /**
  62. * @ORM\Column(type="string", length=255, nullable=true)
  63. */
  64. private $adminComment;
  65. /**
  66. * @ORM\Column(type="boolean", nullable=true)
  67. */
  68. private $statusTeacher = 0;
  69. /**
  70. * @ORM\Column(type="boolean", nullable=true)
  71. */
  72. private $statusChild = 0;
  73. /**
  74. * @ORM\Column(type="string", length=255, nullable=true)
  75. */
  76. private $learncubeUUID;
  77. /**
  78. * @ORM\Column(type="datetime", nullable=true)
  79. */
  80. private $attendedAtTeacher;
  81. /**
  82. * @ORM\Column(type="datetime", nullable=true)
  83. */
  84. private $attendedAtChild;
  85. /**
  86. * @ORM\Column(type="boolean", nullable=true)
  87. */
  88. private $childIsLate = 0;
  89. /**
  90. * @ORM\Column(type="boolean", nullable=true)
  91. */
  92. private $childMissed = 0;
  93. /**
  94. * @ORM\Column(type="boolean", nullable=true)
  95. */
  96. private $teacherMissed = 0;
  97. /**
  98. * @ORM\Column(type="datetime", nullable=true)
  99. */
  100. private $learncubeEndAt;
  101. /**
  102. * @ORM\Column(type="integer", nullable=true)
  103. */
  104. private $learncubeDuration;
  105. /**
  106. * @ORM\Column(type="string", length=255, nullable=true)
  107. */
  108. private $freeReason;
  109. /**
  110. * @ORM\Column(type="string", length=255, nullable=true)
  111. */
  112. private $deleteReason;
  113. /**
  114. * @ORM\ManyToOne(targetEntity=Admin::class, inversedBy="lessonDeleteds")
  115. */
  116. private $admin;
  117. /**
  118. * @ORM\Column(type="datetime", nullable=true)
  119. */
  120. private $createdAt;
  121. /**
  122. * @ORM\Column(type="boolean", nullable=true)
  123. */
  124. private $deletedByHr;
  125. /**
  126. * @ORM\Column(type="boolean", nullable=true)
  127. */
  128. private $deletedByTeacher;
  129. public function __construct()
  130. {
  131. $this->createdAt = new \DateTime();
  132. }
  133. public function __toString()
  134. {
  135. return "{$this->id}";
  136. }
  137. public function getId(): ?int
  138. {
  139. return $this->id;
  140. }
  141. public function getType(): ?string
  142. {
  143. return $this->type;
  144. }
  145. public function setType(?string $type): self
  146. {
  147. $this->type = $type;
  148. return $this;
  149. }
  150. public function getClass(): ?int
  151. {
  152. return $this->class;
  153. }
  154. public function setClass(?int $class): self
  155. {
  156. $this->class = $class;
  157. return $this;
  158. }
  159. public function getDiscipline(): ?Discipline
  160. {
  161. return $this->discipline;
  162. }
  163. public function setDiscipline(?Discipline $discipline): self
  164. {
  165. $this->discipline = $discipline;
  166. return $this;
  167. }
  168. public function getTeacher(): ?Teacher
  169. {
  170. return $this->teacher;
  171. }
  172. public function setTeacher(?Teacher $teacher): self
  173. {
  174. $this->teacher = $teacher;
  175. return $this;
  176. }
  177. public function getStartTime(): ?\DateTimeInterface
  178. {
  179. return $this->startTime;
  180. }
  181. public function setStartTime(?\DateTimeInterface $startTime): self
  182. {
  183. $this->startTime = $startTime;
  184. return $this;
  185. }
  186. public function getEndTime(): ?\DateTimeInterface
  187. {
  188. return $this->endTime;
  189. }
  190. public function setEndTime(?\DateTimeInterface $endTime): self
  191. {
  192. $this->endTime = $endTime;
  193. return $this;
  194. }
  195. public function getDuration(): ?int
  196. {
  197. return $this->duration;
  198. }
  199. public function setDuration(?int $duration): self
  200. {
  201. $this->duration = $duration;
  202. return $this;
  203. }
  204. public function getComment(): ?string
  205. {
  206. return $this->comment;
  207. }
  208. public function setComment(?string $comment): self
  209. {
  210. $this->comment = $comment;
  211. return $this;
  212. }
  213. public function getStatus(): ?string
  214. {
  215. $text = $this->status;
  216. foreach (Lesson::STATUSES as $STATUS)
  217. {
  218. if($STATUS['value'] == $this->status)
  219. {
  220. $text = $STATUS['text'];
  221. }
  222. }
  223. return $text;
  224. }
  225. public function getStatusColor(): ?string
  226. {
  227. $color = "";
  228. foreach (Lesson::ALL_STATUSES as $STATUS)
  229. {
  230. if($STATUS['value'] == $this->status)
  231. {
  232. $color = $STATUS['color'];
  233. }
  234. }
  235. return $color;
  236. }
  237. public function getStatusValue(): ?string
  238. {
  239. return $this->status;
  240. }
  241. public function setStatus(?string $status): self
  242. {
  243. foreach (Lesson::STATUSES as $STATUS)
  244. {
  245. if($STATUS['text'] == $status)
  246. {
  247. $status = $STATUS['value'];
  248. }
  249. }
  250. $this->status = $status;
  251. return $this;
  252. }
  253. public function getChild()
  254. {
  255. return $this->child;
  256. }
  257. public function setChild($child): self
  258. {
  259. $this->child = $child;
  260. return $this;
  261. }
  262. public function getAdminComment(): ?string
  263. {
  264. return $this->adminComment;
  265. }
  266. public function setAdminComment(?string $adminComment): self
  267. {
  268. $this->adminComment = $adminComment;
  269. return $this;
  270. }
  271. public function isStatusTeacher(): ?bool
  272. {
  273. return $this->statusTeacher;
  274. }
  275. public function setStatusTeacher(?bool $statusTeacher): self
  276. {
  277. $this->statusTeacher = $statusTeacher;
  278. return $this;
  279. }
  280. public function isStatusChild(): ?bool
  281. {
  282. return $this->statusChild;
  283. }
  284. public function setStatusChild(?bool $statusChild): self
  285. {
  286. $this->statusChild = $statusChild;
  287. return $this;
  288. }
  289. public function getLearncubeUUID(): ?string
  290. {
  291. return $this->learncubeUUID;
  292. }
  293. public function setLearncubeUUID(?string $learncubeUUID): self
  294. {
  295. $this->learncubeUUID = $learncubeUUID;
  296. return $this;
  297. }
  298. public function getAttendedAtTeacher(): ?\DateTimeInterface
  299. {
  300. return $this->attendedAtTeacher;
  301. }
  302. public function setAttendedAtTeacher(?\DateTimeInterface $attendedAtTeacher): self
  303. {
  304. $this->attendedAtTeacher = $attendedAtTeacher;
  305. return $this;
  306. }
  307. public function getAttendedAtChild(): ?\DateTimeInterface
  308. {
  309. return $this->attendedAtChild;
  310. }
  311. public function setAttendedAtChild(?\DateTimeInterface $attendedAtChild): self
  312. {
  313. $this->attendedAtChild = $attendedAtChild;
  314. return $this;
  315. }
  316. public function getChildIsLate(): ?bool
  317. {
  318. return $this->childIsLate;
  319. }
  320. public function setChildIsLate(?bool $childIsLate): self
  321. {
  322. $this->childIsLate = $childIsLate;
  323. return $this;
  324. }
  325. public function getChildMissed(): ?bool
  326. {
  327. return $this->childMissed;
  328. }
  329. public function setChildMissed(?bool $childMissed): self
  330. {
  331. $this->childMissed = $childMissed;
  332. return $this;
  333. }
  334. public function getTeacherMissed(): ?bool
  335. {
  336. return $this->teacherMissed;
  337. }
  338. public function setTeacherMissed(?bool $teacherMissed): self
  339. {
  340. $this->teacherMissed = $teacherMissed;
  341. return $this;
  342. }
  343. public function getLearncubeEndAt(): ?\DateTimeInterface
  344. {
  345. return $this->learncubeEndAt;
  346. }
  347. public function setLearncubeEndAt(?\DateTimeInterface $learncubeEndAt): self
  348. {
  349. $this->learncubeEndAt = $learncubeEndAt;
  350. return $this;
  351. }
  352. public function getLearncubeDuration(): ?int
  353. {
  354. return $this->learncubeDuration;
  355. }
  356. public function setLearncubeDuration(?int $learncubeDuration): self
  357. {
  358. $this->learncubeDuration = $learncubeDuration;
  359. return $this;
  360. }
  361. public function getFreeReason(): ?string
  362. {
  363. return $this->freeReason;
  364. }
  365. public function setFreeReason(?string $freeReason): self
  366. {
  367. $this->freeReason = $freeReason;
  368. return $this;
  369. }
  370. public function getDeleteReason(): ?string
  371. {
  372. return $this->deleteReason;
  373. }
  374. public function setDeleteReason(?string $deleteReason): self
  375. {
  376. $this->deleteReason = $deleteReason;
  377. return $this;
  378. }
  379. public function getAdmin(): ?Admin
  380. {
  381. return $this->admin;
  382. }
  383. public function setAdmin(?Admin $admin): self
  384. {
  385. $this->admin = $admin;
  386. return $this;
  387. }
  388. public function getCreatedAt(): ?\DateTimeInterface
  389. {
  390. return $this->createdAt;
  391. }
  392. public function setCreatedAt(?\DateTimeInterface $createdAt): self
  393. {
  394. $this->createdAt = $createdAt;
  395. return $this;
  396. }
  397. public function getDeletedByHr(): ?bool
  398. {
  399. return $this->deletedByHr;
  400. }
  401. public function setDeletedByHr(?bool $deleted): self
  402. {
  403. $this->deletedByHr = $deleted;
  404. return $this;
  405. }
  406. public function getDeletedByTeacher(): ?bool
  407. {
  408. return $this->deletedByTeacher;
  409. }
  410. public function setDeletedByTeacher(?bool $deleted): self
  411. {
  412. $this->deletedByTeacher = $deleted;
  413. return $this;
  414. }
  415. }