src/Entity/Teacher.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\TeacherRegister\TeacherRegister;
  4. use App\Repository\TeacherRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use phpDocumentor\Reflection\Types\This;
  9. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  10. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  11. use Symfony\Component\Security\Core\User\UserInterface;
  12. use Symfony\Component\Serializer\Annotation\Groups;
  13. /**
  14. * @ORM\Entity(repositoryClass=TeacherRepository::class)
  15. * @ORM\Table(name="teacher",indexes={
  16. * @ORM\Index(name="unicko_function_id_idx", columns={"unicko_function", "id"})
  17. * })
  18. * @UniqueEntity("email")
  19. */
  20. class Teacher implements UserInterface, PasswordAuthenticatedUserInterface
  21. {
  22. const STATUS_ACTIVE = "Aktyvus";
  23. const STATUS_INACTIVE = "Neaktyvus";
  24. const STATUS_SUSPENDED = "Laikinai sustabdęs";
  25. const TEACHER_STATUSES = [self::STATUS_ACTIVE, self::STATUS_INACTIVE, self::STATUS_SUSPENDED];
  26. const WARNINGS_COUNTING_START = '2026-09-01 00:00:00';
  27. const WARNINGS_ARCHIVE_2025_2026_SUMMARY_FILE = 'warnings_2025_2026_f46e1a4caf8ddb841d5a83a008375a51ff41244bb3fb18af.csv';
  28. const WARNINGS_ARCHIVE_2025_2026_DETAIL_FILE = 'warnings_2025_2026_detail_f46e1a4caf8ddb841d5a83a008375a51ff41244bb3fb18af.csv';
  29. const LEVELS = [
  30. [
  31. 'name' => 'Junior Tutor',
  32. 'hoursMin' => 0,
  33. 'hoursMax' => 110,
  34. 'hourlyRate' => 8,
  35. 'badge' => 'junior',
  36. 'hourlyImpact' => 0,
  37. ],
  38. [
  39. 'name' => 'Mid Tutor',
  40. 'hoursMin' => 110,
  41. 'hoursMax' => 256,
  42. 'hourlyRate' => 9,
  43. 'badge' => 'mid',
  44. 'hourlyImpact' => 12.5,
  45. ],
  46. [
  47. 'name' => 'Senior Tutor',
  48. 'hoursMin' => 256,
  49. 'hoursMax' => 402,
  50. 'hourlyRate' => 10,
  51. 'badge' => 'senior',
  52. 'hourlyImpact' => 25,
  53. ],
  54. [
  55. 'name' => 'Pro Tutor',
  56. 'hoursMin' => 402,
  57. 'hoursMax' => 548,
  58. 'hourlyRate' => 11,
  59. 'badge' => 'pro',
  60. 'hourlyImpact' => 37.5,
  61. ],
  62. [
  63. 'name' => 'Expert Tutor',
  64. 'hoursMin' => 548,
  65. 'hoursMax' => 694,
  66. 'hourlyRate' => 12,
  67. 'badge' => 'expert',
  68. 'hourlyImpact' => 50,
  69. ],
  70. [
  71. 'name' => 'Master Tutor',
  72. 'hoursMin' => 694,
  73. 'hoursMax' => 840,
  74. 'hourlyRate' => 13,
  75. 'badge' => 'master',
  76. 'hourlyImpact' => 62.5,
  77. ],
  78. [
  79. 'name' => 'Pro Expert',
  80. 'hoursMin' => 840,
  81. 'hoursMax' => 986,
  82. 'hourlyRate' => 14,
  83. 'badge' => 'proexpert',
  84. 'hourlyImpact' => 75,
  85. ],
  86. [
  87. 'name' => 'Pro Master',
  88. 'hoursMin' => 986,
  89. 'hoursMax' => 1132,
  90. 'hourlyRate' => 15,
  91. 'badge' => 'promaster',
  92. 'hourlyImpact' => 87.5,
  93. ],
  94. [
  95. 'name' => 'Pro Master Tutor *',
  96. 'hoursMin' => 1132,
  97. 'hoursMax' => 1278,
  98. 'hourlyRate' => 16,
  99. 'badge' => 'promaster1',
  100. 'hourlyImpact' => 100,
  101. ],
  102. [
  103. 'name' => 'Pro Master Tutor **',
  104. 'hoursMin' => 1278,
  105. 'hoursMax' => 1424,
  106. 'hourlyRate' => 17,
  107. 'badge' => 'promaster2',
  108. 'hourlyImpact' => 112.5,
  109. ],
  110. [
  111. 'name' => 'Pro Master Tutor ***',
  112. 'hoursMin' => 1424,
  113. 'hoursMax' => 1570,
  114. 'hourlyRate' => 18,
  115. 'badge' => 'promaster3',
  116. 'hourlyImpact' => 125,
  117. ],
  118. [
  119. 'name' => 'Premium Tutor *',
  120. 'hoursMin' => 1570,
  121. 'hoursMax' => 1716,
  122. 'hourlyRate' => 19,
  123. 'badge' => 'premium1',
  124. 'hourlyImpact' => 137.5,
  125. ],
  126. [
  127. 'name' => 'Premium Tutor **',
  128. 'hoursMin' => 1716,
  129. 'hoursMax' => 99999,
  130. 'hourlyRate' => 20,
  131. 'badge' => 'premium2',
  132. 'hourlyImpact' => 150,
  133. ],
  134. ];
  135. /**
  136. * @ORM\Id
  137. * @ORM\GeneratedValue
  138. * @ORM\Column(type="integer")
  139. * @Groups({"CensorshipList","TeacherList","TeacherRegisterList","TeacherModList","ResponsesList","ChildPreferenceAssignmentList", "DeclineHistoryList", "NotificationList", "ChildPreferenceList", "AdminConfirmationsList", "TeacherSickLeavesList", "TabletList", "WoltCouponList","ChildLessonReviewList"})
  140. */
  141. private $id;
  142. /**
  143. * @ORM\Column(type="string", length=180, unique=true)
  144. * @Groups({"CensorshipList","showme","TeacherList", "NotificationList", "ChildPreferenceList", "TeacherSickLeavesList", "TabletList", "WoltCouponList","ChildLessonReviewList"})
  145. */
  146. private $email;
  147. /**
  148. * @ORM\Column(type="json")
  149. * @Groups({"TeacherList", "TeacherRegisterList"})
  150. */
  151. private $roles = ['ROLE_TEACHER', 'ROLE_USER'];
  152. /**
  153. * @var string The hashed password
  154. * @ORM\Column(type="string")
  155. */
  156. private $password;
  157. /**
  158. * @ORM\Column(type="string", length=255, nullable=true)
  159. * @Groups({"showme","LessonList","TeacherList","ChildPreferenceList", "TeacherSurveyList","TeacherModList","ResponsesList","ChildPreferenceAssignmentList", "DeclineHistoryList", "NotificationList", "AdminConfirmationsList", "TeacherSickLeavesList", "TabletList", "WoltCouponList","ChildLessonReviewList"})
  160. */
  161. private $fullname;
  162. /**
  163. * @ORM\Column(type="string", length=255, nullable=true)
  164. * @Groups({"showme","LessonList","TeacherList","ChildPreferenceAssignmentList"})
  165. */
  166. private $phoneNumber;
  167. /**
  168. * @ORM\Column(type="string", length=255, nullable=true)
  169. * @Groups({"showme","TeacherList"})
  170. */
  171. private $university;
  172. /**
  173. * @ORM\Column(type="datetime", nullable=true)
  174. * @Groups({"TeacherList", "ChildPreferenceList"})
  175. */
  176. private $workStart;
  177. /**
  178. * @ORM\Column(type="datetime", nullable=true)
  179. * @Groups({"TeacherList"})
  180. */
  181. private $workEnd;
  182. /**
  183. * @ORM\Column(type="string", length=255, nullable=true)
  184. * @Groups({"TeacherList"})
  185. */
  186. private $maxLoad;
  187. /**
  188. * @ORM\Column(type="string", length=255, nullable=true)
  189. * @Groups({"TeacherList", "ChildPreferenceList"})
  190. */
  191. private $available = 0;
  192. /**
  193. * @ORM\Column(type="string", length=255, nullable=true)
  194. * @Groups({"TeacherList","ResponsesList", "TeacherRegisterList"})
  195. */
  196. private $status;
  197. /**
  198. * @ORM\OneToMany(targetEntity=ChildPreference::class, mappedBy="teacher")
  199. */
  200. private $childPreferences;
  201. /**
  202. * @ORM\OneToMany(targetEntity=ChildPreferenceHistory::class, mappedBy="teacher")
  203. */
  204. private $childPreferenceHistories;
  205. /**
  206. * @ORM\Column(type="string", length=255, nullable=true)
  207. * @Groups({"showme"})
  208. */
  209. private $individualNumber;
  210. /**
  211. * @ORM\OneToMany(targetEntity=Lesson::class, mappedBy="teacher")
  212. */
  213. private $lessons;
  214. /**
  215. * @ORM\Column(type="string", length=255, nullable=true)
  216. * @Groups({"TeacherSurveyList", "NotificationList"})
  217. */
  218. private $profileImagePath;
  219. /**
  220. * @ORM\OneToMany(targetEntity=TeacherPayment::class, mappedBy="teacher")
  221. */
  222. private $teacherPayments;
  223. /**
  224. * @ORM\OneToMany(targetEntity=TeacherPaymentLog::class, mappedBy="teacher")
  225. */
  226. private $teacherPaymentLogs;
  227. /**
  228. * @ORM\OneToMany(targetEntity=TeacherComment::class, mappedBy="teacher")
  229. */
  230. private $teacherComments;
  231. /**
  232. * @ORM\Column(type="datetime", nullable=true)
  233. */
  234. private $dateAdd;
  235. /**
  236. * @ORM\Column(type="string", length=255, nullable=true)
  237. * @Groups({"TeacherList"})
  238. */
  239. private $classes = "";
  240. /**
  241. * @ORM\ManyToMany(targetEntity=Discipline::class, inversedBy="teachers")
  242. * @Groups({"TeacherList"})
  243. */
  244. private $disciplines;
  245. /**
  246. * @ORM\Column(type="string", length=255, nullable=true)
  247. * @Groups({"TeacherList"})
  248. */
  249. private $paymentStatus = Payment::STATUS_NOTPAID;
  250. /**
  251. * @ORM\OneToMany(targetEntity=TeacherDisciplineClass::class, mappedBy="teacher", cascade={"all"})
  252. * @Groups({"TeacherList"})
  253. */
  254. private $teacherDisciplineClasses;
  255. /**
  256. * @ORM\Column(type="string", length=255, nullable=true)
  257. * @Groups({"showme"})
  258. */
  259. private $accountNumber;
  260. /**
  261. * @ORM\OneToMany(targetEntity=TeacherPriceChange::class, mappedBy="teacher", cascade={"all"})
  262. */
  263. private $teacherPriceChanges;
  264. /**
  265. * @ORM\OneToMany(targetEntity=TeacherAvailabilityTime::class, mappedBy="teacher", cascade={"all"})
  266. */
  267. private $teacherAvailabilityTimes;
  268. /**
  269. * @ORM\Column(type="text", nullable=true)
  270. * @Groups({"TeacherList"})
  271. */
  272. private $comment;
  273. /**
  274. * @ORM\OneToMany(targetEntity=GuardianSurveyResponse::class, mappedBy="teacher")
  275. */
  276. private $guardianSurveyResponses;
  277. /**
  278. * @ORM\Column(type="string", length=255, nullable=true)
  279. * @Groups({"TeacherList"})
  280. */
  281. private $shortName;
  282. /**
  283. * @ORM\Column(type="string", length=255, nullable=true)
  284. * @Groups({"TeacherList"})
  285. */
  286. private $summer;
  287. /**
  288. * @ORM\OneToMany(targetEntity=TeacherSurvey::class, mappedBy="teacher")
  289. */
  290. private $teacherSurveys;
  291. /**
  292. * @ORM\OneToMany(targetEntity=TeacherSurveyResponse::class, mappedBy="teacher")
  293. */
  294. private $teacherSurveyResponses;
  295. /**
  296. * @ORM\Column(type="boolean", nullable=true,options={"default" : "0"})
  297. */
  298. private $showSurvey = false;
  299. /**
  300. * @ORM\Column(type="text", nullable=true)
  301. */
  302. private $shortDescription;
  303. /**
  304. * @ORM\Column(type="string", length=255, nullable=true)
  305. * @Groups({"TeacherSurveyList"})
  306. */
  307. private $discordName;
  308. /**
  309. * @ORM\Column(type="boolean", nullable=true)
  310. */
  311. private $blockNextDayLessonsReminders;
  312. /**
  313. * @ORM\Column(type="boolean", nullable=true)
  314. */
  315. private $blockTodayLessonsReminders;
  316. /**
  317. * @ORM\Column(type="float", nullable=true,options={"default" : "0"})
  318. */
  319. private $workedHours = 0;
  320. /**
  321. * @ORM\Column(type="float", nullable=true,options={"default" : "0"})
  322. */
  323. private $workedHoursMarch = 0;
  324. /**
  325. * @ORM\Column(type="string", length=255, nullable=true,options={"default" : "Junior Tutor"})
  326. * @Groups({"TeacherList"})
  327. */
  328. private $levelName = "Junior Tutor";
  329. /**
  330. * @ORM\OneToMany(targetEntity=TeacherHoliday::class, mappedBy="teacher")
  331. */
  332. private $teacherHolidays;
  333. /**
  334. * @ORM\Column(type="integer", nullable=true)
  335. * @Groups({"TeacherList","LessonList"})
  336. */
  337. private $lessonsMissed;
  338. /**
  339. * @ORM\Column(type="datetime", nullable=true)
  340. * @Groups({"TeacherList"})
  341. */
  342. private $warningDate;
  343. /**
  344. * @ORM\Column(type="boolean", nullable=true)
  345. * @Groups({"TeacherList"})
  346. */
  347. private $flagRU;
  348. /**
  349. * @ORM\Column(type="boolean", nullable=true)
  350. * @Groups({"TeacherList"})
  351. */
  352. private $flagPL;
  353. /**
  354. * @ORM\Column(type="boolean", nullable=true)
  355. * @Groups({"TeacherList"})
  356. */
  357. private $flagENG;
  358. /**
  359. * @ORM\Column(type="boolean", nullable=true)
  360. * @Groups({"TeacherList"})
  361. */
  362. private $flagIB;
  363. /**
  364. * @ORM\Column(type="boolean", nullable=true)
  365. * @Groups({"TeacherList"})
  366. */
  367. private $flagDyslexia;
  368. /**
  369. * @ORM\Column(type="boolean", nullable=true)
  370. * @Groups({"TeacherList"})
  371. */
  372. private $flagSensitive;
  373. /**
  374. * @ORM\Column(type="boolean", nullable=true)
  375. * @Groups({"TeacherList"})
  376. */
  377. private $flagTrial;
  378. /**
  379. * @ORM\Column(type="string", length=255, nullable=true)
  380. * @Groups({"TeacherList"})
  381. */
  382. private $extraLoad;
  383. /**
  384. * @ORM\OneToMany(targetEntity=LessonLearncubeLog::class, mappedBy="teacher")
  385. */
  386. private $lessonLearncubeLogs;
  387. /**
  388. * @ORM\Column(type="text", nullable=true)
  389. * @Groups({"TeacherList"})
  390. */
  391. private $adminComment;
  392. /**
  393. * @ORM\Column(type="string", length=255, nullable=true)
  394. */
  395. private $educationStage;
  396. /**
  397. * @ORM\OneToMany(targetEntity=ChildPreferenceDeclineHistory::class, mappedBy="teacher")
  398. */
  399. private $childPreferenceDeclineHistories;
  400. /**
  401. * @ORM\OneToMany(targetEntity=TeacherHoursBonus::class, mappedBy="teacher")
  402. */
  403. private $teacherHoursBonuses;
  404. /**
  405. * @ORM\OneToMany(targetEntity=TeacherTablet::class, mappedBy="teacher")
  406. */
  407. private $teacherTablets;
  408. /**
  409. * @ORM\Column(type="datetime", nullable=true)
  410. * @Groups({"TeacherList"})
  411. */
  412. private $lcFrom;
  413. /**
  414. * @ORM\OneToMany(targetEntity=TeacherUnavailableRange::class, mappedBy="teacher")
  415. * @Groups({"TeacherList"})
  416. */
  417. private $teacherUnavailableRanges;
  418. /**
  419. * @ORM\Column(type="string", length=255, nullable=true)
  420. */
  421. private $contractTerminateReason;
  422. /**
  423. * @ORM\Column(type="float", nullable=true)
  424. * @Groups({"TeacherList"})
  425. */
  426. private $contractTerminateFee;
  427. /**
  428. * @ORM\Column(type="boolean", nullable=true)
  429. * @Groups({"TeacherList"})
  430. */
  431. private $contractTerminateFeePaid;
  432. /**
  433. * @ORM\Column(type="boolean", nullable=true)
  434. * @Groups({"TeacherList"})
  435. */
  436. private $unickoFunction;
  437. /**
  438. * @ORM\OneToOne(targetEntity=TeacherRegister::class, mappedBy="teacher", cascade={"persist", "remove"})
  439. * @Groups({"TeacherList"})
  440. */
  441. private $teacherRegister;
  442. /**
  443. * @ORM\Column(type="datetime", nullable=true)
  444. * @Groups({"TeacherList"})
  445. */
  446. private $birthday;
  447. /**
  448. * @ORM\Column(type="string", length=255, nullable=true)
  449. */
  450. private $individualWorkFilePath;
  451. /**
  452. * @ORM\Column(type="string", length=255, nullable=true)
  453. */
  454. private $country;
  455. /**
  456. * @ORM\Column(type="boolean", nullable=true)
  457. * @Groups({"TeacherList"})
  458. */
  459. private $summerTime;
  460. /**
  461. * @ORM\Column(type="string", length=255, nullable=true)
  462. * @Groups({"TeacherList"})
  463. */
  464. private $studyField;
  465. /**
  466. * @ORM\Column(type="datetime", nullable=true)
  467. * @Groups({"TeacherList"})
  468. */
  469. private $congratulatedBirthday;
  470. /**
  471. * @ORM\Column(type="text", nullable=true)
  472. */
  473. private $googleRefreshToken;
  474. /**
  475. * @ORM\Column(type="json", nullable=true)
  476. */
  477. private $googleAccessToken = [];
  478. /**
  479. * @ORM\Column(type="string", length=255, nullable=true)
  480. */
  481. private $threemaPassword;
  482. /**
  483. * @ORM\Column(type="string", length=255, nullable=true)
  484. * @Groups({"TeacherList"})
  485. */
  486. private $threemaId;
  487. /**
  488. * @ORM\Column(type="string", length=255, nullable=true)
  489. * @Groups({"TeacherList"})
  490. */
  491. private $threemaStatus;
  492. /**
  493. * @ORM\Column(type="string", length=255, nullable=true)
  494. * @Groups({"TeacherList"})
  495. */
  496. private $threemaGroup;
  497. /**
  498. * @ORM\Column(type="datetime", nullable=true)
  499. * @Groups({"TeacherList"})
  500. */
  501. private $threemaInviteLastSentAt;
  502. /**
  503. * @ORM\Column(type="boolean", nullable=true)
  504. * @Groups({"TeacherList"})
  505. */
  506. private $trainingStarted = 0;
  507. /**
  508. * @ORM\Column(type="boolean", nullable=true)
  509. * @Groups({"TeacherList"})
  510. */
  511. private $trainingEnded = 0;
  512. /**
  513. * @ORM\Column(type="string", length=255, nullable=true)
  514. */
  515. private $referralCode;
  516. /**
  517. * @ORM\Column(type="string", length=255, nullable=true)
  518. * @Groups({"TeacherList"})
  519. */
  520. private $school;
  521. /**
  522. * @ORM\Column(type="integer", nullable=true)
  523. * @Groups({"TeacherList"})
  524. */
  525. private $ielts;
  526. /**
  527. * @ORM\OneToMany(targetEntity=TeacherSickLeaves::class, mappedBy="teacher")
  528. */
  529. private $teacherSickLeaves;
  530. /**
  531. * @ORM\Column(type="string", length=255, nullable=true)
  532. */
  533. private $personalIdentificationNumber;
  534. /**
  535. * @ORM\OneToMany(targetEntity=TeacherPaymentBonusProposal::class, mappedBy="teacher")
  536. */
  537. private $teacherPaymentBonusProposals;
  538. /**
  539. * @ORM\OneToMany(targetEntity=Tablet::class, mappedBy="teacher")
  540. */
  541. private $tablets;
  542. /**
  543. * @ORM\OneToMany(targetEntity=WoltCoupon::class, mappedBy="teacher")
  544. */
  545. private $woltCoupons;
  546. /**
  547. * @ORM\Column(type="boolean", nullable=true)
  548. * @Groups({"TeacherList"})
  549. */
  550. private $flagWeb;
  551. /**
  552. * @ORM\Column(type="boolean", nullable=true)
  553. */
  554. private $flagStrict;
  555. /**
  556. * @ORM\Column(type="string", length=255, nullable=true)
  557. */
  558. private $gender;
  559. /**
  560. * @ORM\Column(type="boolean", nullable=true)
  561. */
  562. private $flagExperienceAtSchool;
  563. /**
  564. * @ORM\Column(type="boolean", nullable=true)
  565. */
  566. private $flagPriorityAssignment;
  567. /**
  568. * @ORM\OneToOne(targetEntity=TeacherPreference::class, mappedBy="teacher", cascade={"persist", "remove"})
  569. */
  570. private $teacherPreference;
  571. /**
  572. * @ORM\Column(type="string", length=255, nullable=true)
  573. */
  574. private $newContractMarksignUrl;
  575. /**
  576. * @ORM\Column(type="boolean", nullable=true)
  577. */
  578. private $newCotractSigned;
  579. /**
  580. * @ORM\Column(type="string", length=255, nullable=true)
  581. */
  582. private $newContractMarksignDocumentId;
  583. /**
  584. * @ORM\Column(type="string", length=255, nullable=true)
  585. */
  586. private $newContractSignedUrl;
  587. /**
  588. * @ORM\Column(type="string", length=255, nullable=true)
  589. */
  590. private $newContractType;
  591. /**
  592. * @ORM\Column(type="datetime", nullable=true)
  593. * @Groups({"TeacherList"})
  594. */
  595. private $summerAt;
  596. /**
  597. * @ORM\Column(type="boolean", nullable=true)
  598. */
  599. private $flagOnlyIB;
  600. /**
  601. * @ORM\Column(type="boolean", nullable=true)
  602. * @Groups({"TeacherList"})
  603. */
  604. private $flagAutoAcceptAssignment;
  605. /**
  606. * @ORM\Column(type="integer", nullable=true)
  607. */
  608. private $gapBetweenAssignments;
  609. /**
  610. * @ORM\Column(type="boolean", nullable=true)
  611. * @Groups({"TeacherList"})
  612. */
  613. private $flagAutoAcceptAssignmentTeacher;
  614. /**
  615. * @ORM\Column(type="integer", nullable=true)
  616. */
  617. private $gapBetweenAssignmentsTeacher;
  618. /**
  619. * @ORM\Column(type="datetime", nullable=true)
  620. */
  621. private $gapBetweenAssignmentsSubmittedAt;
  622. /**
  623. * @ORM\Column(type="text", nullable=true)
  624. */
  625. private $chatStreamToken;
  626. /**
  627. * @ORM\Column(type="datetime", nullable=true)
  628. */
  629. private $maxLoadChangedAt;
  630. /**
  631. * @ORM\Column(type="datetime", nullable=true)
  632. */
  633. private $mobileAppLastUsedAt;
  634. /**
  635. * @ORM\OneToOne(targetEntity=TeacherQRCode::class, mappedBy="teacher", cascade={"persist", "remove"})
  636. */
  637. private $qrCode;
  638. /**
  639. * @ORM\OneToMany(targetEntity=ChatCensorshipJournal::class, mappedBy="teacher")
  640. */
  641. private $chatCensorshipJournals;
  642. /**
  643. * @ORM\OneToMany(targetEntity=ChildLessonReview::class, mappedBy="Teacher")
  644. */
  645. private $childLessonReviews;
  646. /**
  647. * @ORM\OneToMany(targetEntity=TeacherPublicProfile::class, mappedBy="teacher")
  648. */
  649. private $teacherPublicProfiles;
  650. public function __construct()
  651. {
  652. $this->childPreferences = new ArrayCollection();
  653. $this->childPreferenceHistories = new ArrayCollection();
  654. $this->lessons = new ArrayCollection();
  655. $this->teacherPayments = new ArrayCollection();
  656. $this->teacherPaymentLogs = new ArrayCollection();
  657. $this->teacherComments = new ArrayCollection();
  658. $this->dateAdd = new \DateTime();
  659. $this->disciplines = new ArrayCollection();
  660. $this->teacherDisciplineClasses = new ArrayCollection();
  661. $this->teacherPriceChanges = new ArrayCollection();
  662. $this->teacherAvailabilityTimes = new ArrayCollection();
  663. $this->guardianSurveyResponses = new ArrayCollection();
  664. $this->teacherSurveys = new ArrayCollection();
  665. $this->teacherSurveyResponses = new ArrayCollection();
  666. $this->teacherHolidays = new ArrayCollection();
  667. $this->lessonLearncubeLogs = new ArrayCollection();
  668. $this->childPreferenceDeclineHistories = new ArrayCollection();
  669. $this->teacherHoursBonuses = new ArrayCollection();
  670. $this->teacherTablets = new ArrayCollection();
  671. $this->teacherUnavailableRanges = new ArrayCollection();
  672. $this->teacherSickLeaves = new ArrayCollection();
  673. $this->teacherPaymentBonusProposals = new ArrayCollection();
  674. $this->tablets = new ArrayCollection();
  675. $this->woltCoupons = new ArrayCollection();
  676. $this->chatCensorshipJournals = new ArrayCollection();
  677. $this->childLessonReviews = new ArrayCollection();
  678. $this->teacherPublicProfiles = new ArrayCollection();
  679. $this->flagAutoAcceptAssignment = true;
  680. $this->flagAutoAcceptAssignmentTeacher = true;
  681. }
  682. public function getId(): ?int
  683. {
  684. return $this->id;
  685. }
  686. public function getEmail(): ?string
  687. {
  688. return $this->email;
  689. }
  690. public function setEmail(string $email): self
  691. {
  692. $this->email = $email;
  693. return $this;
  694. }
  695. /**
  696. * A visual identifier that represents this user.
  697. *
  698. * @see UserInterface
  699. */
  700. public function getUsername(): string
  701. {
  702. return (string) $this->email;
  703. }
  704. public function getUserIdentifier(): string
  705. {
  706. return (string) $this->email;
  707. }
  708. /**
  709. * @see UserInterface
  710. */
  711. public function getRoles(): array
  712. {
  713. if(!$this->roles){
  714. $roles = ['ROLE_TEACHER', 'ROLE_USER'];
  715. }
  716. else{
  717. $roles = $this->roles;
  718. }
  719. return array_unique($roles);
  720. }
  721. public function setRoles(array $roles): self
  722. {
  723. $this->roles = $roles;
  724. return $this;
  725. }
  726. /**
  727. * @see UserInterface
  728. */
  729. public function getPassword(): string
  730. {
  731. return (string) $this->password;
  732. }
  733. public function setPassword(string $password): self
  734. {
  735. $this->password = $password;
  736. return $this;
  737. }
  738. /**
  739. * @see UserInterface
  740. */
  741. public function getSalt()
  742. {
  743. // not needed when using the "bcrypt" algorithm in security.yaml
  744. }
  745. /**
  746. * @see UserInterface
  747. */
  748. public function eraseCredentials()
  749. {
  750. // If you store any temporary, sensitive data on the user, clear it here
  751. // $this->plainPassword = null;
  752. }
  753. public function getFullname($showFull = false): ?string
  754. {
  755. if($showFull){
  756. return $this->fullname;
  757. }
  758. else{
  759. $name = explode(" ",$this->fullname)[0];
  760. $name = $name . " " . $this->threemaId;
  761. return $name;
  762. }
  763. }
  764. public function setFullname(?string $fullname): self
  765. {
  766. $this->fullname = $fullname;
  767. return $this;
  768. }
  769. public function getPhoneNumber(): ?string
  770. {
  771. return $this->phoneNumber;
  772. }
  773. public function setPhoneNumber(?string $phoneNumber): self
  774. {
  775. $this->phoneNumber = $phoneNumber;
  776. return $this;
  777. }
  778. public function getUniversity(): ?string
  779. {
  780. return $this->university;
  781. }
  782. public function setUniversity(?string $university): self
  783. {
  784. $this->university = $university;
  785. return $this;
  786. }
  787. public function getWorkStart(): ?\DateTimeInterface
  788. {
  789. return $this->workStart;
  790. }
  791. public function setWorkStart(?\DateTimeInterface $workStart): self
  792. {
  793. $this->workStart = $workStart;
  794. return $this;
  795. }
  796. public function getWorkEnd(): ?\DateTimeInterface
  797. {
  798. return $this->workEnd;
  799. }
  800. public function setWorkEnd(?\DateTimeInterface $workEnd): self
  801. {
  802. $this->workEnd = $workEnd;
  803. return $this;
  804. }
  805. public function getMaxLoad(): ?string
  806. {
  807. return $this->maxLoad;
  808. }
  809. public function setMaxLoad(?string $maxLoad): self
  810. {
  811. $this->maxLoad = $maxLoad;
  812. return $this;
  813. }
  814. /**
  815. * @Groups({"TeacherList"})
  816. */
  817. public function getCurrentLoad()
  818. {
  819. $maxLoad = $this->maxLoad ?: 0;
  820. return $maxLoad - $this->available;
  821. }
  822. public function getAvailable(): ?string
  823. {
  824. return $this->available;
  825. }
  826. public function setAvailable(?string $available): self
  827. {
  828. $this->available = $available;
  829. return $this;
  830. }
  831. public function getStatus(): ?string
  832. {
  833. return $this->status;
  834. }
  835. public function setStatus(?string $status): self
  836. {
  837. $this->status = $status;
  838. return $this;
  839. }
  840. /**
  841. * @return Collection|ChildPreferenceHistory[]
  842. */
  843. public function getChildPreferenceHistories(): Collection
  844. {
  845. return $this->childPreferenceHistories;
  846. }
  847. /**
  848. * @return Collection|ChildPreference[]
  849. */
  850. public function getChildPreferences(): Collection
  851. {
  852. return $this->childPreferences;
  853. }
  854. public function addChildPreference(ChildPreference $childPreference): self
  855. {
  856. if (!$this->childPreferences->contains($childPreference)) {
  857. $this->childPreferences[] = $childPreference;
  858. $childPreference->setTeacher($this);
  859. }
  860. return $this;
  861. }
  862. public function removeChildPreference(ChildPreference $childPreference): self
  863. {
  864. if ($this->childPreferences->removeElement($childPreference)) {
  865. // set the owning side to null (unless already changed)
  866. if ($childPreference->getTeacher() === $this) {
  867. $childPreference->setTeacher(null);
  868. }
  869. }
  870. return $this;
  871. }
  872. public function getIndividualNumber(): ?string
  873. {
  874. return $this->individualNumber;
  875. }
  876. public function setIndividualNumber(?string $individualNumber): self
  877. {
  878. $this->individualNumber = $individualNumber;
  879. return $this;
  880. }
  881. public function getAccountNumber(): ?string
  882. {
  883. return $this->accountNumber;
  884. }
  885. public function setAccountNumber(?string $accountNumber): self
  886. {
  887. $this->accountNumber = $accountNumber;
  888. return $this;
  889. }
  890. public function __toString()
  891. {
  892. return "{$this->fullname}";
  893. }
  894. /**
  895. * @return Collection|Lesson[]
  896. */
  897. public function getLessons(): Collection
  898. {
  899. return $this->lessons;
  900. }
  901. public function addLesson(Lesson $lesson): self
  902. {
  903. if (!$this->lessons->contains($lesson)) {
  904. $this->lessons[] = $lesson;
  905. $lesson->setTeacher($this);
  906. }
  907. return $this;
  908. }
  909. public function removeLesson(Lesson $lesson): self
  910. {
  911. if ($this->lessons->removeElement($lesson)) {
  912. // set the owning side to null (unless already changed)
  913. if ($lesson->getTeacher() === $this) {
  914. $lesson->setTeacher(null);
  915. }
  916. }
  917. return $this;
  918. }
  919. public function getProfileImagePath(): ?string
  920. {
  921. return $this->profileImagePath;
  922. }
  923. public function setProfileImagePath(?string $profileImagePath): self
  924. {
  925. $this->profileImagePath = $profileImagePath;
  926. return $this;
  927. }
  928. /**
  929. * @return Collection|TeacherPayment[]
  930. */
  931. public function getTeacherPayments(): Collection
  932. {
  933. return $this->teacherPayments;
  934. }
  935. public function addTeacherPayment(TeacherPayment $teacherPayment): self
  936. {
  937. if (!$this->teacherPayments->contains($teacherPayment)) {
  938. $this->teacherPayments[] = $teacherPayment;
  939. $teacherPayment->setTeacher($this);
  940. }
  941. return $this;
  942. }
  943. public function removeTeacherPayment(TeacherPayment $teacherPayment): self
  944. {
  945. if ($this->teacherPayments->removeElement($teacherPayment)) {
  946. // set the owning side to null (unless already changed)
  947. if ($teacherPayment->getTeacher() === $this) {
  948. $teacherPayment->setTeacher(null);
  949. }
  950. }
  951. return $this;
  952. }
  953. /**
  954. * @return Collection|TeacherPaymentLog[]
  955. */
  956. public function getTeacherPaymentLogs(): Collection
  957. {
  958. return $this->teacherPaymentLogs;
  959. }
  960. public function addTeacherPaymentLog(TeacherPaymentLog $teacherPaymentLog): self
  961. {
  962. if (!$this->teacherPaymentLogs->contains($teacherPaymentLog)) {
  963. $this->teacherPaymentLogs[] = $teacherPaymentLog;
  964. $teacherPaymentLog->setTeacher($this);
  965. }
  966. return $this;
  967. }
  968. public function removeTeacherPaymentLog(TeacherPaymentLog $teacherPaymentLog): self
  969. {
  970. if ($this->teacherPaymentLogs->removeElement($teacherPaymentLog)) {
  971. // set the owning side to null (unless already changed)
  972. if ($teacherPaymentLog->getTeacher() === $this) {
  973. $teacherPaymentLog->setTeacher(null);
  974. }
  975. }
  976. return $this;
  977. }
  978. /**
  979. * @return Collection|TeacherComment[]
  980. */
  981. public function getTeacherComments(): Collection
  982. {
  983. return $this->teacherComments;
  984. }
  985. public function addTeacherComment(TeacherComment $teacherComment): self
  986. {
  987. if (!$this->teacherComments->contains($teacherComment)) {
  988. $this->teacherComments[] = $teacherComment;
  989. $teacherComment->setTeacher($this);
  990. }
  991. return $this;
  992. }
  993. public function removeTeacherComment(TeacherComment $teacherComment): self
  994. {
  995. if ($this->teacherComments->removeElement($teacherComment)) {
  996. // set the owning side to null (unless already changed)
  997. if ($teacherComment->getTeacher() === $this) {
  998. $teacherComment->setTeacher(null);
  999. }
  1000. }
  1001. return $this;
  1002. }
  1003. public function __call($name, $arguments)
  1004. {
  1005. // TODO: Implement @method string getUserIdentifier()
  1006. }
  1007. public function getDateAdd(): ?\DateTimeInterface
  1008. {
  1009. return $this->dateAdd;
  1010. }
  1011. public function setDateAdd(?\DateTimeInterface $dateAdd): self
  1012. {
  1013. $this->dateAdd = $dateAdd;
  1014. return $this;
  1015. }
  1016. public function getClasses(): ?array
  1017. {
  1018. return explode(',',$this->classes);
  1019. }
  1020. public function setClasses(?array $classes): self
  1021. {
  1022. $classes = implode(',', $classes);
  1023. $this->classes = $classes;
  1024. return $this;
  1025. }
  1026. /**
  1027. * @return Collection|Discipline[]
  1028. */
  1029. public function getDisciplines(): Collection
  1030. {
  1031. return $this->disciplines;
  1032. }
  1033. public function addDiscipline(Discipline $discipline): self
  1034. {
  1035. if (!$this->disciplines->contains($discipline)) {
  1036. $this->disciplines[] = $discipline;
  1037. }
  1038. return $this;
  1039. }
  1040. public function removeDiscipline(Discipline $discipline): self
  1041. {
  1042. $this->disciplines->removeElement($discipline);
  1043. return $this;
  1044. }
  1045. public function getPaymentStatus(): ?string
  1046. {
  1047. return $this->paymentStatus;
  1048. }
  1049. public function setPaymentStatus($balanceStatus): self
  1050. {
  1051. $this->paymentStatus = $balanceStatus;
  1052. return $this;
  1053. }
  1054. /**
  1055. * @return Collection|TeacherDisciplineClass[]
  1056. */
  1057. public function getTeacherDisciplineClasses(): Collection
  1058. {
  1059. return $this->teacherDisciplineClasses;
  1060. }
  1061. public function addTeacherDisciplineClass(TeacherDisciplineClass $teacherDisciplineClass): self
  1062. {
  1063. if (!$this->teacherDisciplineClasses->contains($teacherDisciplineClass)) {
  1064. $this->teacherDisciplineClasses[] = $teacherDisciplineClass;
  1065. $teacherDisciplineClass->setTeacher($this);
  1066. }
  1067. return $this;
  1068. }
  1069. public function removeTeacherDisciplineClass(TeacherDisciplineClass $teacherDisciplineClass): self
  1070. {
  1071. if ($this->teacherDisciplineClasses->removeElement($teacherDisciplineClass)) {
  1072. // set the owning side to null (unless already changed)
  1073. if ($teacherDisciplineClass->getTeacher() === $this) {
  1074. $teacherDisciplineClass->setTeacher(null);
  1075. }
  1076. }
  1077. return $this;
  1078. }
  1079. /**
  1080. * @return Collection|TeacherPriceChange[]
  1081. */
  1082. public function getTeacherPriceChanges(): Collection
  1083. {
  1084. return $this->teacherPriceChanges;
  1085. }
  1086. public function addTeacherPriceChange(TeacherPriceChange $teacherPriceChange): self
  1087. {
  1088. if (!$this->teacherPriceChanges->contains($teacherPriceChange)) {
  1089. $this->teacherPriceChanges[] = $teacherPriceChange;
  1090. $teacherPriceChange->setTeacher($this);
  1091. }
  1092. return $this;
  1093. }
  1094. public function removeTeacherPriceChange(TeacherPriceChange $teacherPriceChange): self
  1095. {
  1096. if ($this->teacherPriceChanges->removeElement($teacherPriceChange)) {
  1097. // set the owning side to null (unless already changed)
  1098. if ($teacherPriceChange->getTeacher() === $this) {
  1099. $teacherPriceChange->setTeacher(null);
  1100. }
  1101. }
  1102. return $this;
  1103. }
  1104. /**
  1105. * @return Collection|TeacherAvailabilityTime[]
  1106. */
  1107. public function getTeacherAvailabilityTimes(): Collection
  1108. {
  1109. return $this->teacherAvailabilityTimes;
  1110. }
  1111. public function addTeacherAvailabilityTime(TeacherAvailabilityTime $teacherAvailabilityTime): self
  1112. {
  1113. if (!$this->teacherAvailabilityTimes->contains($teacherAvailabilityTime)) {
  1114. $this->teacherAvailabilityTimes[] = $teacherAvailabilityTime;
  1115. $teacherAvailabilityTime->setTeacher($this);
  1116. }
  1117. return $this;
  1118. }
  1119. public function removeTeacherAvailabilityTime(TeacherAvailabilityTime $teacherAvailabilityTime): self
  1120. {
  1121. if ($this->teacherAvailabilityTimes->removeElement($teacherAvailabilityTime)) {
  1122. // set the owning side to null (unless already changed)
  1123. if ($teacherAvailabilityTime->getTeacher() === $this) {
  1124. $teacherAvailabilityTime->setTeacher(null);
  1125. }
  1126. }
  1127. return $this;
  1128. }
  1129. public function getComment(): ?string
  1130. {
  1131. return $this->comment;
  1132. }
  1133. public function setComment(?string $comment): self
  1134. {
  1135. $this->comment = $comment;
  1136. return $this;
  1137. }
  1138. /**
  1139. * @return Collection|GuardianSurveyResponse[]
  1140. */
  1141. public function getGuardianSurveyResponses(): Collection
  1142. {
  1143. return $this->guardianSurveyResponses;
  1144. }
  1145. public function addGuardianSurveyResponse(GuardianSurveyResponse $guardianSurveyResponse): self
  1146. {
  1147. if (!$this->guardianSurveyResponses->contains($guardianSurveyResponse)) {
  1148. $this->guardianSurveyResponses[] = $guardianSurveyResponse;
  1149. $guardianSurveyResponse->setTeacher($this);
  1150. }
  1151. return $this;
  1152. }
  1153. public function removeGuardianSurveyResponse(GuardianSurveyResponse $guardianSurveyResponse): self
  1154. {
  1155. if ($this->guardianSurveyResponses->removeElement($guardianSurveyResponse)) {
  1156. // set the owning side to null (unless already changed)
  1157. if ($guardianSurveyResponse->getTeacher() === $this) {
  1158. $guardianSurveyResponse->setTeacher(null);
  1159. }
  1160. }
  1161. return $this;
  1162. }
  1163. public function getShortName(): ?string
  1164. {
  1165. return $this->shortName;
  1166. }
  1167. public function setShortName(?string $shortName): self
  1168. {
  1169. $this->shortName = $shortName;
  1170. return $this;
  1171. }
  1172. public function getSummer(): ?string
  1173. {
  1174. return $this->summer;
  1175. }
  1176. public function setSummer(?string $summer): self
  1177. {
  1178. $this->summer = $summer;
  1179. return $this;
  1180. }
  1181. /**
  1182. * @return Collection|TeacherSurvey[]
  1183. */
  1184. public function getTeacherSurveys(): Collection
  1185. {
  1186. return $this->teacherSurveys;
  1187. }
  1188. public function addTeacherSurvey(TeacherSurvey $teacherSurvey): self
  1189. {
  1190. if (!$this->teacherSurveys->contains($teacherSurvey)) {
  1191. $this->teacherSurveys[] = $teacherSurvey;
  1192. $teacherSurvey->setTeacher($this);
  1193. }
  1194. return $this;
  1195. }
  1196. public function removeTeacherSurvey(TeacherSurvey $teacherSurvey): self
  1197. {
  1198. if ($this->teacherSurveys->removeElement($teacherSurvey)) {
  1199. // set the owning side to null (unless already changed)
  1200. if ($teacherSurvey->getTeacher() === $this) {
  1201. $teacherSurvey->setTeacher(null);
  1202. }
  1203. }
  1204. return $this;
  1205. }
  1206. /**
  1207. * @return Collection|TeacherSurveyResponse[]
  1208. */
  1209. public function getTeacherSurveyResponses(): Collection
  1210. {
  1211. return $this->teacherSurveyResponses;
  1212. }
  1213. public function addTeacherSurveyResponse(TeacherSurveyResponse $teacherSurveyResponse): self
  1214. {
  1215. if (!$this->teacherSurveyResponses->contains($teacherSurveyResponse)) {
  1216. $this->teacherSurveyResponses[] = $teacherSurveyResponse;
  1217. $teacherSurveyResponse->setTeacher($this);
  1218. }
  1219. return $this;
  1220. }
  1221. public function removeTeacherSurveyResponse(TeacherSurveyResponse $teacherSurveyResponse): self
  1222. {
  1223. if ($this->teacherSurveyResponses->removeElement($teacherSurveyResponse)) {
  1224. // set the owning side to null (unless already changed)
  1225. if ($teacherSurveyResponse->getTeacher() === $this) {
  1226. $teacherSurveyResponse->setTeacher(null);
  1227. }
  1228. }
  1229. return $this;
  1230. }
  1231. public function getShowSurvey(): ?bool
  1232. {
  1233. return $this->showSurvey;
  1234. }
  1235. public function setShowSurvey(?bool $showSurvey): self
  1236. {
  1237. $this->showSurvey = $showSurvey;
  1238. return $this;
  1239. }
  1240. public function getShortDescription(): ?string
  1241. {
  1242. return $this->shortDescription;
  1243. }
  1244. public function setShortDescription(?string $shortDescription): self
  1245. {
  1246. $this->shortDescription = $shortDescription;
  1247. return $this;
  1248. }
  1249. public function getDiscordName(): ?string
  1250. {
  1251. return $this->discordName;
  1252. }
  1253. public function setDiscordName(?string $discordName): self
  1254. {
  1255. $this->discordName = $discordName;
  1256. return $this;
  1257. }
  1258. public function getBlockNextDayLessonsReminders(): ?bool
  1259. {
  1260. return $this->blockNextDayLessonsReminders;
  1261. }
  1262. public function setBlockNextDayLessonsReminders(?bool $blockNextDayLessonsReminders): self
  1263. {
  1264. $this->blockNextDayLessonsReminders = $blockNextDayLessonsReminders;
  1265. return $this;
  1266. }
  1267. public function getBlockTodayLessonsReminders(): ?bool
  1268. {
  1269. return $this->blockTodayLessonsReminders;
  1270. }
  1271. public function setBlockTodayLessonsReminders(?bool $blockTodayLessonsReminders): self
  1272. {
  1273. $this->blockTodayLessonsReminders = $blockTodayLessonsReminders;
  1274. return $this;
  1275. }
  1276. public function getLevelInfo()
  1277. {
  1278. $totalHours = $this->workedHours;
  1279. $levelName = $this->levelName;
  1280. $currentLevel = null;
  1281. $nextLevel = null;
  1282. foreach (self::LEVELS as $key => $level) {
  1283. if ($level['name'] == $levelName) {
  1284. $currentLevel = self::LEVELS[$key];
  1285. if(isset(self::LEVELS[$key + 1])) {
  1286. $nextLevel = self::LEVELS[$key + 1];
  1287. }
  1288. }
  1289. }
  1290. $levelInfo = [
  1291. 'totalHours' => $totalHours,
  1292. 'name' => $currentLevel['name'],
  1293. 'hourlyImpact' => $currentLevel['hourlyImpact'],
  1294. 'hourlyRateNow' => $currentLevel['hourlyRate'],
  1295. 'hourlyRateNext' => $nextLevel ? $nextLevel['hourlyRate'] : '---',
  1296. 'currentLevelMinHours' => $currentLevel['hoursMin'],
  1297. 'currentLevelMaxHours' => $currentLevel['hoursMax'],
  1298. 'hoursForNextLevel' => $currentLevel['hoursMax'] - $currentLevel['hoursMin'],
  1299. 'hoursRemainingForNextLevel' => ($currentLevel['hoursMax'] - $currentLevel['hoursMin']) - ($totalHours - $currentLevel['hoursMin'] >= 0 ? $totalHours - $currentLevel['hoursMin'] : $totalHours),
  1300. // 'hoursRemainingForNextLevel' => $currentLevel['hoursMax'] - $totalHours,
  1301. 'hoursCompletedForNextLevel' => $totalHours - $currentLevel['hoursMin'] >= 0 ? $totalHours - $currentLevel['hoursMin'] : $totalHours,
  1302. 'completedPercent' => round(($totalHours - $currentLevel['hoursMin'] >= 0 ? $totalHours - $currentLevel['hoursMin'] : $totalHours) / ($currentLevel['hoursMax'] - $currentLevel['hoursMin']) * 100,0),
  1303. 'badge' => $currentLevel['badge']
  1304. ];
  1305. return $levelInfo;
  1306. }
  1307. public function getWorkedHours(): ?float
  1308. {
  1309. return $this->workedHours;
  1310. }
  1311. public function setWorkedHours(?float $workedHours): self
  1312. {
  1313. $this->workedHours = $workedHours;
  1314. return $this;
  1315. }
  1316. public function getWorkedHoursMarch(): ?float
  1317. {
  1318. return $this->workedHoursMarch;
  1319. }
  1320. public function setWorkedHoursMarch(?float $workedHoursMarch): self
  1321. {
  1322. $this->workedHoursMarch = $workedHoursMarch;
  1323. return $this;
  1324. }
  1325. public function getLevelName(): ?string
  1326. {
  1327. return $this->levelName;
  1328. }
  1329. public function setLevelName(?string $levelName): self
  1330. {
  1331. $this->levelName = $levelName;
  1332. return $this;
  1333. }
  1334. /**
  1335. * @return Collection|TeacherHo+liday[]
  1336. */
  1337. public function getTeacherHolidays(): Collection
  1338. {
  1339. return $this->teacherHolidays;
  1340. }
  1341. public function addTeacherHoliday(TeacherHoliday $teacherHoliday): self
  1342. {
  1343. if (!$this->teacherHolidays->contains($teacherHoliday)) {
  1344. $this->teacherHolidays[] = $teacherHoliday;
  1345. $teacherHoliday->setTeacher($this);
  1346. }
  1347. return $this;
  1348. }
  1349. public function removeTeacherHoliday(TeacherHoliday $teacherHoliday): self
  1350. {
  1351. if ($this->teacherHolidays->removeElement($teacherHoliday)) {
  1352. // set the owning side to null (unless already changed)
  1353. if ($teacherHoliday->getTeacher() === $this) {
  1354. $teacherHoliday->setTeacher(null);
  1355. }
  1356. }
  1357. return $this;
  1358. }
  1359. public function getLessonsMissed(): ?int
  1360. {
  1361. return $this->lessonsMissed;
  1362. }
  1363. public function setLessonsMissed(?int $lessonsMissed): self
  1364. {
  1365. $this->lessonsMissed = $lessonsMissed;
  1366. return $this;
  1367. }
  1368. public function getWarningDate(): ?\DateTimeInterface
  1369. {
  1370. return $this->warningDate;
  1371. }
  1372. public function setWarningDate(?\DateTimeInterface $warningDate): self
  1373. {
  1374. $this->warningDate = $warningDate;
  1375. return $this;
  1376. }
  1377. public function getFlagRU(): ?bool
  1378. {
  1379. return $this->flagRU;
  1380. }
  1381. public function setFlagRU(?bool $flagRU): self
  1382. {
  1383. $this->flagRU = $flagRU;
  1384. return $this;
  1385. }
  1386. public function getFlagPL(): ?bool
  1387. {
  1388. return $this->flagPL;
  1389. }
  1390. public function setFlagPL(?bool $flagPL): self
  1391. {
  1392. $this->flagPL = $flagPL;
  1393. return $this;
  1394. }
  1395. public function getFlagENG(): ?bool
  1396. {
  1397. return $this->flagENG;
  1398. }
  1399. public function setFlagENG(?bool $flagENG): self
  1400. {
  1401. $this->flagENG = $flagENG;
  1402. return $this;
  1403. }
  1404. public function getFlagIB(): ?bool
  1405. {
  1406. return $this->flagIB;
  1407. }
  1408. public function setFlagIB(?bool $flagIB): self
  1409. {
  1410. $this->flagIB = $flagIB;
  1411. return $this;
  1412. }
  1413. public function getFlagDyslexia(): ?bool
  1414. {
  1415. return $this->flagDyslexia;
  1416. }
  1417. public function setFlagDyslexia(?bool $flagDyslexia): self
  1418. {
  1419. $this->flagDyslexia = $flagDyslexia;
  1420. return $this;
  1421. }
  1422. public function getFlagSensitive(): ?bool
  1423. {
  1424. return $this->flagSensitive;
  1425. }
  1426. public function setFlagSensitive(?bool $flagSensitive): self
  1427. {
  1428. $this->flagSensitive = $flagSensitive;
  1429. return $this;
  1430. }
  1431. public function getFlagTrial(): ?bool
  1432. {
  1433. return $this->flagTrial;
  1434. }
  1435. public function setFlagTrial(?bool $flagTrial): self
  1436. {
  1437. $this->flagTrial = $flagTrial;
  1438. return $this;
  1439. }
  1440. public function getExtraLoad(): ?string
  1441. {
  1442. return $this->extraLoad;
  1443. }
  1444. public function setExtraLoad(?string $extraLoad): self
  1445. {
  1446. $this->extraLoad = $extraLoad;
  1447. return $this;
  1448. }
  1449. /**
  1450. * @return Collection<int, LessonLearncubeLog>
  1451. */
  1452. public function getLessonLearncubeLogs(): Collection
  1453. {
  1454. return $this->lessonLearncubeLogs;
  1455. }
  1456. public function addLessonLearncubeLog(LessonLearncubeLog $lessonLearncubeLog): self
  1457. {
  1458. if (!$this->lessonLearncubeLogs->contains($lessonLearncubeLog)) {
  1459. $this->lessonLearncubeLogs[] = $lessonLearncubeLog;
  1460. $lessonLearncubeLog->setTeacher($this);
  1461. }
  1462. return $this;
  1463. }
  1464. public function removeLessonLearncubeLog(LessonLearncubeLog $lessonLearncubeLog): self
  1465. {
  1466. if ($this->lessonLearncubeLogs->removeElement($lessonLearncubeLog)) {
  1467. // set the owning side to null (unless already changed)
  1468. if ($lessonLearncubeLog->getTeacher() === $this) {
  1469. $lessonLearncubeLog->setTeacher(null);
  1470. }
  1471. }
  1472. return $this;
  1473. }
  1474. public function getAdminComment(): ?string
  1475. {
  1476. return $this->adminComment;
  1477. }
  1478. public function setAdminComment(?string $adminComment): self
  1479. {
  1480. $this->adminComment = $adminComment;
  1481. return $this;
  1482. }
  1483. public function getEducationStage(): ?string
  1484. {
  1485. return $this->educationStage;
  1486. }
  1487. public function setEducationStage(?string $educationStage): self
  1488. {
  1489. $this->educationStage = $educationStage;
  1490. return $this;
  1491. }
  1492. /**
  1493. * @return Collection<int, ChildPreferenceDeclineHistory>
  1494. */
  1495. public function getChildPreferenceDeclineHistories(): Collection
  1496. {
  1497. return $this->childPreferenceDeclineHistories;
  1498. }
  1499. public function addChildPreferenceDeclineHistory(ChildPreferenceDeclineHistory $childPreferenceDeclineHistory): self
  1500. {
  1501. if (!$this->childPreferenceDeclineHistories->contains($childPreferenceDeclineHistory)) {
  1502. $this->childPreferenceDeclineHistories[] = $childPreferenceDeclineHistory;
  1503. $childPreferenceDeclineHistory->setTeacher($this);
  1504. }
  1505. return $this;
  1506. }
  1507. public function removeChildPreferenceDeclineHistory(ChildPreferenceDeclineHistory $childPreferenceDeclineHistory): self
  1508. {
  1509. if ($this->childPreferenceDeclineHistories->removeElement($childPreferenceDeclineHistory)) {
  1510. // set the owning side to null (unless already changed)
  1511. if ($childPreferenceDeclineHistory->getTeacher() === $this) {
  1512. $childPreferenceDeclineHistory->setTeacher(null);
  1513. }
  1514. }
  1515. return $this;
  1516. }
  1517. /**
  1518. * @return Collection<int, TeacherHoursBonus>
  1519. */
  1520. public function getTeacherHoursBonuses(): Collection
  1521. {
  1522. return $this->teacherHoursBonuses;
  1523. }
  1524. public function addTeacherHoursBonus(TeacherHoursBonus $teacherHoursBonus): self
  1525. {
  1526. if (!$this->teacherHoursBonuses->contains($teacherHoursBonus)) {
  1527. $this->teacherHoursBonuses[] = $teacherHoursBonus;
  1528. $teacherHoursBonus->setTeacher($this);
  1529. }
  1530. return $this;
  1531. }
  1532. public function removeTeacherHoursBonus(TeacherHoursBonus $teacherHoursBonus): self
  1533. {
  1534. if ($this->teacherHoursBonuses->removeElement($teacherHoursBonus)) {
  1535. // set the owning side to null (unless already changed)
  1536. if ($teacherHoursBonus->getTeacher() === $this) {
  1537. $teacherHoursBonus->setTeacher(null);
  1538. }
  1539. }
  1540. return $this;
  1541. }
  1542. /**
  1543. * @return Collection<int, TeacherTablet>
  1544. */
  1545. public function getTeacherTablets(): Collection
  1546. {
  1547. return $this->teacherTablets;
  1548. }
  1549. public function addTeacherTablet(TeacherTablet $teacherTablet): self
  1550. {
  1551. if (!$this->teacherTablets->contains($teacherTablet)) {
  1552. $this->teacherTablets[] = $teacherTablet;
  1553. $teacherTablet->setTeacher($this);
  1554. }
  1555. return $this;
  1556. }
  1557. public function removeTeacherTablet(TeacherTablet $teacherTablet): self
  1558. {
  1559. if ($this->teacherTablets->removeElement($teacherTablet)) {
  1560. // set the owning side to null (unless already changed)
  1561. if ($teacherTablet->getTeacher() === $this) {
  1562. $teacherTablet->setTeacher(null);
  1563. }
  1564. }
  1565. return $this;
  1566. }
  1567. public function getLcFrom(): ?\DateTimeInterface
  1568. {
  1569. return $this->lcFrom;
  1570. }
  1571. public function setLcFrom(?\DateTimeInterface $lcFrom): self
  1572. {
  1573. $this->lcFrom = $lcFrom;
  1574. return $this;
  1575. }
  1576. /**
  1577. * @return Collection<int, TeacherUnavailableRange>
  1578. */
  1579. public function getTeacherUnavailableRanges($withDeleted = false): Collection
  1580. {
  1581. if(!$withDeleted) {
  1582. foreach ($this->teacherUnavailableRanges as $key => $teacherUnavailableRange) {
  1583. if ($teacherUnavailableRange->isIsDeleted()) {
  1584. unset($this->teacherUnavailableRanges[$key]);
  1585. }
  1586. }
  1587. }
  1588. return $this->teacherUnavailableRanges;
  1589. }
  1590. public function addTeacherUnavailableRange(TeacherUnavailableRange $teacherUnavailableRange): self
  1591. {
  1592. if (!$this->teacherUnavailableRanges->contains($teacherUnavailableRange)) {
  1593. $this->teacherUnavailableRanges[] = $teacherUnavailableRange;
  1594. $teacherUnavailableRange->setTeacher($this);
  1595. }
  1596. return $this;
  1597. }
  1598. public function removeTeacherUnavailableRange(TeacherUnavailableRange $teacherUnavailableRange): self
  1599. {
  1600. if ($this->teacherUnavailableRanges->removeElement($teacherUnavailableRange)) {
  1601. // set the owning side to null (unless already changed)
  1602. if ($teacherUnavailableRange->getTeacher() === $this) {
  1603. $teacherUnavailableRange->setTeacher(null);
  1604. }
  1605. }
  1606. return $this;
  1607. }
  1608. public function getContractTerminateReason(): ?string
  1609. {
  1610. return $this->contractTerminateReason;
  1611. }
  1612. public function setContractTerminateReason(?string $contractTerminateReason): self
  1613. {
  1614. $this->contractTerminateReason = $contractTerminateReason;
  1615. return $this;
  1616. }
  1617. public function getContractTerminateFee(): ?float
  1618. {
  1619. return $this->contractTerminateFee;
  1620. }
  1621. public function setContractTerminateFee(?float $contractTerminateFee): self
  1622. {
  1623. $this->contractTerminateFee = $contractTerminateFee;
  1624. return $this;
  1625. }
  1626. public function isContractTerminateFeePaid(): ?bool
  1627. {
  1628. return $this->contractTerminateFeePaid;
  1629. }
  1630. public function setContractTerminateFeePaid(?bool $contractTerminateFeePaid): self
  1631. {
  1632. $this->contractTerminateFeePaid = $contractTerminateFeePaid;
  1633. return $this;
  1634. }
  1635. public function isUnickoFunction(): ?bool
  1636. {
  1637. return $this->unickoFunction;
  1638. }
  1639. public function getUnickoFunction(): ?bool
  1640. {
  1641. return $this->unickoFunction;
  1642. }
  1643. public function setUnickoFunction(?bool $unickoFunction): self
  1644. {
  1645. $this->unickoFunction = $unickoFunction;
  1646. return $this;
  1647. }
  1648. public function getTeacherRegister(): ?TeacherRegister
  1649. {
  1650. return $this->teacherRegister;
  1651. }
  1652. public function setTeacherRegister(?TeacherRegister $teacherRegister): self
  1653. {
  1654. // unset the owning side of the relation if necessary
  1655. if ($teacherRegister === null && $this->teacherRegister !== null) {
  1656. $this->teacherRegister->setTeacher(null);
  1657. }
  1658. // set the owning side of the relation if necessary
  1659. if ($teacherRegister !== null && $teacherRegister->getTeacher() !== $this) {
  1660. $teacherRegister->setTeacher($this);
  1661. }
  1662. $this->teacherRegister = $teacherRegister;
  1663. return $this;
  1664. }
  1665. public function getBirthday(): ?\DateTimeInterface
  1666. {
  1667. return $this->birthday;
  1668. }
  1669. public function setBirthday(?\DateTimeInterface $birthday): self
  1670. {
  1671. $this->birthday = $birthday;
  1672. return $this;
  1673. }
  1674. public function getIndividualWorkFilePath(): ?string
  1675. {
  1676. return $this->individualWorkFilePath;
  1677. }
  1678. public function setIndividualWorkFilePath(?string $individualWorkFilePath): self
  1679. {
  1680. $this->individualWorkFilePath = $individualWorkFilePath;
  1681. return $this;
  1682. }
  1683. public function getCountry(): ?string
  1684. {
  1685. return $this->country;
  1686. }
  1687. public function setCountry(?string $country): self
  1688. {
  1689. $this->country = $country;
  1690. return $this;
  1691. }
  1692. public function isSummerTime(): ?bool
  1693. {
  1694. return $this->summerTime;
  1695. }
  1696. public function setSummerTime(?bool $summerTime): self
  1697. {
  1698. $this->summerTime = $summerTime;
  1699. return $this;
  1700. }
  1701. public function getStudyField(): ?string
  1702. {
  1703. return $this->studyField;
  1704. }
  1705. public function setStudyField(?string $studyField): self
  1706. {
  1707. $this->studyField = $studyField;
  1708. return $this;
  1709. }
  1710. public function isCongratulatedBirthday(): ?bool
  1711. {
  1712. return $this->congratulatedBirthday !== null;
  1713. }
  1714. public function setCongratulatedBirthday(?\DateTimeInterface $congratulatedBirthday): self
  1715. {
  1716. $this->congratulatedBirthday = $congratulatedBirthday;
  1717. return $this;
  1718. }
  1719. public function getCongratulatedBirthday(): ?\DateTimeInterface
  1720. {
  1721. return $this->congratulatedBirthday;
  1722. }
  1723. public function getGoogleRefreshToken(): ?string
  1724. {
  1725. return $this->googleRefreshToken;
  1726. }
  1727. public function setGoogleRefreshToken(?string $googleRefreshToken): self
  1728. {
  1729. $this->googleRefreshToken = $googleRefreshToken;
  1730. return $this;
  1731. }
  1732. public function getGoogleAccessToken(): ?array
  1733. {
  1734. return $this->googleAccessToken;
  1735. }
  1736. public function setGoogleAccessToken(?array $googleAccessToken): self
  1737. {
  1738. $this->googleAccessToken = $googleAccessToken;
  1739. return $this;
  1740. }
  1741. public function getThreemaPassword(): ?string
  1742. {
  1743. return $this->threemaPassword;
  1744. }
  1745. public function setThreemaPassword(?string $threemaPassword): self
  1746. {
  1747. $this->threemaPassword = $threemaPassword;
  1748. return $this;
  1749. }
  1750. public function getThreemaId(): ?string
  1751. {
  1752. return $this->threemaId;
  1753. }
  1754. public function setThreemaId(?string $threemaId): self
  1755. {
  1756. $this->threemaId = $threemaId;
  1757. return $this;
  1758. }
  1759. public function getThreemaStatus(): ?string
  1760. {
  1761. return $this->threemaStatus;
  1762. }
  1763. public function setThreemaStatus(?string $threemaStatus): self
  1764. {
  1765. $this->threemaStatus = $threemaStatus;
  1766. return $this;
  1767. }
  1768. public function getThreemaGroup(): ?string
  1769. {
  1770. return $this->threemaGroup;
  1771. }
  1772. public function setThreemaGroup(?string $threemaGroup): self
  1773. {
  1774. $this->threemaGroup = $threemaGroup;
  1775. return $this;
  1776. }
  1777. public function getThreemaInviteLastSentAt(): ?\DateTimeInterface
  1778. {
  1779. return $this->threemaInviteLastSentAt;
  1780. }
  1781. public function setThreemaInviteLastSentAt(?\DateTimeInterface $threemaInviteLastSentAt): self
  1782. {
  1783. $this->threemaInviteLastSentAt = $threemaInviteLastSentAt;
  1784. return $this;
  1785. }
  1786. public function isTrainingStarted(): ?bool
  1787. {
  1788. return $this->trainingStarted;
  1789. }
  1790. public function setTrainingStarted(?bool $trainingStarted): self
  1791. {
  1792. $this->trainingStarted = $trainingStarted;
  1793. return $this;
  1794. }
  1795. public function isTrainingEnded(): ?bool
  1796. {
  1797. return $this->trainingEnded;
  1798. }
  1799. public function setTrainingEnded(?bool $trainingEnded): self
  1800. {
  1801. $this->trainingEnded = $trainingEnded;
  1802. return $this;
  1803. }
  1804. public function getReferralCode(): ?string
  1805. {
  1806. return $this->referralCode;
  1807. }
  1808. public function setReferralCode(?string $referralCode): self
  1809. {
  1810. $this->referralCode = $referralCode;
  1811. return $this;
  1812. }
  1813. public function getSchool(): ?string
  1814. {
  1815. return $this->school;
  1816. }
  1817. public function setSchool(?string $school): self
  1818. {
  1819. $this->school = $school;
  1820. return $this;
  1821. }
  1822. public function getIelts(): ?int
  1823. {
  1824. return $this->ielts;
  1825. }
  1826. public function setIelts(?int $ielts): self
  1827. {
  1828. $this->ielts = $ielts;
  1829. return $this;
  1830. }
  1831. /**
  1832. * @return Collection<int, TeacherSickLeaves>
  1833. */
  1834. public function getTeacherSickLeaves(): Collection
  1835. {
  1836. return $this->teacherSickLeaves;
  1837. }
  1838. public function addTeacherSickLeaf(TeacherSickLeaves $teacherSickLeaf): self
  1839. {
  1840. if (!$this->teacherSickLeaves->contains($teacherSickLeaf)) {
  1841. $this->teacherSickLeaves[] = $teacherSickLeaf;
  1842. $teacherSickLeaf->setTeacher($this);
  1843. }
  1844. return $this;
  1845. }
  1846. public function removeTeacherSickLeaf(TeacherSickLeaves $teacherSickLeaf): self
  1847. {
  1848. if ($this->teacherSickLeaves->removeElement($teacherSickLeaf)) {
  1849. // set the owning side to null (unless already changed)
  1850. if ($teacherSickLeaf->getTeacher() === $this) {
  1851. $teacherSickLeaf->setTeacher(null);
  1852. }
  1853. }
  1854. return $this;
  1855. }
  1856. public function getPersonalIdentificationNumber(): ?string
  1857. {
  1858. return $this->personalIdentificationNumber;
  1859. }
  1860. public function setPersonalIdentificationNumber(?string $personalIdentificationNumber): self
  1861. {
  1862. $this->personalIdentificationNumber = $personalIdentificationNumber;
  1863. return $this;
  1864. }
  1865. /**
  1866. * @return Collection<int, TeacherPaymentBonusProposal>
  1867. */
  1868. public function getTeacherPaymentBonusProposals(): Collection
  1869. {
  1870. return $this->teacherPaymentBonusProposals;
  1871. }
  1872. public function addTeacherPaymentBonusProposal(TeacherPaymentBonusProposal $teacherPaymentBonusProposal): self
  1873. {
  1874. if (!$this->teacherPaymentBonusProposals->contains($teacherPaymentBonusProposal)) {
  1875. $this->teacherPaymentBonusProposals[] = $teacherPaymentBonusProposal;
  1876. $teacherPaymentBonusProposal->setTeacher($this);
  1877. }
  1878. return $this;
  1879. }
  1880. public function removeTeacherPaymentBonusProposal(TeacherPaymentBonusProposal $teacherPaymentBonusProposal): self
  1881. {
  1882. if ($this->teacherPaymentBonusProposals->removeElement($teacherPaymentBonusProposal)) {
  1883. // set the owning side to null (unless already changed)
  1884. if ($teacherPaymentBonusProposal->getTeacher() === $this) {
  1885. $teacherPaymentBonusProposal->setTeacher(null);
  1886. }
  1887. }
  1888. return $this;
  1889. }
  1890. /**
  1891. * @return Collection<int, Tablet>
  1892. */
  1893. public function getTablets(): Collection
  1894. {
  1895. return $this->tablets;
  1896. }
  1897. public function addTablet(Tablet $tablet): self
  1898. {
  1899. if (!$this->tablets->contains($tablet)) {
  1900. $this->tablets[] = $tablet;
  1901. $tablet->setTeacher($this);
  1902. }
  1903. return $this;
  1904. }
  1905. public function removeTablet(Tablet $tablet): self
  1906. {
  1907. if ($this->tablets->removeElement($tablet)) {
  1908. // set the owning side to null (unless already changed)
  1909. if ($tablet->getTeacher() === $this) {
  1910. $tablet->setTeacher(null);
  1911. }
  1912. }
  1913. return $this;
  1914. }
  1915. /**
  1916. * @return Collection<int, WoltCoupon>
  1917. */
  1918. public function getWoltCoupons(): Collection
  1919. {
  1920. return $this->woltCoupons;
  1921. }
  1922. public function addWoltCoupon(WoltCoupon $woltCoupon): self
  1923. {
  1924. if (!$this->woltCoupons->contains($woltCoupon)) {
  1925. $this->woltCoupons[] = $woltCoupon;
  1926. $woltCoupon->setTeacher($this);
  1927. }
  1928. return $this;
  1929. }
  1930. public function removeWoltCoupon(WoltCoupon $woltCoupon): self
  1931. {
  1932. if ($this->woltCoupons->removeElement($woltCoupon)) {
  1933. // set the owning side to null (unless already changed)
  1934. if ($woltCoupon->getTeacher() === $this) {
  1935. $woltCoupon->setTeacher(null);
  1936. }
  1937. }
  1938. return $this;
  1939. }
  1940. public function isFlagWeb(): ?bool
  1941. {
  1942. return $this->flagWeb;
  1943. }
  1944. public function setFlagWeb(?bool $flagWeb): self
  1945. {
  1946. $this->flagWeb = $flagWeb;
  1947. return $this;
  1948. }
  1949. public function isFlagStrict(): ?bool
  1950. {
  1951. return $this->flagStrict;
  1952. }
  1953. public function setFlagStrict(?bool $flagStrict): self
  1954. {
  1955. $this->flagStrict = $flagStrict;
  1956. return $this;
  1957. }
  1958. public function getGender(): ?string
  1959. {
  1960. return $this->gender;
  1961. }
  1962. public function setGender(?string $gender): self
  1963. {
  1964. $this->gender = $gender;
  1965. return $this;
  1966. }
  1967. public function isFlagExperienceAtSchool(): ?bool
  1968. {
  1969. return $this->flagExperienceAtSchool;
  1970. }
  1971. public function setFlagExperienceAtSchool(?bool $flagExperienceAtSchool): self
  1972. {
  1973. $this->flagExperienceAtSchool = $flagExperienceAtSchool;
  1974. return $this;
  1975. }
  1976. public function isFlagPriorityAssignment(): ?bool
  1977. {
  1978. return $this->flagPriorityAssignment;
  1979. }
  1980. public function setFlagPriorityAssignment(?bool $flagPriorityAssignment): self
  1981. {
  1982. $this->flagPriorityAssignment = $flagPriorityAssignment;
  1983. return $this;
  1984. }
  1985. public function getTeacherPreference(): ?TeacherPreference
  1986. {
  1987. return $this->teacherPreference;
  1988. }
  1989. public function setTeacherPreference(?TeacherPreference $teacherPreference): self
  1990. {
  1991. // unset the owning side of the relation if necessary
  1992. if ($teacherPreference === null && $this->teacherPreference !== null) {
  1993. $this->teacherPreference->setTeacher(null);
  1994. }
  1995. // set the owning side of the relation if necessary
  1996. if ($teacherPreference !== null && $teacherPreference->getTeacher() !== $this) {
  1997. $teacherPreference->setTeacher($this);
  1998. }
  1999. $this->teacherPreference = $teacherPreference;
  2000. return $this;
  2001. }
  2002. public function getNewContractMarksignUrl(): ?string
  2003. {
  2004. return $this->newContractMarksignUrl;
  2005. }
  2006. public function setNewContractMarksignUrl(?string $newContractMarksignUrl): self
  2007. {
  2008. $this->newContractMarksignUrl = $newContractMarksignUrl;
  2009. return $this;
  2010. }
  2011. public function isNewCotractSigned(): ?bool
  2012. {
  2013. return $this->newCotractSigned;
  2014. }
  2015. public function setNewCotractSigned(?bool $newCotractSigned): self
  2016. {
  2017. $this->newCotractSigned = $newCotractSigned;
  2018. return $this;
  2019. }
  2020. public function getNewContractMarksignDocumentId(): ?string
  2021. {
  2022. return $this->newContractMarksignDocumentId;
  2023. }
  2024. public function setNewContractMarksignDocumentId(?string $newContractMarksignDocumentId): self
  2025. {
  2026. $this->newContractMarksignDocumentId = $newContractMarksignDocumentId;
  2027. return $this;
  2028. }
  2029. public function getNewContractSignedUrl(): ?string
  2030. {
  2031. return $this->newContractSignedUrl;
  2032. }
  2033. public function setNewContractSignedUrl(?string $newContractSignedUrl): self
  2034. {
  2035. $this->newContractSignedUrl = $newContractSignedUrl;
  2036. return $this;
  2037. }
  2038. public function getNewContractType(): ?string
  2039. {
  2040. return $this->newContractType;
  2041. }
  2042. public function setNewContractType(?string $newContractType): self
  2043. {
  2044. $this->newContractType = $newContractType;
  2045. return $this;
  2046. }
  2047. public function getSummerAt(): ?\DateTimeInterface
  2048. {
  2049. return $this->summerAt;
  2050. }
  2051. public function setSummerAt(?\DateTimeInterface $summerAt): self
  2052. {
  2053. $this->summerAt = $summerAt;
  2054. return $this;
  2055. }
  2056. public function isFlagOnlyIB(): ?bool
  2057. {
  2058. return $this->flagOnlyIB;
  2059. }
  2060. public function setFlagOnlyIB(?bool $flagOnlyIB): self
  2061. {
  2062. $this->flagOnlyIB = $flagOnlyIB;
  2063. return $this;
  2064. }
  2065. public function isFlagAutoAcceptAssignment(): ?bool
  2066. {
  2067. return $this->flagAutoAcceptAssignment;
  2068. }
  2069. public function setFlagAutoAcceptAssignment(?bool $flagAutoAcceptAssignment): self
  2070. {
  2071. $this->flagAutoAcceptAssignment = $flagAutoAcceptAssignment;
  2072. return $this;
  2073. }
  2074. public function getGapBetweenAssignments(): ?int
  2075. {
  2076. if($this->gapBetweenAssignments === null) {
  2077. return 5;
  2078. }
  2079. return $this->gapBetweenAssignments;
  2080. }
  2081. public function setGapBetweenAssignments(?int $gapBetweenAssignments): self
  2082. {
  2083. $this->gapBetweenAssignments = $gapBetweenAssignments;
  2084. return $this;
  2085. }
  2086. public function isFlagAutoAcceptAssignmentTeacher(): ?bool
  2087. {
  2088. return $this->flagAutoAcceptAssignmentTeacher;
  2089. }
  2090. public function setFlagAutoAcceptAssignmentTeacher(?bool $flagAutoAcceptAssignmentTeacher): self
  2091. {
  2092. $this->flagAutoAcceptAssignmentTeacher = $flagAutoAcceptAssignmentTeacher;
  2093. return $this;
  2094. }
  2095. /**
  2096. * Backfills the "Be atmetimo" (auto-accept assignment) flags to true for teachers
  2097. * that never got a value set (e.g. created before these flags defaulted to true
  2098. * in the constructor). Never overrides a value an admin/teacher explicitly chose.
  2099. */
  2100. public function initializeAutoAcceptAssignmentDefaultsIfUnset(): self
  2101. {
  2102. if ($this->flagAutoAcceptAssignment === null) {
  2103. $this->flagAutoAcceptAssignment = true;
  2104. }
  2105. if ($this->flagAutoAcceptAssignmentTeacher === null) {
  2106. $this->flagAutoAcceptAssignmentTeacher = true;
  2107. }
  2108. return $this;
  2109. }
  2110. public function getGapBetweenAssignmentsTeacher(): ?int
  2111. {
  2112. return $this->gapBetweenAssignmentsTeacher;
  2113. }
  2114. public function setGapBetweenAssignmentsTeacher(?int $gapBetweenAssignmentsTeacher): self
  2115. {
  2116. $this->gapBetweenAssignmentsTeacher = $gapBetweenAssignmentsTeacher;
  2117. return $this;
  2118. }
  2119. public function getGapBetweenAssignmentsSubmittedAt(): ?\DateTimeInterface
  2120. {
  2121. return $this->gapBetweenAssignmentsSubmittedAt;
  2122. }
  2123. public function setGapBetweenAssignmentsSubmittedAt(?\DateTimeInterface $gapBetweenAssignmentsSubmittedAt): self
  2124. {
  2125. $this->gapBetweenAssignmentsSubmittedAt = $gapBetweenAssignmentsSubmittedAt;
  2126. return $this;
  2127. }
  2128. public function getChatStreamToken(): ?string
  2129. {
  2130. return $this->chatStreamToken;
  2131. }
  2132. public function setChatStreamToken(?string $chatStreamToken): self
  2133. {
  2134. $this->chatStreamToken = $chatStreamToken;
  2135. return $this;
  2136. }
  2137. public function getMaxLoadChangedAt(): ?\DateTimeInterface
  2138. {
  2139. return $this->maxLoadChangedAt;
  2140. }
  2141. public function setMaxLoadChangedAt(?\DateTimeInterface $maxLoadChangedAt): self
  2142. {
  2143. $this->maxLoadChangedAt = $maxLoadChangedAt;
  2144. return $this;
  2145. }
  2146. public function getMobileAppLastUsedAt(): ?\DateTimeInterface
  2147. {
  2148. return $this->mobileAppLastUsedAt;
  2149. }
  2150. public function setMobileAppLastUsedAt(?\DateTimeInterface $mobileAppLastUsedAt): self
  2151. {
  2152. $this->mobileAppLastUsedAt = $mobileAppLastUsedAt;
  2153. return $this;
  2154. }
  2155. /**
  2156. * @return mixed
  2157. */
  2158. public function getQrCode()
  2159. {
  2160. return $this->qrCode;
  2161. }
  2162. /**
  2163. * @param mixed $qrCode
  2164. */
  2165. public function setQrCode($qrCode): void
  2166. {
  2167. $this->qrCode = $qrCode;
  2168. }
  2169. /**
  2170. * @return Collection<int, ChatCensorshipJournal>
  2171. */
  2172. public function getChatCensorshipJournals(): Collection
  2173. {
  2174. return $this->chatCensorshipJournals;
  2175. }
  2176. public function addChatCensorshipJournal(ChatCensorshipJournal $chatCensorshipJournal): self
  2177. {
  2178. if (!$this->chatCensorshipJournals->contains($chatCensorshipJournal)) {
  2179. $this->chatCensorshipJournals[] = $chatCensorshipJournal;
  2180. $chatCensorshipJournal->setTeacher($this);
  2181. }
  2182. return $this;
  2183. }
  2184. public function removeChatCensorshipJournal(ChatCensorshipJournal $chatCensorshipJournal): self
  2185. {
  2186. if ($this->chatCensorshipJournals->removeElement($chatCensorshipJournal)) {
  2187. // set the owning side to null (unless already changed)
  2188. if ($chatCensorshipJournal->getTeacher() === $this) {
  2189. $chatCensorshipJournal->setTeacher(null);
  2190. }
  2191. }
  2192. return $this;
  2193. }
  2194. /**
  2195. * @return Collection<int, ChildLessonReview>
  2196. */
  2197. public function getChildLessonReviews(): Collection
  2198. {
  2199. return $this->childLessonReviews;
  2200. }
  2201. public function addChildLessonReview(ChildLessonReview $childLessonReview): self
  2202. {
  2203. if (!$this->childLessonReviews->contains($childLessonReview)) {
  2204. $this->childLessonReviews[] = $childLessonReview;
  2205. $childLessonReview->setTeacher($this);
  2206. }
  2207. return $this;
  2208. }
  2209. public function removeChildLessonReview(ChildLessonReview $childLessonReview): self
  2210. {
  2211. if ($this->childLessonReviews->removeElement($childLessonReview)) {
  2212. // set the owning side to null (unless already changed)
  2213. if ($childLessonReview->getTeacher() === $this) {
  2214. $childLessonReview->setTeacher(null);
  2215. }
  2216. }
  2217. return $this;
  2218. }
  2219. public function getTeacherPublicProfiles(): Collection
  2220. {
  2221. return $this->teacherPublicProfiles;
  2222. }
  2223. public function setTeacherPublicProfiles(Collection $teacherPublicProfiles): void
  2224. {
  2225. $this->teacherPublicProfiles = $teacherPublicProfiles;
  2226. }
  2227. }