<?php
namespace App\Entity;
use App\Repository\LessonDeletedRepository;
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=LessonDeletedRepository::class)
*/
class LessonDeleted
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $type;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $class;
/**
* @ORM\ManyToOne(targetEntity=Discipline::class)
*/
private $discipline;
/**
* @ORM\ManyToOne(targetEntity=Teacher::class)
*/
private $teacher;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $startTime;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $endTime;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $duration;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $comment;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $status;
/**
* @ORM\ManyToOne(targetEntity=Child::class)
*/
private $child;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adminComment;
/**
* @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;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $childIsLate = 0;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $childMissed = 0;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $teacherMissed = 0;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $learncubeEndAt;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $learncubeDuration;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $freeReason;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $deleteReason;
/**
* @ORM\ManyToOne(targetEntity=Admin::class, inversedBy="lessonDeleteds")
*/
private $admin;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdAt;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $deletedByHr;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $deletedByTeacher;
public function __construct()
{
$this->createdAt = new \DateTime();
}
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 (Lesson::STATUSES as $STATUS)
{
if($STATUS['value'] == $this->status)
{
$text = $STATUS['text'];
}
}
return $text;
}
public function getStatusColor(): ?string
{
$color = "";
foreach (Lesson::ALL_STATUSES as $STATUS)
{
if($STATUS['value'] == $this->status)
{
$color = $STATUS['color'];
}
}
return $color;
}
public function getStatusValue(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
foreach (Lesson::STATUSES as $STATUS)
{
if($STATUS['text'] == $status)
{
$status = $STATUS['value'];
}
}
$this->status = $status;
return $this;
}
public function getChild()
{
return $this->child;
}
public function setChild($child): self
{
$this->child = $child;
return $this;
}
public function getAdminComment(): ?string
{
return $this->adminComment;
}
public function setAdminComment(?string $adminComment): self
{
$this->adminComment = $adminComment;
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 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;
}
public function getDeleteReason(): ?string
{
return $this->deleteReason;
}
public function setDeleteReason(?string $deleteReason): self
{
$this->deleteReason = $deleteReason;
return $this;
}
public function getAdmin(): ?Admin
{
return $this->admin;
}
public function setAdmin(?Admin $admin): self
{
$this->admin = $admin;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getDeletedByHr(): ?bool
{
return $this->deletedByHr;
}
public function setDeletedByHr(?bool $deleted): self
{
$this->deletedByHr = $deleted;
return $this;
}
public function getDeletedByTeacher(): ?bool
{
return $this->deletedByTeacher;
}
public function setDeletedByTeacher(?bool $deleted): self
{
$this->deletedByTeacher = $deleted;
return $this;
}
}