<?phpnamespace App\Entity;use App\Repository\TeacherAbsenceRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: TeacherAbsenceRepository::class)]class TeacherAbsence{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\ManyToOne(inversedBy: 'teacherAbsences')] #[ORM\JoinColumn(nullable: false)] private ?User $teacher = null; #[ORM\Column(type: Types::DATE_MUTABLE)] private ?\DateTimeInterface $absenceDate = null; #[ORM\ManyToOne(inversedBy: 'teacherAbsences')] #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')] private ?AgendaElement $agendaElement = null; #[ORM\Column(type: Types::TIME_MUTABLE)] private ?\DateTimeInterface $startAt = null; #[ORM\Column(type: Types::TIME_MUTABLE, nullable: true)] private ?\DateTimeInterface $endAt = null; #[ORM\ManyToOne(inversedBy: 'teacherAbsences')] #[ORM\JoinColumn(nullable: false)] private ?SchoolYear $year = null; #[ORM\ManyToOne(inversedBy: 'teacherAbsences')] #[ORM\JoinColumn(nullable: false)] private ?School $school = null; #[ORM\Column(options: ["default" => true])] private ?bool $active = true; public function getId(): ?int { return $this->id; } public function getTeacher(): ?User { return $this->teacher; } public function setTeacher(?User $teacher): static { $this->teacher = $teacher; return $this; } public function getAbsenceDate(): ?\DateTimeInterface { return $this->absenceDate; } public function setAbsenceDate(\DateTimeInterface $absenceDate): static { $this->absenceDate = $absenceDate; return $this; } public function getAgendaElement(): ?AgendaElement { return $this->agendaElement; } public function setAgendaElement(?AgendaElement $agendaElement): static { $this->agendaElement = $agendaElement; return $this; } public function getStartAt(): ?\DateTimeInterface { return $this->startAt; } public function setStartAt(\DateTimeInterface $startAt): static { $this->startAt = $startAt; return $this; } public function getEndAt(): ?\DateTimeInterface { return $this->endAt; } public function setEndAt(?\DateTimeInterface $endAt): static { $this->endAt = $endAt; return $this; } public function getYear(): ?SchoolYear { return $this->year; } public function setYear(?SchoolYear $year): static { $this->year = $year; return $this; } public function getSchool(): ?School { return $this->school; } public function setSchool(?School $school): static { $this->school = $school; return $this; } public function isActive(): ?bool { return $this->active; } public function setActive(bool $active): static { $this->active = $active; return $this; }}