src/Entity/Child.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ChildRepository;
  4. use App\Utils\HelperUtils;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  10. use Symfony\Component\Security\Core\User\UserInterface;
  11. use Symfony\Component\Serializer\Annotation\Groups;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. /**
  14. * @ORM\Entity(repositoryClass=ChildRepository::class)
  15. */
  16. #[UniqueEntity(fields: ['email'], ignoreNull: true, message: 'This email is already registered.')]
  17. #[UniqueEntity(fields: ['username'], ignoreNull: true, message: 'That username is taken.')]
  18. class Child implements UserInterface, PasswordAuthenticatedUserInterface
  19. {
  20. /**
  21. * @ORM\Id
  22. * @ORM\GeneratedValue
  23. * @ORM\Column(type="integer")
  24. * @Groups({"GuardianList","ChildList","ResponsesList", "TeacherResponsesList", "DeclineHistoryList", "NotificationList","ChildPreferenceList", "ChildLessonReviewList"})
  25. */
  26. private $id;
  27. /**
  28. * @ORM\Column(type="string", length=255, nullable=true)
  29. * @Groups({"GuardianList","LessonList","ChildList","ResponsesList", "TeacherResponsesList", "ChildPreferenceAssignmentList", "DeclineHistoryList", "NotificationList", "ChildPreferenceList", "ChildLessonReviewList"})
  30. */
  31. private $fullname;
  32. /**
  33. * @ORM\ManyToOne(targetEntity=Guardian::class, inversedBy="children")
  34. * @Groups({"ChildList","ResponsesList", "TeacherResponsesList", "ChildPreferenceAssignmentList","LessonList", "DeclineHistoryList", "ChildPreferenceList"})
  35. */
  36. private $guardian;
  37. /**
  38. * @ORM\Column(type="string", length=255, nullable=true)
  39. * @Groups({"GuardianList","ChildList", "TeacherResponsesList", "ChildPreferenceAssignmentList", "ChildLessonReviewList"})
  40. */
  41. private $class;
  42. /**
  43. * @ORM\OneToMany(targetEntity=ChildPreference::class, mappedBy="child", cascade={"all"})
  44. */
  45. private $childPreferences;
  46. /**
  47. * @ORM\OneToMany(targetEntity=ChildPreferenceHistory::class, mappedBy="child", cascade={"all"})
  48. */
  49. private $childPreferenceHistories;
  50. /**
  51. * @ORM\ManyToMany(targetEntity=Lesson::class, mappedBy="children", cascade={"all"})
  52. */
  53. private $lessons;
  54. /**
  55. * @ORM\OneToMany(targetEntity=TeacherComment::class, mappedBy="child", cascade={"all"})
  56. */
  57. private $teacherComments;
  58. /**
  59. * @ORM\OneToMany(targetEntity=PaymentLog::class, mappedBy="child", cascade={"all"})
  60. */
  61. private $paymentLogs;
  62. /**
  63. * @ORM\Column(type="date", nullable=true)
  64. * @Groups({"ChildList"})
  65. */
  66. private $birthDate;
  67. /**
  68. * @ORM\Column(type="datetime", nullable=true)
  69. */
  70. private $lessonsEnd;
  71. /**
  72. * @ORM\OneToMany(targetEntity=GuardianSurveyResponse::class, mappedBy="child")
  73. */
  74. private $guardianSurveyResponses;
  75. /**
  76. * @ORM\OneToMany(targetEntity=TeacherSurveyResponse::class, mappedBy="child")
  77. */
  78. private $teacherSurveyResponses;
  79. /**
  80. * @ORM\Column(type="string", length=255, nullable=true)
  81. * @Groups({"NotificationList"})
  82. */
  83. private $email;
  84. /**
  85. * @ORM\Column(type="json")
  86. */
  87. private $roles = [];
  88. /**
  89. * @var string The hashed password
  90. * @ORM\Column(type="string")
  91. * @Assert\Length(min = 8, allowEmptyString = true)
  92. */
  93. private $password = '';
  94. /**
  95. * @ORM\Column(type="string", length=255, nullable=true)
  96. * @Groups({"NotificationList"})
  97. */
  98. private $profileImagePath;
  99. /**
  100. * @ORM\Column(type="string", length=255, nullable=true)
  101. */
  102. private $phoneNumber;
  103. /**
  104. * @ORM\Column(type="string", length=255, nullable=true)
  105. */
  106. private $lastname;
  107. /**
  108. * @ORM\Column(type="text", nullable=true)
  109. */
  110. private $fittingTimes;
  111. /**
  112. * @ORM\Column(type="text", nullable=true)
  113. */
  114. private $fittingTimesPriority;
  115. /**
  116. * @ORM\Column(type="string", length=255, nullable=true)
  117. */
  118. private $username;
  119. /**
  120. * @ORM\Column(type="boolean", nullable=true)
  121. */
  122. private $nextDayEmailLessonsRemindersGuardian = 1;
  123. /**
  124. * @ORM\Column(type="boolean", nullable=true)
  125. */
  126. private $nextDayEmailLessonsRemindersChild = 0;
  127. /**
  128. * @ORM\Column(type="boolean", nullable=true)
  129. */
  130. private $todaySMSLessonsRemindersGuardian = 1;
  131. /**
  132. * @ORM\Column(type="boolean", nullable=true)
  133. */
  134. private $todaySMSLessonsRemindersChild = 0;
  135. /**
  136. * @ORM\OneToMany(targetEntity=LessonLearncubeLog::class, mappedBy="child")
  137. */
  138. private $lessonLearncubeLogs;
  139. /**
  140. * @ORM\Column(type="datetime", nullable=true)
  141. */
  142. private $passwordSentAt;
  143. /**
  144. * @ORM\Column(type="datetime", nullable=true)
  145. */
  146. private $showEmailModal;
  147. /**
  148. * @ORM\Column(type="string", length=255, nullable=true)
  149. */
  150. private $loginToken;
  151. /**
  152. * @ORM\Column(type="text", nullable=true)
  153. */
  154. private $googleRefreshToken;
  155. /**
  156. * @ORM\Column(type="json", nullable=true)
  157. */
  158. private $googleAccessToken = [];
  159. /**
  160. * @ORM\OneToMany(targetEntity=ChildVacation::class, mappedBy="child")
  161. */
  162. private $childVacations;
  163. /**
  164. * @ORM\Column(type="boolean", nullable=true)
  165. */
  166. private $flagRU;
  167. /**
  168. * @ORM\Column(type="boolean", nullable=true)
  169. */
  170. private $flagPL;
  171. /**
  172. * @ORM\Column(type="boolean", nullable=true)
  173. */
  174. private $flagENG;
  175. /**
  176. * @ORM\Column(type="boolean", nullable=true)
  177. */
  178. private $flagIB;
  179. /**
  180. * @ORM\Column(type="boolean", nullable=true)
  181. */
  182. private $flagDyslexia;
  183. /**
  184. * @ORM\Column(type="boolean", nullable=true)
  185. */
  186. private $flagSensitive;
  187. /**
  188. * @ORM\Column(type="string", length=255, nullable=true)
  189. */
  190. private $school;
  191. /**
  192. * @ORM\Column(type="boolean", nullable=true)
  193. */
  194. private $flagStrict;
  195. /**
  196. * @ORM\Column(type="string", length=255, nullable=true)
  197. */
  198. private $gender;
  199. /**
  200. * @ORM\Column(type="boolean", nullable=true)
  201. */
  202. private $flagExperienceAtSchool;
  203. /**
  204. * @ORM\Column(type="boolean", nullable=true)
  205. */
  206. private $flagIelts;
  207. /**
  208. * @ORM\Column(type="boolean", nullable=true)
  209. */
  210. private $vbeOver90;
  211. /**
  212. * @ORM\Column(type="boolean", nullable=true)
  213. */
  214. private $experienceOver12Month;
  215. /**
  216. * @ORM\Column(type="text", nullable=true)
  217. */
  218. private $tutorComment;
  219. /**
  220. * @ORM\Column(type="text", nullable=true)
  221. */
  222. private $chatStreamToken;
  223. /**
  224. * @ORM\Column(type="datetime", nullable=true)
  225. */
  226. private $mobileAppLastUsedAt;
  227. /**
  228. * @ORM\OneToMany(targetEntity=ChildLessonReview::class, mappedBy="child")
  229. */
  230. private $childLessonReviews;
  231. public function __construct()
  232. {
  233. $this->childPreferences = new ArrayCollection();
  234. $this->childPreferenceHistories = new ArrayCollection();
  235. $this->lessons = new ArrayCollection();
  236. $this->teacherComments = new ArrayCollection();
  237. $this->paymentLogs = new ArrayCollection();
  238. $this->guardianSurveyResponses = new ArrayCollection();
  239. $this->teacherSurveyResponses = new ArrayCollection();
  240. $this->lessonLearncubeLogs = new ArrayCollection();
  241. $this->childVacations = new ArrayCollection();
  242. $this->childLessonReviews = new ArrayCollection();
  243. }
  244. public function getId(): ?int
  245. {
  246. return $this->id;
  247. }
  248. public function getGuardian(): ?Guardian
  249. {
  250. return $this->guardian;
  251. }
  252. public function setGuardian(?Guardian $guardian): self
  253. {
  254. $this->guardian = $guardian;
  255. return $this;
  256. }
  257. public function getFullname(): ?string
  258. {
  259. return $this->fullname;
  260. }
  261. public function setFullname(?string $fullname): self
  262. {
  263. $this->fullname = $fullname;
  264. return $this;
  265. }
  266. public function getClass(): ?string
  267. {
  268. return $this->class;
  269. }
  270. public function setClass(?string $class): self
  271. {
  272. $this->class = $class;
  273. return $this;
  274. }
  275. /**
  276. * @return Collection|ChildPreferenceHistory[]
  277. */
  278. public function getChildPreferenceHistories(): Collection
  279. {
  280. return $this->childPreferenceHistories;
  281. }
  282. /**
  283. * @return Collection|ChildPreference[]
  284. */
  285. public function getChildPreferences(): Collection
  286. {
  287. return $this->childPreferences;
  288. }
  289. public function addChildPreference(ChildPreference $childPreference): self
  290. {
  291. if (!$this->childPreferences->contains($childPreference)) {
  292. $this->childPreferences[] = $childPreference;
  293. $childPreference->setChild($this);
  294. }
  295. return $this;
  296. }
  297. public function removeChildPreference(ChildPreference $childPreference): self
  298. {
  299. if ($this->childPreferences->removeElement($childPreference)) {
  300. // set the owning side to null (unless already changed)
  301. if ($childPreference->getChild() === $this) {
  302. $childPreference->setChild(null);
  303. }
  304. }
  305. return $this;
  306. }
  307. public function __toString()
  308. {
  309. return "{$this->fullname} (" . $this->getGuardian()->getEmail() . ')';
  310. }
  311. public function getProfileImagePath(): ?string
  312. {
  313. return $this->profileImagePath;
  314. }
  315. public function setProfileImagePath(?string $profileImagePath): self
  316. {
  317. $this->profileImagePath = $profileImagePath;
  318. return $this;
  319. }
  320. /**
  321. * @return Collection|Lesson[]
  322. */
  323. public function getLessons(): Collection
  324. {
  325. return $this->lessons;
  326. }
  327. public function addLesson(Lesson $lesson): self
  328. {
  329. if (!$this->lessons->contains($lesson)) {
  330. $this->lessons[] = $lesson;
  331. $lesson->addChild($this);
  332. }
  333. return $this;
  334. }
  335. public function removeLesson(Lesson $lesson): self
  336. {
  337. if ($this->lessons->removeElement($lesson)) {
  338. $lesson->removeChild($this);
  339. }
  340. return $this;
  341. }
  342. /**
  343. * @return Collection|TeacherComment[]
  344. */
  345. public function getTeacherComments(): Collection
  346. {
  347. return $this->teacherComments;
  348. }
  349. public function addTeacherComment(TeacherComment $teacherComment): self
  350. {
  351. if (!$this->teacherComments->contains($teacherComment)) {
  352. $this->teacherComments[] = $teacherComment;
  353. $teacherComment->setChild($this);
  354. }
  355. return $this;
  356. }
  357. public function removeTeacherComment(TeacherComment $teacherComment): self
  358. {
  359. if ($this->teacherComments->removeElement($teacherComment)) {
  360. // set the owning side to null (unless already changed)
  361. if ($teacherComment->getChild() === $this) {
  362. $teacherComment->setChild(null);
  363. }
  364. }
  365. return $this;
  366. }
  367. /**
  368. * @return Collection|PaymentLog[]
  369. */
  370. public function getPaymentLogs(): Collection
  371. {
  372. return $this->paymentLogs;
  373. }
  374. public function addPaymentLog(PaymentLog $paymentLog): self
  375. {
  376. if (!$this->paymentLogs->contains($paymentLog)) {
  377. $this->paymentLogs[] = $paymentLog;
  378. $paymentLog->setChild($this);
  379. }
  380. return $this;
  381. }
  382. public function removePaymentLog(PaymentLog $paymentLog): self
  383. {
  384. if ($this->paymentLogs->removeElement($paymentLog)) {
  385. // set the owning side to null (unless already changed)
  386. if ($paymentLog->getChild() === $this) {
  387. $paymentLog->setChild(null);
  388. }
  389. }
  390. return $this;
  391. }
  392. public function getBirthDate(): ?\DateTimeInterface
  393. {
  394. return $this->birthDate;
  395. }
  396. public function setBirthDate(?\DateTimeInterface $birthDate): self
  397. {
  398. $this->birthDate = $birthDate;
  399. return $this;
  400. }
  401. public function getLessonsEnd(): ?\DateTimeInterface
  402. {
  403. return $this->lessonsEnd;
  404. }
  405. public function setLessonsEnd(?\DateTimeInterface $lessonsEnd): self
  406. {
  407. $this->lessonsEnd = $lessonsEnd;
  408. return $this;
  409. }
  410. /**
  411. * @return Collection|GuardianSurveyResponse[]
  412. */
  413. public function getGuardianSurveyResponses(): Collection
  414. {
  415. return $this->guardianSurveyResponses;
  416. }
  417. public function addGuardianSurveyResponse(GuardianSurveyResponse $guardianSurveyResponse): self
  418. {
  419. if (!$this->guardianSurveyResponses->contains($guardianSurveyResponse)) {
  420. $this->guardianSurveyResponses[] = $guardianSurveyResponse;
  421. $guardianSurveyResponse->setChild($this);
  422. }
  423. return $this;
  424. }
  425. public function removeGuardianSurveyResponse(GuardianSurveyResponse $guardianSurveyResponse): self
  426. {
  427. if ($this->guardianSurveyResponses->removeElement($guardianSurveyResponse)) {
  428. // set the owning side to null (unless already changed)
  429. if ($guardianSurveyResponse->getChild() === $this) {
  430. $guardianSurveyResponse->setChild(null);
  431. }
  432. }
  433. return $this;
  434. }
  435. /**
  436. * @return Collection|TeacherSurveyResponse[]
  437. */
  438. public function getTeacherSurveyResponses(): Collection
  439. {
  440. return $this->teacherSurveyResponses;
  441. }
  442. public function addTeacherSurveyResponse(TeacherSurveyResponse $teacherSurveyResponse): self
  443. {
  444. if (!$this->teacherSurveyResponses->contains($teacherSurveyResponse)) {
  445. $this->teacherSurveyResponses[] = $teacherSurveyResponse;
  446. $teacherSurveyResponse->setChild($this);
  447. }
  448. return $this;
  449. }
  450. public function removeTeacherSurveyResponse(TeacherSurveyResponse $teacherSurveyResponse): self
  451. {
  452. if ($this->teacherSurveyResponses->removeElement($teacherSurveyResponse)) {
  453. // set the owning side to null (unless already changed)
  454. if ($teacherSurveyResponse->getChild() === $this) {
  455. $teacherSurveyResponse->setChild(null);
  456. }
  457. }
  458. return $this;
  459. }
  460. public function getEmail(): ?string
  461. {
  462. return $this->email;
  463. }
  464. public function setEmail(?string $email): self
  465. {
  466. $this->email = HelperUtils::isUsableEmail($email) ? $email : null;
  467. return $this;
  468. }
  469. /**
  470. * A visual identifier that represents this user.
  471. *
  472. * @see UserInterface
  473. */
  474. public function getUsername(): string
  475. {
  476. return (string)$this->username;
  477. }
  478. public function getUserIdentifier(): string
  479. {
  480. return (string) $this->email;
  481. }
  482. /**
  483. * @see UserInterface
  484. */
  485. public function getRoles(): array
  486. {
  487. $roles = ['ROLE_CHILD', 'ROLE_USER'];
  488. return array_unique($roles);
  489. }
  490. public function setRoles(array $roles): self
  491. {
  492. $roles = ['ROLE_CHILD', 'ROLE_USER'];
  493. $this->roles = $roles;
  494. return $this;
  495. }
  496. /**
  497. * @see UserInterface
  498. */
  499. public function getPassword(): string
  500. {
  501. return (string)$this->password;
  502. }
  503. public function setPassword(string $password): self
  504. {
  505. $this->password = $password;
  506. return $this;
  507. }
  508. /**
  509. * @see UserInterface
  510. */
  511. public function getSalt()
  512. {
  513. // not needed when using the "bcrypt" algorithm in security.yaml
  514. }
  515. /**
  516. * @see UserInterface
  517. */
  518. public function eraseCredentials()
  519. {
  520. // If you store any temporary, sensitive data on the user, clear it here
  521. // $this->plainPassword = null;
  522. }
  523. public function getPhoneNumber(): ?string
  524. {
  525. return $this->phoneNumber;
  526. }
  527. public function setPhoneNumber(?string $phoneNumber): self
  528. {
  529. $this->phoneNumber = $phoneNumber;
  530. return $this;
  531. }
  532. public function getLastname(): ?string
  533. {
  534. return $this->lastname;
  535. }
  536. public function setLastname(?string $lastname): self
  537. {
  538. $this->lastname = $lastname;
  539. return $this;
  540. }
  541. public function getFittingTimes(): ?string
  542. {
  543. return $this->fittingTimes;
  544. }
  545. public function setFittingTimes(?string $fittingTimes): self
  546. {
  547. $this->fittingTimes = $fittingTimes;
  548. return $this;
  549. }
  550. public function getFittingTimesPriority(): ?string
  551. {
  552. return $this->fittingTimesPriority;
  553. }
  554. public function setFittingTimesPriority(?string $fittingTimesPriority): self
  555. {
  556. $this->fittingTimesPriority = $fittingTimesPriority;
  557. return $this;
  558. }
  559. public function setUsername(?string $username): self
  560. {
  561. $this->username = $username;
  562. return $this;
  563. }
  564. public function getNextDayEmailLessonsRemindersGuardian(): ?bool
  565. {
  566. return $this->nextDayEmailLessonsRemindersGuardian;
  567. }
  568. public function setNextDayEmailLessonsRemindersGuardian(?bool $nextDayEmailLessonsRemindersGuardian): self
  569. {
  570. $this->nextDayEmailLessonsRemindersGuardian = $nextDayEmailLessonsRemindersGuardian;
  571. return $this;
  572. }
  573. public function getNextDayEmailLessonsRemindersChild(): ?bool
  574. {
  575. return $this->nextDayEmailLessonsRemindersChild;
  576. }
  577. public function setNextDayEmailLessonsRemindersChild(?bool $nextDayEmailLessonsRemindersChild): self
  578. {
  579. $this->nextDayEmailLessonsRemindersChild = $nextDayEmailLessonsRemindersChild;
  580. return $this;
  581. }
  582. public function getTodaySMSLessonsRemindersGuardian(): ?bool
  583. {
  584. return $this->todaySMSLessonsRemindersGuardian;
  585. }
  586. public function setTodaySMSLessonsRemindersGuardian(?bool $todaySMSLessonsRemindersGuardian): self
  587. {
  588. $this->todaySMSLessonsRemindersGuardian = $todaySMSLessonsRemindersGuardian;
  589. return $this;
  590. }
  591. public function getTodaySMSLessonsRemindersChild(): ?bool
  592. {
  593. return $this->todaySMSLessonsRemindersChild;
  594. }
  595. public function setTodaySMSLessonsRemindersChild(?bool $todaySMSLessonsRemindersChild): self
  596. {
  597. $this->todaySMSLessonsRemindersChild = $todaySMSLessonsRemindersChild;
  598. return $this;
  599. }
  600. public function getUnickoFunction(): ?bool
  601. {
  602. $unickoFunction = false;
  603. /**
  604. * @var ChildPreference $childPreference
  605. */
  606. foreach ($this->childPreferences as $childPreference) {
  607. $teacher = $childPreference->getTeacher();
  608. if (isset($teacher) && $teacher->getUnickoFunction()) {
  609. $unickoFunction = true;
  610. break;
  611. }
  612. }
  613. return $unickoFunction;
  614. }
  615. /**
  616. * @return Collection<int, LessonLearncubeLog>
  617. */
  618. public function getLessonLearncubeLogs(): Collection
  619. {
  620. return $this->lessonLearncubeLogs;
  621. }
  622. public function addLessonLearncubeLog(LessonLearncubeLog $lessonLearncubeLog): self
  623. {
  624. if (!$this->lessonLearncubeLogs->contains($lessonLearncubeLog)) {
  625. $this->lessonLearncubeLogs[] = $lessonLearncubeLog;
  626. $lessonLearncubeLog->setChild($this);
  627. }
  628. return $this;
  629. }
  630. public function removeLessonLearncubeLog(LessonLearncubeLog $lessonLearncubeLog): self
  631. {
  632. if ($this->lessonLearncubeLogs->removeElement($lessonLearncubeLog)) {
  633. // set the owning side to null (unless already changed)
  634. if ($lessonLearncubeLog->getChild() === $this) {
  635. $lessonLearncubeLog->setChild(null);
  636. }
  637. }
  638. return $this;
  639. }
  640. public function getPasswordSentAt(): ?\DateTimeInterface
  641. {
  642. return $this->passwordSentAt;
  643. }
  644. public function setPasswordSentAt(?\DateTimeInterface $passwordSentAt): self
  645. {
  646. $this->passwordSentAt = $passwordSentAt;
  647. return $this;
  648. }
  649. public function getShowEmailModal(): ?\DateTimeInterface
  650. {
  651. return $this->showEmailModal;
  652. }
  653. public function setShowEmailModal(?\DateTimeInterface $showEmailModal): self
  654. {
  655. $this->showEmailModal = $showEmailModal;
  656. return $this;
  657. }
  658. public function showEmailSurvey()
  659. {
  660. $showModal = false;
  661. if (!$this->getShowEmailModal() || (new \DateTime())->format('Y-m') != $this->getShowEmailModal()->format('Y-m')) {
  662. if (!$this->getEmail()) {
  663. $showModal = true;
  664. }
  665. }
  666. return $showModal;
  667. }
  668. public function getLoginToken(): ?string
  669. {
  670. return $this->loginToken;
  671. }
  672. public function setLoginToken(?string $loginToken): self
  673. {
  674. $this->loginToken = $loginToken;
  675. return $this;
  676. }
  677. public function getGoogleRefreshToken(): ?string
  678. {
  679. return $this->googleRefreshToken;
  680. }
  681. public function setGoogleRefreshToken(?string $googleRefreshToken): self
  682. {
  683. $this->googleRefreshToken = $googleRefreshToken;
  684. return $this;
  685. }
  686. public function getGoogleAccessToken(): ?array
  687. {
  688. return $this->googleAccessToken;
  689. }
  690. public function setGoogleAccessToken(?array $googleAccessToken): self
  691. {
  692. $this->googleAccessToken = $googleAccessToken;
  693. return $this;
  694. }
  695. /**
  696. * @return Collection<int, ChildVacation>
  697. */
  698. public function getChildVacations(): Collection
  699. {
  700. return $this->childVacations;
  701. }
  702. public function addChildVacation(ChildVacation $childVacation): self
  703. {
  704. if (!$this->childVacations->contains($childVacation)) {
  705. $this->childVacations[] = $childVacation;
  706. $childVacation->setChild($this);
  707. }
  708. return $this;
  709. }
  710. public function removeChildVacation(ChildVacation $childVacation): self
  711. {
  712. if ($this->childVacations->removeElement($childVacation)) {
  713. // set the owning side to null (unless already changed)
  714. if ($childVacation->getChild() === $this) {
  715. $childVacation->setChild(null);
  716. }
  717. }
  718. return $this;
  719. }
  720. public function getFlagRU(): ?bool
  721. {
  722. return $this->flagRU;
  723. }
  724. public function setFlagRU(?bool $flagRU): self
  725. {
  726. $this->flagRU = $flagRU;
  727. return $this;
  728. }
  729. public function getFlagPL(): ?bool
  730. {
  731. return $this->flagPL;
  732. }
  733. public function setFlagPL(?bool $flagPL): self
  734. {
  735. $this->flagPL = $flagPL;
  736. return $this;
  737. }
  738. public function getFlagENG(): ?bool
  739. {
  740. return $this->flagENG;
  741. }
  742. public function setFlagENG(?bool $flagENG): self
  743. {
  744. $this->flagENG = $flagENG;
  745. return $this;
  746. }
  747. public function getFlagIB(): ?bool
  748. {
  749. return $this->flagIB;
  750. }
  751. public function setFlagIB(?bool $flagIB): self
  752. {
  753. $this->flagIB = $flagIB;
  754. return $this;
  755. }
  756. public function getFlagDyslexia(): ?bool
  757. {
  758. return $this->flagDyslexia;
  759. }
  760. public function setFlagDyslexia(?bool $flagDyslexia): self
  761. {
  762. $this->flagDyslexia = $flagDyslexia;
  763. return $this;
  764. }
  765. public function getFlagSensitive(): ?bool
  766. {
  767. return $this->flagSensitive;
  768. }
  769. public function setFlagSensitive(?bool $flagSensitive): self
  770. {
  771. $this->flagSensitive = $flagSensitive;
  772. return $this;
  773. }
  774. public function getSchool(): ?string
  775. {
  776. return $this->school;
  777. }
  778. public function setSchool(?string $school): self
  779. {
  780. $this->school = $school;
  781. return $this;
  782. }
  783. public function isFlagStrict(): ?bool
  784. {
  785. return $this->flagStrict;
  786. }
  787. public function setFlagStrict(?bool $flagStrict): self
  788. {
  789. $this->flagStrict = $flagStrict;
  790. return $this;
  791. }
  792. public function getGender(): ?string
  793. {
  794. return $this->gender;
  795. }
  796. public function setGender(?string $gender): self
  797. {
  798. $this->gender = $gender;
  799. return $this;
  800. }
  801. public function isFlagExperienceAtSchool(): ?bool
  802. {
  803. return $this->flagExperienceAtSchool;
  804. }
  805. public function setFlagExperienceAtSchool(?bool $flagExperienceAtSchool): self
  806. {
  807. $this->flagExperienceAtSchool = $flagExperienceAtSchool;
  808. return $this;
  809. }
  810. public function isFlagIelts(): ?bool
  811. {
  812. return $this->flagIelts;
  813. }
  814. public function setFlagIelts(?bool $flagIelts): self
  815. {
  816. $this->flagIelts = $flagIelts;
  817. return $this;
  818. }
  819. public function isVbeOver90(): ?bool
  820. {
  821. return $this->vbeOver90;
  822. }
  823. public function setVbeOver90(?bool $vbeOver90): self
  824. {
  825. $this->vbeOver90 = $vbeOver90;
  826. return $this;
  827. }
  828. public function isExperienceOver12Month(): ?bool
  829. {
  830. return $this->experienceOver12Month;
  831. }
  832. public function setExperienceOver12Month(?bool $experienceOver12Month): self
  833. {
  834. $this->experienceOver12Month = $experienceOver12Month;
  835. return $this;
  836. }
  837. public function getTutorComment(): ?string
  838. {
  839. return $this->tutorComment;
  840. }
  841. public function setTutorComment(?string $tutorComment): self
  842. {
  843. $this->tutorComment = $tutorComment;
  844. return $this;
  845. }
  846. public function getChatStreamToken(): ?string
  847. {
  848. return $this->chatStreamToken;
  849. }
  850. public function setChatStreamToken(?string $chatStreamToken): self
  851. {
  852. $this->chatStreamToken = $chatStreamToken;
  853. return $this;
  854. }
  855. public function getMobileAppLastUsedAt(): ?\DateTimeInterface
  856. {
  857. return $this->mobileAppLastUsedAt;
  858. }
  859. public function setMobileAppLastUsedAt(?\DateTimeInterface $mobileAppLastUsedAt): self
  860. {
  861. $this->mobileAppLastUsedAt = $mobileAppLastUsedAt;
  862. return $this;
  863. }
  864. /**
  865. * @return Collection<int, ChildLessonReview>
  866. */
  867. public function getChildLessonReviews(): Collection
  868. {
  869. return $this->childLessonReviews;
  870. }
  871. public function addChildLessonReview(ChildLessonReview $childLessonReview): self
  872. {
  873. if (!$this->childLessonReviews->contains($childLessonReview)) {
  874. $this->childLessonReviews[] = $childLessonReview;
  875. $childLessonReview->setChild($this);
  876. }
  877. return $this;
  878. }
  879. public function removeChildLessonReview(ChildLessonReview $childLessonReview): self
  880. {
  881. if ($this->childLessonReviews->removeElement($childLessonReview)) {
  882. // set the owning side to null (unless already changed)
  883. if ($childLessonReview->getChild() === $this) {
  884. $childLessonReview->setChild(null);
  885. }
  886. }
  887. return $this;
  888. }
  889. }