<?php
namespace App\Entity;
use App\Entity\Traits\Timestampable;
use App\Repository\ProfTimeRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\HasLifecycleCallbacks]
#[ORM\Entity(repositoryClass: ProfTimeRepository::class)]
class ProfTime
{
use Timestampable;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::TIME_MUTABLE)]
private ?\DateTimeInterface $startTime = null;
#[ORM\Column(type: Types::TIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $endTime = null;
#[ORM\ManyToOne(inversedBy: 'profTimes')]
#[ORM\JoinColumn(nullable: false)]
private ?User $prof = null;
#[ORM\ManyToOne(inversedBy: 'profTimes')]
#[ORM\JoinColumn(nullable: false)]
private ?Subject $subject = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $day = null;
#[ORM\ManyToOne(inversedBy: 'profTimes')]
private ?Exams $exam = null;
#[ORM\ManyToOne(inversedBy: 'profTimes')]
private ?ExamWeek $week = null;
#[ORM\ManyToOne(inversedBy: 'profTimes')]
#[ORM\JoinColumn(nullable: false)]
private ?School $school = null;
#[ORM\ManyToOne(inversedBy: 'profTimes')]
#[ORM\JoinColumn(nullable: false)]
private ?SchoolYear $year = null;
#[ORM\Column(nullable: true)]
private ?float $duration = null;
#[ORM\ManyToOne(inversedBy: 'profTimes')]
#[ORM\JoinColumn(nullable: false)]
private ?AgendaElement $agendaElement = null;
public function getId(): ?int
{
return $this->id;
}
public function getStartTime(): ?\DateTimeInterface
{
return $this->startTime;
}
public function setStartTime(\DateTimeInterface $startTime): static
{
$this->startTime = $startTime;
return $this;
}
public function getEndTime(): ?\DateTimeInterface
{
return $this->endTime;
}
public function setEndTime(\DateTimeInterface $endTime): static
{
$this->endTime = $endTime;
return $this;
}
public function getProf(): ?User
{
return $this->prof;
}
public function setProf(?User $prof): static
{
$this->prof = $prof;
return $this;
}
public function getSubject(): ?Subject
{
return $this->subject;
}
public function setSubject(?Subject $subject): static
{
$this->subject = $subject;
return $this;
}
public function getDay(): ?\DateTimeInterface
{
return $this->day;
}
public function setDay(\DateTimeInterface $day): static
{
$this->day = $day;
return $this;
}
public function getExam(): ?Exams
{
return $this->exam;
}
public function setExam(?Exams $exam): static
{
$this->exam = $exam;
return $this;
}
public function getWeek(): ?ExamWeek
{
return $this->week;
}
public function setWeek(?ExamWeek $week): static
{
$this->week = $week;
return $this;
}
public function getSchool(): ?School
{
return $this->school;
}
public function setSchool(?School $school): static
{
$this->school = $school;
return $this;
}
public function getYear(): ?SchoolYear
{
return $this->year;
}
public function setYear(?SchoolYear $year): static
{
$this->year = $year;
return $this;
}
public function getDuration(): ?float
{
return $this->duration;
}
public function setDuration(float $duration): static
{
$this->duration = $duration;
return $this;
}
public function getAgendaElement(): ?AgendaElement
{
return $this->agendaElement;
}
public function setAgendaElement(?AgendaElement $agendaElement): static
{
$this->agendaElement = $agendaElement;
return $this;
}
}