src/Entity/TeacherAbsence.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TeacherAbsenceRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassTeacherAbsenceRepository::class)]
  7. class TeacherAbsence
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'teacherAbsences')]
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     private ?User $teacher null;
  16.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  17.     private ?\DateTimeInterface $absenceDate null;
  18.     #[ORM\ManyToOne(inversedBy'teacherAbsences')]
  19.     #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  20.     private ?AgendaElement $agendaElement null;
  21.     #[ORM\Column(typeTypes::TIME_MUTABLE)]
  22.     private ?\DateTimeInterface $startAt null;
  23.     #[ORM\Column(typeTypes::TIME_MUTABLEnullabletrue)]
  24.     private ?\DateTimeInterface $endAt null;
  25.     #[ORM\ManyToOne(inversedBy'teacherAbsences')]
  26.     #[ORM\JoinColumn(nullablefalse)]
  27.     private ?SchoolYear $year null;
  28.     #[ORM\ManyToOne(inversedBy'teacherAbsences')]
  29.     #[ORM\JoinColumn(nullablefalse)]
  30.     private ?School $school null;
  31.     #[ORM\Column(options: ["default" => true])]
  32.     private ?bool $active true;
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getTeacher(): ?User
  38.     {
  39.         return $this->teacher;
  40.     }
  41.     public function setTeacher(?User $teacher): static
  42.     {
  43.         $this->teacher $teacher;
  44.         return $this;
  45.     }
  46.     public function getAbsenceDate(): ?\DateTimeInterface
  47.     {
  48.         return $this->absenceDate;
  49.     }
  50.     public function setAbsenceDate(\DateTimeInterface $absenceDate): static
  51.     {
  52.         $this->absenceDate $absenceDate;
  53.         return $this;
  54.     }
  55.     public function getAgendaElement(): ?AgendaElement
  56.     {
  57.         return $this->agendaElement;
  58.     }
  59.     public function setAgendaElement(?AgendaElement $agendaElement): static
  60.     {
  61.         $this->agendaElement $agendaElement;
  62.         return $this;
  63.     }
  64.     public function getStartAt(): ?\DateTimeInterface
  65.     {
  66.         return $this->startAt;
  67.     }
  68.     public function setStartAt(\DateTimeInterface $startAt): static
  69.     {
  70.         $this->startAt $startAt;
  71.         return $this;
  72.     }
  73.     public function getEndAt(): ?\DateTimeInterface
  74.     {
  75.         return $this->endAt;
  76.     }
  77.     public function setEndAt(?\DateTimeInterface $endAt): static
  78.     {
  79.         $this->endAt $endAt;
  80.         return $this;
  81.     }
  82.     public function getYear(): ?SchoolYear
  83.     {
  84.         return $this->year;
  85.     }
  86.     public function setYear(?SchoolYear $year): static
  87.     {
  88.         $this->year $year;
  89.         return $this;
  90.     }
  91.     public function getSchool(): ?School
  92.     {
  93.         return $this->school;
  94.     }
  95.     public function setSchool(?School $school): static
  96.     {
  97.         $this->school $school;
  98.         return $this;
  99.     }
  100.     public function isActive(): ?bool
  101.     {
  102.         return $this->active;
  103.     }
  104.     public function setActive(bool $active): static
  105.     {
  106.         $this->active $active;
  107.         return $this;
  108.     }
  109. }