src/Entity/Late.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\LateRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use JMS\Serializer\Annotation\Groups;
  8. #[ORM\HasLifecycleCallbacks]
  9. #[ORM\Entity(repositoryClassLateRepository::class)]
  10. class Late
  11. {
  12.     use Timestampable;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     #[Groups(['getLate'])]
  17.     private ?int $id null;
  18.  
  19.     #[ORM\Column(typeTypes::TIME_MUTABLE)]
  20.     #[Groups(['getLate'])]
  21.     private ?\DateTimeInterface $startTime null;
  22.     #[ORM\Column(typeTypes::TIME_MUTABLE)]
  23.     #[Groups(['getLate'])]
  24.     private ?\DateTimeInterface $endTime null;
  25.     #[ORM\ManyToOne(inversedBy'lates'cascade: ["persist"])]
  26.     #[Groups(['getLate'])]
  27.     private ?Student $student null;
  28.     #[ORM\ManyToOne(inversedBy'lates'cascade: ["persist"])]
  29.     private ?SchoolYear $year null;
  30.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  31.     #[Groups(['getLate'])]
  32.     private ?\DateTimeInterface $lateDate null;
  33.     #[ORM\ManyToOne(inversedBy'lates'cascade: ["persist"])]
  34.     private ?User $author null;
  35.     #[ORM\ManyToOne(inversedBy'latesEdited'cascade: ["persist"])]
  36.     private ?User $editor null;
  37.     #[ORM\ManyToOne(inversedBy'lates'cascade: ["persist"])]
  38.     private ?School $school null;
  39.     #[ORM\ManyToOne(inversedBy'lates'cascade: ["persist"])]
  40.     #[ORM\JoinColumn(nullabletrue)]
  41.     #[Groups(['getLate'])]
  42.     private ?Exams $exam null;
  43.     #[ORM\ManyToOne(inversedBy'lates')]
  44.     #[Groups(['getLate'])]
  45.     private ?TheClass $classe null;
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getStartTime(): ?\DateTimeInterface
  51.     {
  52.         return $this->startTime;
  53.     }
  54.     public function setStartTime(\DateTimeInterface $startTime): static
  55.     {
  56.         $this->startTime $startTime;
  57.         return $this;
  58.     }
  59.     public function getEndTime(): ?\DateTimeInterface
  60.     {
  61.         return $this->endTime;
  62.     }
  63.     public function setEndTime(\DateTimeInterface $endTime): static
  64.     {
  65.         $this->endTime $endTime;
  66.         return $this;
  67.     }
  68.     public function getStudent(): ?Student
  69.     {
  70.         return $this->student;
  71.     }
  72.     public function setStudent(?Student $student): static
  73.     {
  74.         $this->student $student;
  75.         return $this;
  76.     }
  77.     public function getYear(): ?SchoolYear
  78.     {
  79.         return $this->year;
  80.     }
  81.     public function setYear(?SchoolYear $year): static
  82.     {
  83.         $this->year $year;
  84.         return $this;
  85.     }
  86.     public function getLateDate(): ?\DateTimeInterface
  87.     {
  88.         return $this->lateDate;
  89.     }
  90.     public function setLateDate(\DateTimeInterface $lateDate): static
  91.     {
  92.         $this->lateDate $lateDate;
  93.         return $this;
  94.     }
  95.     public function getAuthor(): ?User
  96.     {
  97.         return $this->author;
  98.     }
  99.     public function setAuthor(?User $author): static
  100.     {
  101.         $this->author $author;
  102.         return $this;
  103.     }
  104.     public function getEditor(): ?User
  105.     {
  106.         return $this->editor;
  107.     }
  108.     public function setEditor(?User $editor): static
  109.     {
  110.         $this->editor $editor;
  111.         return $this;
  112.     }
  113.     public function getSchool(): ?School
  114.     {
  115.         return $this->school;
  116.     }
  117.     public function setSchool(?School $school): static
  118.     {
  119.         $this->school $school;
  120.         return $this;
  121.     }
  122.     public function getExam(): ?Exams
  123.     {
  124.         return $this->exam;
  125.     }
  126.     public function setExam(?Exams $exam): static
  127.     {
  128.         $this->exam $exam;
  129.         return $this;
  130.     }
  131.     public function getClasse(): ?TheClass
  132.     {
  133.         return $this->classe;
  134.     }
  135.     public function setClasse(?TheClass $classe): static
  136.     {
  137.         $this->classe $classe;
  138.         return $this;
  139.     }
  140. }