<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\HomeworkRepository")
*/
class Homework
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime")
*/
private $SentAt;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\SubscriptionOrder", inversedBy="homeworks")
*/
private $RelatedToSubscription;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\SessionOrder", inversedBy="homeworks")
*/
private $RelatedToGroupCourses;
/**
* @ORM\Column(type="boolean")
*/
private $isCorrected;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $CorrectedAt;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Teacher", inversedBy="homeworks")
* @ORM\JoinColumn(nullable=true)
*/
private $CorrectedBy;
/**
* @ORM\OneToMany(targetEntity="App\Entity\HomeworkFiles", mappedBy="homework", orphanRemoval=true)
*/
private $homeworkFiles;
/**
* @ORM\OneToMany(targetEntity="App\Entity\CorrectionFiles", mappedBy="homework", orphanRemoval=true)
*/
private $correctionFiles;
/**
* @ORM\Column(type="string", length=150, nullable=true)
*/
private $program;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $programLevel;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $numPage;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $numEx;
public function __construct()
{
$this->homeworkFiles = new ArrayCollection();
$this->correctionFiles = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getSentAt(): ?\DateTimeInterface
{
return $this->SentAt;
}
public function setSentAt(\DateTimeInterface $SentAt): self
{
$this->SentAt = $SentAt;
return $this;
}
public function getRelatedToSubscription(): ?SubscriptionOrder
{
return $this->RelatedToSubscription;
}
public function setRelatedToSubscription(?SubscriptionOrder $RelatedToSubscription): self
{
$this->RelatedToSubscription = $RelatedToSubscription;
return $this;
}
public function getRelatedToGroupCourses(): ?SessionOrder
{
return $this->RelatedToGroupCourses;
}
public function setRelatedToGroupCourses(?SessionOrder $RelatedToGroupCourses): self
{
$this->RelatedToGroupCourses = $RelatedToGroupCourses;
return $this;
}
public function getIsCorrected(): ?bool
{
return $this->isCorrected;
}
public function setIsCorrected(bool $isCorrected): self
{
$this->isCorrected = $isCorrected;
return $this;
}
public function getCorrectedAt(): ?\DateTimeInterface
{
return $this->CorrectedAt;
}
public function setCorrectedAt(\DateTimeInterface $CorrectedAt): self
{
$this->CorrectedAt = $CorrectedAt;
return $this;
}
public function getCorrectedBy(): ?Teacher
{
return $this->CorrectedBy;
}
public function setCorrectedBy(?Teacher $CorrectedBy): self
{
$this->CorrectedBy = $CorrectedBy;
return $this;
}
/**
* @return Collection|HomeworkFiles[]
*/
public function getHomeworkFiles(): Collection
{
return $this->homeworkFiles;
}
public function addHomeworkFile(HomeworkFiles $homeworkFile): self
{
if (!$this->homeworkFiles->contains($homeworkFile)) {
$this->homeworkFiles[] = $homeworkFile;
$homeworkFile->setHomework($this);
}
return $this;
}
public function removeHomeworkFile(HomeworkFiles $homeworkFile): self
{
if ($this->homeworkFiles->contains($homeworkFile)) {
$this->homeworkFiles->removeElement($homeworkFile);
// set the owning side to null (unless already changed)
if ($homeworkFile->getHomework() === $this) {
$homeworkFile->setHomework(null);
}
}
return $this;
}
/**
* @return Collection|CorrectionFiles[]
*/
public function getCorrectionFiles(): Collection
{
return $this->correctionFiles;
}
public function addCorrectionFile(CorrectionFiles $correctionFile): self
{
if (!$this->correctionFiles->contains($correctionFile)) {
$this->correctionFiles[] = $correctionFile;
$correctionFile->setHomework($this);
}
return $this;
}
public function removeCorrectionFile(CorrectionFiles $correctionFile): self
{
if ($this->correctionFiles->contains($correctionFile)) {
$this->correctionFiles->removeElement($correctionFile);
// set the owning side to null (unless already changed)
if ($correctionFile->getHomework() === $this) {
$correctionFile->setHomework(null);
}
}
return $this;
}
public function getProgram(): ?string
{
return $this->program;
}
public function setProgram(?string $program): self
{
$this->program = $program;
return $this;
}
public function getProgramLevel(): ?string
{
return $this->programLevel;
}
public function setProgramLevel(?string $programLevel): self
{
$this->programLevel = $programLevel;
return $this;
}
public function getNumPage(): ?string
{
return $this->numPage;
}
public function setNumPage(?string $numPage): self
{
$this->numPage = $numPage;
return $this;
}
public function getNumEx(): ?int
{
return $this->numEx;
}
public function setNumEx(?int $numEx): self
{
$this->numEx = $numEx;
return $this;
}
}