<?phpnamespace App\Entity;use App\Entity\Traits\Timestampable;use App\Repository\PrimaryComponentNoteRepository;use Doctrine\ORM\Mapping as ORM;// Note d'un élève sur une SubjectComponent (sous-matière), pour une// évaluation mensuelle donnée (PrimaryEvaluation — voir cette entité pour le// trimestre, accessible via getQuarter()). Entité neuve et isolée, aucun// rapport avec Note/SubNote/Competence existants.#[ORM\HasLifecycleCallbacks]#[ORM\Entity(repositoryClass: PrimaryComponentNoteRepository::class)]class PrimaryComponentNote{ use Timestampable; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?SubjectComponent $subjectComponent = null; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?Student $student = null; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?TheClass $classe = null; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?PrimaryEvaluation $evaluation = null; #[ORM\Column] private ?float $mark = null; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?School $school = null; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?SchoolYear $year = null; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?User $author = null; #[ORM\ManyToOne] private ?User $editor = null; public function getId(): ?int { return $this->id; } public function getSubjectComponent(): ?SubjectComponent { return $this->subjectComponent; } public function setSubjectComponent(?SubjectComponent $subjectComponent): static { $this->subjectComponent = $subjectComponent; return $this; } public function getStudent(): ?Student { return $this->student; } public function setStudent(?Student $student): static { $this->student = $student; return $this; } public function getClasse(): ?TheClass { return $this->classe; } public function setClasse(?TheClass $classe): static { $this->classe = $classe; return $this; } public function getEvaluation(): ?PrimaryEvaluation { return $this->evaluation; } public function setEvaluation(?PrimaryEvaluation $evaluation): static { $this->evaluation = $evaluation; return $this; } public function getQuarter(): ?Quarter { return $this->evaluation?->getQuarter(); } public function getMark(): ?float { return $this->mark; } public function setMark(float $mark): static { $this->mark = $mark; return $this; } public function getSchool(): ?School { return $this->school; } public function setSchool(?School $school): static { $this->school = $school; return $this; } public function getYear(): ?SchoolYear { return $this->year; } public function setYear(?SchoolYear $year): static { $this->year = $year; return $this; } public function getAuthor(): ?User { return $this->author; } public function setAuthor(?User $author): static { $this->author = $author; return $this; } public function getEditor(): ?User { return $this->editor; } public function setEditor(?User $editor): static { $this->editor = $editor; return $this; }}