src/Entity/JustifyAbsence.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\JustifyAbsenceRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\HasLifecycleCallbacks]
  8. #[ORM\Entity(repositoryClassJustifyAbsenceRepository::class)]
  9. class JustifyAbsence
  10. {
  11.     use Timestampable;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\ManyToOne(inversedBy'justifyAbsences')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     #[ORM\JoinColumn(nullablefalseonDelete"CASCADE")]
  19.     private ?Absence $absence null;
  20.     #[ORM\Column]
  21.     private ?int $number null;
  22.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  23.     private ?string $motif null;
  24.     #[ORM\ManyToOne(inversedBy'justifyAbsences')]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private ?School $school null;
  27.     #[ORM\ManyToOne(inversedBy'justifyAbsences')]
  28.     #[ORM\JoinColumn(nullablefalse)]
  29.     private ?SchoolYear $year null;
  30.     #[ORM\ManyToOne(inversedBy'justifyAbsences')]
  31.     #[ORM\JoinColumn(nullablefalse)]
  32.     private ?User $author null;
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getAbsence(): ?Absence
  38.     {
  39.         return $this->absence;
  40.     }
  41.     public function setAbsence(?Absence $absence): static
  42.     {
  43.         $this->absence $absence;
  44.         return $this;
  45.     }
  46.     public function getNumber(): ?int
  47.     {
  48.         return $this->number;
  49.     }
  50.     public function setNumber(int $number): static
  51.     {
  52.         $this->number $number;
  53.         return $this;
  54.     }
  55.     public function getMotif(): ?string
  56.     {
  57.         return $this->motif;
  58.     }
  59.     public function setMotif(?string $motif): static
  60.     {
  61.         $this->motif $motif;
  62.         return $this;
  63.     }
  64.     public function getSchool(): ?School
  65.     {
  66.         return $this->school;
  67.     }
  68.     public function setSchool(?School $school): static
  69.     {
  70.         $this->school $school;
  71.         return $this;
  72.     }
  73.     public function getYear(): ?SchoolYear
  74.     {
  75.         return $this->year;
  76.     }
  77.     public function setYear(?SchoolYear $year): static
  78.     {
  79.         $this->year $year;
  80.         return $this;
  81.     }
  82.     public function getAuthor(): ?User
  83.     {
  84.         return $this->author;
  85.     }
  86.     public function setAuthor(?User $author): static
  87.     {
  88.         $this->author $author;
  89.         return $this;
  90.     }
  91. }