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.      #[Groups(['getLate'])]
  30.     private ?SchoolYear $year null;
  31.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  32.     #[Groups(['getLate'])]
  33.     private ?\DateTimeInterface $lateDate null;
  34.     #[ORM\ManyToOne(inversedBy'lates'cascade: ["persist"])]
  35.     #[Groups(['getLate'])]
  36.     private ?User $author null;
  37.     #[ORM\ManyToOne(inversedBy'latesEdited'cascade: ["persist"])]
  38.     private ?User $editor null;
  39.     #[ORM\ManyToOne(inversedBy'lates'cascade: ["persist"])]
  40.     private ?School $school null;
  41.     #[ORM\ManyToOne(inversedBy'lates'cascade: ["persist"])]
  42.     #[ORM\JoinColumn(nullabletrue)]
  43.     #[Groups(['getLate'])]
  44.     private ?Exams $exam null;
  45.     #[ORM\ManyToOne(inversedBy'lates')]
  46.     #[Groups(['getLate'])]
  47.     private ?TheClass $classe null;
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getStartTime(): ?\DateTimeInterface
  53.     {
  54.         return $this->startTime;
  55.     }
  56.     public function setStartTime(\DateTimeInterface $startTime): static
  57.     {
  58.         $this->startTime $startTime;
  59.         return $this;
  60.     }
  61.     public function getEndTime(): ?\DateTimeInterface
  62.     {
  63.         return $this->endTime;
  64.     }
  65.     public function setEndTime(\DateTimeInterface $endTime): static
  66.     {
  67.         $this->endTime $endTime;
  68.         return $this;
  69.     }
  70.     public function getStudent(): ?Student
  71.     {
  72.         return $this->student;
  73.     }
  74.     public function setStudent(?Student $student): static
  75.     {
  76.         $this->student $student;
  77.         return $this;
  78.     }
  79.     public function getYear(): ?SchoolYear
  80.     {
  81.         return $this->year;
  82.     }
  83.     public function setYear(?SchoolYear $year): static
  84.     {
  85.         $this->year $year;
  86.         return $this;
  87.     }
  88.     public function getLateDate(): ?\DateTimeInterface
  89.     {
  90.         return $this->lateDate;
  91.     }
  92.     public function setLateDate(\DateTimeInterface $lateDate): static
  93.     {
  94.         $this->lateDate $lateDate;
  95.         return $this;
  96.     }
  97.     public function getAuthor(): ?User
  98.     {
  99.         return $this->author;
  100.     }
  101.     public function setAuthor(?User $author): static
  102.     {
  103.         $this->author $author;
  104.         return $this;
  105.     }
  106.     public function getEditor(): ?User
  107.     {
  108.         return $this->editor;
  109.     }
  110.     public function setEditor(?User $editor): static
  111.     {
  112.         $this->editor $editor;
  113.         return $this;
  114.     }
  115.     public function getSchool(): ?School
  116.     {
  117.         return $this->school;
  118.     }
  119.     public function setSchool(?School $school): static
  120.     {
  121.         $this->school $school;
  122.         return $this;
  123.     }
  124.     public function getExam(): ?Exams
  125.     {
  126.         return $this->exam;
  127.     }
  128.     public function setExam(?Exams $exam): static
  129.     {
  130.         $this->exam $exam;
  131.         return $this;
  132.     }
  133.     public function getClasse(): ?TheClass
  134.     {
  135.         return $this->classe;
  136.     }
  137.     public function setClasse(?TheClass $classe): static
  138.     {
  139.         $this->classe $classe;
  140.         return $this;
  141.     }
  142. }