src/Entity/PvComment.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\PvCommentRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. // Commentaire libre d'un PV (procès-verbal), écrit par un éditeur pour un élève sur une période
  8. // précise. Exactement un seul des trois champs exam/quarter/annual est renseigné selon le type de
  9. // PV (séquentiel, trimestriel ou annuel) - c'est ce qui distingue les trois portées.
  10. #[ORM\HasLifecycleCallbacks]
  11. #[ORM\Entity(repositoryClassPvCommentRepository::class)]
  12. class PvComment
  13. {
  14.     use Timestampable;
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     private ?int $id null;
  19.     #[ORM\ManyToOne]
  20.     #[ORM\JoinColumn(nullablefalse)]
  21.     private ?Student $student null;
  22.     #[ORM\ManyToOne]
  23.     #[ORM\JoinColumn(nullablefalse)]
  24.     private ?School $school null;
  25.     #[ORM\ManyToOne]
  26.     #[ORM\JoinColumn(nullablefalse)]
  27.     private ?TheClass $classe null;
  28.     #[ORM\ManyToOne]
  29.     #[ORM\JoinColumn(nullablefalse)]
  30.     private ?SchoolYear $year null;
  31.     // Renseigné uniquement pour un commentaire de PV séquentiel.
  32.     #[ORM\ManyToOne]
  33.     private ?Exams $exam null;
  34.     // Renseigné uniquement pour un commentaire de PV trimestriel.
  35.     #[ORM\ManyToOne]
  36.     private ?Quarter $quarter null;
  37.     // true uniquement pour un commentaire de PV annuel.
  38.     #[ORM\Column(nullabletrue)]
  39.     private ?bool $annual null;
  40.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  41.     private ?string $comment null;
  42.     #[ORM\ManyToOne]
  43.     #[ORM\JoinColumn(nullablefalse)]
  44.     private ?User $author null;
  45.     #[ORM\ManyToOne]
  46.     private ?User $editor null;
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getStudent(): ?Student
  52.     {
  53.         return $this->student;
  54.     }
  55.     public function setStudent(?Student $student): static
  56.     {
  57.         $this->student $student;
  58.         return $this;
  59.     }
  60.     public function getSchool(): ?School
  61.     {
  62.         return $this->school;
  63.     }
  64.     public function setSchool(?School $school): static
  65.     {
  66.         $this->school $school;
  67.         return $this;
  68.     }
  69.     public function getClasse(): ?TheClass
  70.     {
  71.         return $this->classe;
  72.     }
  73.     public function setClasse(?TheClass $classe): static
  74.     {
  75.         $this->classe $classe;
  76.         return $this;
  77.     }
  78.     public function getYear(): ?SchoolYear
  79.     {
  80.         return $this->year;
  81.     }
  82.     public function setYear(?SchoolYear $year): static
  83.     {
  84.         $this->year $year;
  85.         return $this;
  86.     }
  87.     public function getExam(): ?Exams
  88.     {
  89.         return $this->exam;
  90.     }
  91.     public function setExam(?Exams $exam): static
  92.     {
  93.         $this->exam $exam;
  94.         return $this;
  95.     }
  96.     public function getQuarter(): ?Quarter
  97.     {
  98.         return $this->quarter;
  99.     }
  100.     public function setQuarter(?Quarter $quarter): static
  101.     {
  102.         $this->quarter $quarter;
  103.         return $this;
  104.     }
  105.     public function isAnnual(): ?bool
  106.     {
  107.         return $this->annual;
  108.     }
  109.     public function setAnnual(?bool $annual): static
  110.     {
  111.         $this->annual $annual;
  112.         return $this;
  113.     }
  114.     public function getComment(): ?string
  115.     {
  116.         return $this->comment;
  117.     }
  118.     public function setComment(?string $comment): static
  119.     {
  120.         $this->comment $comment;
  121.         return $this;
  122.     }
  123.     public function getAuthor(): ?User
  124.     {
  125.         return $this->author;
  126.     }
  127.     public function setAuthor(?User $author): static
  128.     {
  129.         $this->author $author;
  130.         return $this;
  131.     }
  132.     public function getEditor(): ?User
  133.     {
  134.         return $this->editor;
  135.     }
  136.     public function setEditor(?User $editor): static
  137.     {
  138.         $this->editor $editor;
  139.         return $this;
  140.     }
  141. }