<?php
namespace App\Entity;
use App\Repository\LessonRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
/**
* @ORM\Entity(repositoryClass=LessonRepository::class)
* @ORM\Table(name="lesson",indexes={
* @ORM\Index(name="start_time_idx", columns={"start_time"}),
* @ORM\Index(name="end_time_idx", columns={"end_time"}),
* @ORM\Index(name="status_idx", columns={"status"}),
* @ORM\Index(name="teacher_idx", columns={"teacher_id"}),
* @ORM\Index(name="teacher_missed_flags_start_end_idx", columns={"teacher_id", "child_missed", "teacher_missed", "start_time", "end_time"}),
* @ORM\Index(name="teacher_start_end_idx", columns={"teacher_id", "start_time", "end_time"})
* })
*/
class Lesson
{
const TYPE_INDIVIDUAL = 'INDIVIDUAL';
const TYPE_PAIR = 'PAIR';
const TYPE_INDIVIDUAL_TEXT = 'Individualiai';
const TYPE_PAIR_TEXT = 'Poroje';
const STATUS_REGULAR = [
'value' => "REGULAR",
'text' => 'Įprastas užsiėmimas',
'color' => '#fff',
'description' => 'Užsiėmimas, kuris vyko įprastu, numatytu laiku.'
];
const STATUS_REGULAR_MOVED = [
'value' => "REGULAR_MOVED",
'text' => 'Įprastas perkeltas užsiėmimas',
'color' => '#C1C1C1',
'description' => 'Užsiėmimas, kuris vyko nauju laiku, buvo perkeltas iš vienos dienos į kita, korepetitoriaus ir tėvų ar mokinio bendru sutarimu.'
];
const STATUS_ADDITIONAL = [
'value' => "ADDITIONAL",
'text' => 'Papildomas užsiėmimas',
'color' => '#F2C11D',
'description' => 'Užsiėmimas, kuris yra papildomai pridėtas, korepetitoriaus ir tėvų ar mokinio bendru sutarimu.'
];
const STATUS_MISSED = [
'value' => "MISSED",
'text' => 'Praleistas užsiėmimas',
'color' => '#fc6565',
'description' => ''
];
const STATUS_INFORMED_MISSED = [
'value' => "INFORMED_MISSED",
'text' => 'Informuotai praleistas užsiėmimas',
'color' => '#fcb365',
'description' => ''
];
const STATUS_UNINFORMED_MISSED = [
'value' => "UNINFORMED_MISSED",
'text' => 'Neinformuotai praleistas užsiėmimas',
'color' => '#bd75ff',
'description' => ''
];
const STATUS_TUTOR_UNINFORMED_MISSED = [
'value' => "TUTOR_UNINFORMED_MISSED",
'text' => 'Korepetitoriaus neinformuotai praleistas užsiėmimas',
'color' => '#FF8200',
'description' => 'Užsiėmimas į kurį korepetitorius neprisijungė ar vėlavo 5 min.'
];
const STATUS_CHILD_UNINFORMED_MISSED = [
'value' => "CHILD_UNINFORMED_MISSED",
'text' => 'Mokinio neinformuotai praleistas užsiėmimas',
'color' => '#F74F64',
'description' => 'Užsiėmimas į kurį mokinys neprisijungė ar pavėlavo 15 min. Taip pat, mokinio neinformuotai praleistas užsiėmimas yra laikomas jeigu likus mažiau nei 60 min. iki pamokos pradžios buvo pranešta, jog į užsiėmimą mokinys neprisijungs.'
];
const STATUS_GIFT = [
'value' => "GIFT",
'text' => 'Kompensuojamas užsiėmimas',
'color' => '#58D68D',
'description' => 'Užsiėmimas, kuriuo liko nepatenkintas klientas ir mes atlikę atvejo analizę įsitikiname, kad jis buvo pravestas nekokybiškai. Tokiu atveju už užsiėmimą klientas mokėti neturi.'
];
const STATUS_FREE = [
'value' => "FREE",
'text' => 'Nemokamas užsiėmimas',
'color' => '#00A9FE',
'description' => 'Tai mūsų, kaip įmonės, dovana klientui.'
];
const STATUS_REWORK = [
'value' => "REWORK",
'text' => 'Atidirbimas',
'color' => '#54c44f',
'description' => ''
];
const STATUS_WAITING_PAYMENT = [
'value' => "WAITING_PAYMENT",
'text' => 'Laukiama apmokėjimo',
'color' => '#FF0000',
'description' => ''
];
const STATUS_LATE_CANCEL = [
'value' => "LATE_CANCEL",
'text' => 'Vėlyvas atšaukimas (50%)',
'color' => '#FF0000',
'description' => ''
];
const STATUS_UNPAID_LESSON_TUTOR = [
'value' => "UNPAID_LESSON_TUTOR",
'text' => 'Neapmokamas užsiėmimas',
'color' => '#FF0000',
'description' => ''
];
// const STATUS_TUTOR_CANCELLED = [
// 'value' => "TUTOR_CANCELLED",
// 'text' => 'Korepetitoriaus anuliuotas užsiėmimas',
// 'color' => '#3438b9',
// 'description' => ''
// ];
//
// const STATUS_ADMIN_CANCELLED = [
// 'value' => "ADMIN_CANCELLED",
// 'text' => 'Administracijos anuliuotas užsiėmimas',
// 'color' => '#3438b9',
// 'description' => ''
// ];
const STATUSES = [
self::STATUS_REGULAR,
self::STATUS_REGULAR_MOVED,
self::STATUS_ADDITIONAL,
self::STATUS_TUTOR_UNINFORMED_MISSED,
self::STATUS_CHILD_UNINFORMED_MISSED,
self::STATUS_GIFT,
self::STATUS_FREE,
self::STATUS_INFORMED_MISSED,
self::STATUS_WAITING_PAYMENT,
self::STATUS_LATE_CANCEL,
self::STATUS_UNPAID_LESSON_TUTOR,
// self::STATUS_TUTOR_CANCELLED,
// self::STATUS_ADMIN_CANCELLED,
];
const ALL_STATUSES = [
self::STATUS_REGULAR,
self::STATUS_REGULAR_MOVED,
self::STATUS_ADDITIONAL,
self::STATUS_MISSED,
self::STATUS_INFORMED_MISSED,
self::STATUS_UNINFORMED_MISSED,
self::STATUS_TUTOR_UNINFORMED_MISSED,
self::STATUS_CHILD_UNINFORMED_MISSED,
self::STATUS_GIFT,
self::STATUS_FREE,
self::STATUS_REWORK,
self::STATUS_WAITING_PAYMENT,
self::STATUS_LATE_CANCEL,
self::STATUS_UNPAID_LESSON_TUTOR,
// self::STATUS_TUTOR_CANCELLED,
// self::STATUS_ADMIN_CANCELLED,
];
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"LessonList", "ChildLessonReviewList"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"LessonList"})
*/
private $type = self::TYPE_INDIVIDUAL;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"LessonList"})
*/
private $class;
/**
* @ORM\ManyToOne(targetEntity=Discipline::class, inversedBy="lessons")
* @Groups({"LessonList", "ChildLessonReviewList"})
*/
private $discipline;
/**
* @ORM\ManyToOne(targetEntity=Teacher::class, inversedBy="lessons")
* @Groups({"LessonList"})
*/
private $teacher;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({"LessonList", "ChildLessonReviewList"})
*/
private $startTime;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $endTime;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"LessonList"})
*/
private $duration;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"LessonList"})
*/
private $comment;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"LessonList"})
*/
private $status;
private $statusColor;
/**
* @ORM\ManyToMany(targetEntity=Child::class, inversedBy="lessons")
* @Groups({"LessonList"})
*/
private $children;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"LessonList"})
*/
private $adminComment;
/**
* @ORM\OneToMany(targetEntity=PaymentLog::class, mappedBy="lesson", orphanRemoval=false)
*/
private $paymentLogs;
/**
* @ORM\OneToMany(targetEntity=TeacherPaymentLog::class, mappedBy="lesson", orphanRemoval=false)
*/
private $teacherPaymentLogs;
/**
* @ORM\OneToMany(targetEntity=LessonChangeLog::class, mappedBy="lesson", orphanRemoval=false)
*/
private $lessonChangeLogs;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $statusTeacher = 0;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $statusChild = 0;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $learncubeUUID;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $attendedAtTeacher;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $attendedAtChild;
private $lessonJoin;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"LessonList"})
*/
private $childIsLate = 0;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"LessonList"})
*/
private $childMissed = 0;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"LessonList"})
*/
private $teacherMissed = 0;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $learncubeEndAt;
/**
* @ORM\Column(type="integer", nullable=true,options={"default" : "0"})
* @Groups({"LessonList"})
*/
private $learncubeDuration = 0;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"LessonList"})
*/
private $freeReason;
/**
* @ORM\OneToMany(targetEntity=LessonLearncubeLog::class, mappedBy="lesson", orphanRemoval=true)
*/
private $lessonLearncubeLogs;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"LessonList"})
*/
private $learncubeChildDuration = 0;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"LessonList"})
*/
private $learncubeTeacherDuration = 0;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $movedAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $wasMissedBy;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $dateAdd;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $childMissReason;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $childMissedAt;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $technicalDifficultyComment;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $learncubeReview;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $learncubeRating;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $googleCalendarIdTeacher;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $googleCalendarIdChild;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $googleCalendarIdGuardian;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $publicToken;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $movedBy;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $paid;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $originalStartTime;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $originalEndTime;
/**
* @ORM\OneToMany(targetEntity=ChildLessonReview::class, mappedBy="lesson")
*/
private $childLessonReviews;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default": 0})
*/
private $childDismissedReview = false;
public function __construct()
{
$this->children = new ArrayCollection();
$this->paymentLogs = new ArrayCollection();
$this->teacherPaymentLogs = new ArrayCollection();
$this->lessonChangeLogs = new ArrayCollection();
$this->lessonLearncubeLogs = new ArrayCollection();
$this->dateAdd = new \DateTime();
$this->childLessonReviews = new ArrayCollection();
}
public function __toString()
{
return "{$this->id}";
}
public function getId(): ?int
{
return $this->id;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getClass(): ?int
{
return $this->class;
}
public function setClass(?int $class): self
{
$this->class = $class;
return $this;
}
public function getDiscipline(): ?Discipline
{
return $this->discipline;
}
public function setDiscipline(?Discipline $discipline): self
{
$this->discipline = $discipline;
return $this;
}
public function getTeacher(): ?Teacher
{
return $this->teacher;
}
public function setTeacher(?Teacher $teacher): self
{
$this->teacher = $teacher;
return $this;
}
public function getStartTime(): ?\DateTimeInterface
{
return $this->startTime;
}
public function setStartTime(?\DateTimeInterface $startTime): self
{
$this->startTime = $startTime;
return $this;
}
public function getEndTime(): ?\DateTimeInterface
{
return $this->endTime;
}
public function setEndTime(?\DateTimeInterface $endTime): self
{
$this->endTime = $endTime;
return $this;
}
public function getDuration(): ?int
{
return $this->duration;
}
public function setDuration(?int $duration): self
{
$this->duration = $duration;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getStatus(): ?string
{
$text = $this->status;
foreach (self::ALL_STATUSES as $STATUS)
{
if($STATUS['value'] == $this->status)
{
$text = $STATUS['text'];
}
}
return $text;
}
public function getStatusDescription(): ?string
{
$text = $this->status;
foreach (self::ALL_STATUSES as $STATUS)
{
if($STATUS['value'] == $this->status)
{
$text = $STATUS['description'];
}
}
return $text;
}
public function getStatusValue(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
foreach (self::ALL_STATUSES as $STATUS)
{
if($STATUS['text'] == $status)
{
$status = $STATUS['value'];
}
}
$this->status = $status;
return $this;
}
public function getStatusColor(): ?string
{
$color = "";
foreach (self::ALL_STATUSES as $STATUS)
{
if($STATUS['value'] == $this->status)
{
$color = $STATUS['color'];
}
}
return $color;
}
/**
* @return Collection|Child[]
*/
public function getChildren(): Collection
{
return $this->children;
}
public function getChild(): ?Child
{
return $this->children ? $this->children[0] : null;
}
public function addChild(Child $child): self
{
if (!$this->children->contains($child)) {
$this->children[] = $child;
}
return $this;
}
public function removeChild(Child $child): self
{
$this->children->removeElement($child);
return $this;
}
public function getAdminComment(): ?string
{
return $this->adminComment;
}
public function setAdminComment(?string $adminComment): self
{
$this->adminComment = $adminComment;
return $this;
}
/**
* @return Collection|PaymentLog[]
*/
public function getPaymentLogs(): Collection
{
return $this->paymentLogs;
}
public function addPaymentLog(PaymentLog $paymentLog): self
{
if (!$this->paymentLogs->contains($paymentLog)) {
$this->paymentLogs[] = $paymentLog;
$paymentLog->setLesson($this);
}
return $this;
}
public function removePaymentLog(PaymentLog $paymentLog): self
{
if ($this->paymentLogs->removeElement($paymentLog)) {
// set the owning side to null (unless already changed)
if ($paymentLog->getLesson() === $this) {
$paymentLog->setLesson(null);
}
}
return $this;
}
/**
* @return Collection|TeacherPaymentLog[]
*/
public function getTeacherPaymentLogs(): Collection
{
return $this->teacherPaymentLogs;
}
public function addTeacherPaymentLog(TeacherPaymentLog $teacherPaymentLog): self
{
if (!$this->teacherPaymentLogs->contains($teacherPaymentLog)) {
$this->teacherPaymentLogs[] = $teacherPaymentLog;
$teacherPaymentLog->setLesson($this);
}
return $this;
}
public function removeTeacherPaymentLog(TeacherPaymentLog $teacherPaymentLog): self
{
if ($this->teacherPaymentLogs->removeElement($teacherPaymentLog)) {
// set the owning side to null (unless already changed)
if ($teacherPaymentLog->getLesson() === $this) {
$teacherPaymentLog->setLesson(null);
}
}
return $this;
}
/**
* @Assert\Callback
*/
public function validate(ExecutionContextInterface $context, $payload)
{
$startTime = $this->getStartTime();
$endTime = $this->getEndTime();
$durationDiff = date_diff($startTime, $endTime);
$duration = (int)$durationDiff->i + (int)$durationDiff->h * 60;
if ($duration > 120) {
$context->buildViolation('Maksimalus pamokos laikas yra 2h.')
->atPath('endTime')
->addViolation();
}
}
/**
* @return Collection|LessonChangeLog[]
*/
public function getLessonChangeLogs(): Collection
{
return $this->lessonChangeLogs;
}
public function addLessonChangeLog(LessonChangeLog $lessonChangeLog): self
{
if (!$this->lessonChangeLogs->contains($lessonChangeLog)) {
$this->lessonChangeLogs[] = $lessonChangeLog;
$lessonChangeLog->setLesson($this);
}
return $this;
}
public function removeLessonChangeLog(LessonChangeLog $lessonChangeLog): self
{
if ($this->lessonChangeLogs->removeElement($lessonChangeLog)) {
// set the owning side to null (unless already changed)
if ($lessonChangeLog->getLesson() === $this) {
$lessonChangeLog->setLesson(null);
}
}
return $this;
}
public function isStatusTeacher(): ?bool
{
return $this->statusTeacher;
}
public function setStatusTeacher(?bool $statusTeacher): self
{
$this->statusTeacher = $statusTeacher;
return $this;
}
public function isStatusChild(): ?bool
{
return $this->statusChild;
}
public function setStatusChild(?bool $statusChild): self
{
$this->statusChild = $statusChild;
return $this;
}
public function getLearncubeUUID(): ?string
{
return $this->learncubeUUID;
}
public function setLearncubeUUID(?string $learncubeUUID): self
{
$this->learncubeUUID = $learncubeUUID;
return $this;
}
public function getAttendedAtTeacher(): ?\DateTimeInterface
{
return $this->attendedAtTeacher;
}
public function setAttendedAtTeacher(?\DateTimeInterface $attendedAtTeacher): self
{
$this->attendedAtTeacher = $attendedAtTeacher;
return $this;
}
public function getAttendedAtChild(): ?\DateTimeInterface
{
return $this->attendedAtChild;
}
public function setAttendedAtChild(?\DateTimeInterface $attendedAtChild): self
{
$this->attendedAtChild = $attendedAtChild;
return $this;
}
public function getLessonJoin()
{
$lessonJoin = true;
$endTime = new \DateTime();
$endTime->modify('-5 minutes');
if($this->endTime < $endTime)
{
$lessonJoin = false;
}
$startTime = new \DateTime();
$startTime->modify('+5 minutes');
if($this->startTime > $startTime)
{
$lessonJoin = false;
}
if($this->childMissed || $this->teacherMissed)
{
return false;
}
return $lessonJoin;
}
public function isMovable()
{
$dateNow = new \DateTime();
if(in_array($this->status, [Lesson::STATUS_TUTOR_UNINFORMED_MISSED['value'], Lesson::STATUS_CHILD_UNINFORMED_MISSED['value']]) && $dateNow->format('Y-m-d') == $this->startTime->format('Y-m-d'))
{
return true;
}
if($dateNow < $this->endTime && $dateNow->format('Y-m') == $this->startTime->format('Y-m'))
{
return true;
}
return false;
}
public function getChildIsLate(): ?bool
{
return $this->childIsLate;
}
public function setChildIsLate(?bool $childIsLate): self
{
$this->childIsLate = $childIsLate;
return $this;
}
public function getChildMissed(): ?bool
{
return $this->childMissed;
}
public function setChildMissed(?bool $childMissed): self
{
$this->childMissed = $childMissed;
return $this;
}
public function getTeacherMissed(): ?bool
{
return $this->teacherMissed;
}
public function setTeacherMissed(?bool $teacherMissed): self
{
$this->teacherMissed = $teacherMissed;
return $this;
}
public function getLearncubeEndAt(): ?\DateTimeInterface
{
return $this->learncubeEndAt;
}
public function setLearncubeEndAt(?\DateTimeInterface $learncubeEndAt): self
{
$this->learncubeEndAt = $learncubeEndAt;
return $this;
}
public function getLearncubeDuration(): ?int
{
return $this->learncubeDuration;
}
public function setLearncubeDuration(?int $learncubeDuration): self
{
$this->learncubeDuration = $learncubeDuration;
return $this;
}
public function getFreeReason(): ?string
{
return $this->freeReason;
}
public function setFreeReason(?string $freeReason): self
{
$this->freeReason = $freeReason;
return $this;
}
/**
* @return Collection<int, LessonLearncubeLog>
*/
public function getLessonLearncubeLogs(): Collection
{
return $this->lessonLearncubeLogs;
}
public function addLessonLearncubeLog(LessonLearncubeLog $lessonLearncubeLog): self
{
if (!$this->lessonLearncubeLogs->contains($lessonLearncubeLog)) {
$this->lessonLearncubeLogs[] = $lessonLearncubeLog;
$lessonLearncubeLog->setLesson($this);
}
return $this;
}
public function removeLessonLearncubeLog(LessonLearncubeLog $lessonLearncubeLog): self
{
if ($this->lessonLearncubeLogs->removeElement($lessonLearncubeLog)) {
// set the owning side to null (unless already changed)
if ($lessonLearncubeLog->getLesson() === $this) {
$lessonLearncubeLog->setLesson(null);
}
}
return $this;
}
public function getLearncubeChildDuration(): ?int
{
return $this->learncubeChildDuration;
}
public function setLearncubeChildDuration(?int $learncubeChildDuration): self
{
$this->learncubeChildDuration = $learncubeChildDuration;
return $this;
}
public function getLearncubeTeacherDuration(): ?int
{
return $this->learncubeTeacherDuration;
}
public function setLearncubeTeacherDuration(?int $learncubeTeacherDuration): self
{
$this->learncubeTeacherDuration = $learncubeTeacherDuration;
return $this;
}
public function getMovedAt(): ?\DateTimeInterface
{
return $this->movedAt;
}
public function setMovedAt(?\DateTimeInterface $movedAt): self
{
$this->movedAt = $movedAt;
return $this;
}
public function getWasMissedBy(): ?string
{
return $this->wasMissedBy;
}
public function setWasMissedBy(?string $wasMissedBy): self
{
$this->wasMissedBy = $wasMissedBy;
return $this;
}
public function getDateAdd(): ?\DateTimeInterface
{
return $this->dateAdd;
}
public function setDateAdd(?\DateTimeInterface $dateAdd): self
{
$this->dateAdd = $dateAdd;
return $this;
}
public function getChildMissReason(): ?string
{
return $this->childMissReason;
}
public function setChildMissReason(?string $childMissReason): self
{
$this->childMissReason = $childMissReason;
return $this;
}
public function getChildMissedAt(): ?\DateTimeInterface
{
return $this->childMissedAt;
}
public function setChildMissedAt(?\DateTimeInterface $childMissedAt): self
{
$this->childMissedAt = $childMissedAt;
return $this;
}
public function getTechnicalDifficultyComment(): ?string
{
return $this->technicalDifficultyComment;
}
public function setTechnicalDifficultyComment(?string $technicalDifficultyComment): self
{
$this->technicalDifficultyComment = $technicalDifficultyComment;
return $this;
}
public function getLearncubeReview(): ?string
{
return $this->learncubeReview;
}
public function setLearncubeReview(?string $learncubeReview): self
{
$this->learncubeReview = $learncubeReview;
return $this;
}
public function getLearncubeRating(): ?string
{
return $this->learncubeRating;
}
public function setLearncubeRating(?string $learncubeRating): self
{
$this->learncubeRating = $learncubeRating;
return $this;
}
public function getGoogleCalendarIdTeacher(): ?string
{
return $this->googleCalendarIdTeacher;
}
public function setGoogleCalendarIdTeacher(?string $googleCalendarIdTeacher): self
{
$this->googleCalendarIdTeacher = $googleCalendarIdTeacher;
return $this;
}
public function getGoogleCalendarIdChild(): ?string
{
return $this->googleCalendarIdChild;
}
public function setGoogleCalendarIdChild(?string $googleCalendarIdChild): self
{
$this->googleCalendarIdChild = $googleCalendarIdChild;
return $this;
}
public function getGoogleCalendarIdGuardian(): ?string
{
return $this->googleCalendarIdGuardian;
}
public function setGoogleCalendarIdGuardian(?string $googleCalendarIdGuardian): self
{
$this->googleCalendarIdGuardian = $googleCalendarIdGuardian;
return $this;
}
public function getPublicToken(): ?string
{
return $this->publicToken;
}
public function setPublicToken(?string $publicToken): self
{
$this->publicToken = $publicToken;
return $this;
}
public function getMovedBy(): ?string
{
return $this->movedBy;
}
public function setMovedBy(?string $movedBy): self
{
$this->movedBy = $movedBy;
return $this;
}
public function getPaid(): ?float
{
return $this->paid;
}
public function setPaid(?float $paid): self
{
$this->paid = $paid;
return $this;
}
public function getOriginalStartTime(): ?\DateTimeInterface
{
return $this->originalStartTime;
}
public function setOriginalStartTime(?\DateTimeInterface $originalStartTime): self
{
$this->originalStartTime = $originalStartTime;
return $this;
}
public function getOriginalEndTime(): ?\DateTimeInterface
{
return $this->originalEndTime;
}
public function setOriginalEndTime(?\DateTimeInterface $originalEndTime): self
{
$this->originalEndTime = $originalEndTime;
return $this;
}
/**
* @return Collection<int, ChildLessonReview>
*/
public function getChildLessonReviews(): Collection
{
return $this->childLessonReviews;
}
public function addChildLessonReview(ChildLessonReview $childLessonReview): self
{
if (!$this->childLessonReviews->contains($childLessonReview)) {
$this->childLessonReviews[] = $childLessonReview;
$childLessonReview->setLesson($this);
}
return $this;
}
public function removeChildLessonReview(ChildLessonReview $childLessonReview): self
{
if ($this->childLessonReviews->removeElement($childLessonReview)) {
// set the owning side to null (unless already changed)
if ($childLessonReview->getLesson() === $this) {
$childLessonReview->setLesson(null);
}
}
return $this;
}
public function getChildDismissedReview(): bool
{
return (bool) $this->childDismissedReview;
}
public function setChildDismissedReview(?bool $childDismissedReview): self
{
$this->childDismissedReview = (bool) $childDismissedReview;
return $this;
}
}