src/Entity/PrimaryComponentNote.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\PrimaryComponentNoteRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. // Note d'un élève sur une SubjectComponent (sous-matière), pour une
  7. // évaluation mensuelle donnée (PrimaryEvaluation — voir cette entité pour le
  8. // trimestre, accessible via getQuarter()). Entité neuve et isolée, aucun
  9. // rapport avec Note/SubNote/Competence existants.
  10. #[ORM\HasLifecycleCallbacks]
  11. #[ORM\Entity(repositoryClassPrimaryComponentNoteRepository::class)]
  12. class PrimaryComponentNote
  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 ?SubjectComponent $subjectComponent null;
  22.     #[ORM\ManyToOne]
  23.     #[ORM\JoinColumn(nullablefalse)]
  24.     private ?Student $student null;
  25.     #[ORM\ManyToOne]
  26.     #[ORM\JoinColumn(nullablefalse)]
  27.     private ?TheClass $classe null;
  28.     #[ORM\ManyToOne]
  29.     #[ORM\JoinColumn(nullablefalse)]
  30.     private ?PrimaryEvaluation $evaluation null;
  31.     #[ORM\Column]
  32.     private ?float $mark null;
  33.     #[ORM\ManyToOne]
  34.     #[ORM\JoinColumn(nullablefalse)]
  35.     private ?School $school null;
  36.     #[ORM\ManyToOne]
  37.     #[ORM\JoinColumn(nullablefalse)]
  38.     private ?SchoolYear $year null;
  39.     #[ORM\ManyToOne]
  40.     #[ORM\JoinColumn(nullablefalse)]
  41.     private ?User $author null;
  42.     #[ORM\ManyToOne]
  43.     private ?User $editor null;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getSubjectComponent(): ?SubjectComponent
  49.     {
  50.         return $this->subjectComponent;
  51.     }
  52.     public function setSubjectComponent(?SubjectComponent $subjectComponent): static
  53.     {
  54.         $this->subjectComponent $subjectComponent;
  55.         return $this;
  56.     }
  57.     public function getStudent(): ?Student
  58.     {
  59.         return $this->student;
  60.     }
  61.     public function setStudent(?Student $student): static
  62.     {
  63.         $this->student $student;
  64.         return $this;
  65.     }
  66.     public function getClasse(): ?TheClass
  67.     {
  68.         return $this->classe;
  69.     }
  70.     public function setClasse(?TheClass $classe): static
  71.     {
  72.         $this->classe $classe;
  73.         return $this;
  74.     }
  75.     public function getEvaluation(): ?PrimaryEvaluation
  76.     {
  77.         return $this->evaluation;
  78.     }
  79.     public function setEvaluation(?PrimaryEvaluation $evaluation): static
  80.     {
  81.         $this->evaluation $evaluation;
  82.         return $this;
  83.     }
  84.     public function getQuarter(): ?Quarter
  85.     {
  86.         return $this->evaluation?->getQuarter();
  87.     }
  88.     public function getMark(): ?float
  89.     {
  90.         return $this->mark;
  91.     }
  92.     public function setMark(float $mark): static
  93.     {
  94.         $this->mark $mark;
  95.         return $this;
  96.     }
  97.     public function getSchool(): ?School
  98.     {
  99.         return $this->school;
  100.     }
  101.     public function setSchool(?School $school): static
  102.     {
  103.         $this->school $school;
  104.         return $this;
  105.     }
  106.     public function getYear(): ?SchoolYear
  107.     {
  108.         return $this->year;
  109.     }
  110.     public function setYear(?SchoolYear $year): static
  111.     {
  112.         $this->year $year;
  113.         return $this;
  114.     }
  115.     public function getAuthor(): ?User
  116.     {
  117.         return $this->author;
  118.     }
  119.     public function setAuthor(?User $author): static
  120.     {
  121.         $this->author $author;
  122.         return $this;
  123.     }
  124.     public function getEditor(): ?User
  125.     {
  126.         return $this->editor;
  127.     }
  128.     public function setEditor(?User $editor): static
  129.     {
  130.         $this->editor $editor;
  131.         return $this;
  132.     }
  133. }