<?phpnamespace App\Entity;use App\Repository\CompetenceRepository;use Doctrine\ORM\Mapping as ORM;use JMS\Serializer\Annotation\Groups;#[ORM\Entity(repositoryClass: CompetenceRepository::class)]class Competence{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] #[Groups(['note'])] private ?int $id = null; // Nullable : une Competence du système "par compétence" est rattachée à un // Quarter (trimestre), pas à un Exams (séquence) — exam et quarter sont // mutuellement exclusifs selon le système d'évaluation de la classe. #[ORM\ManyToOne(inversedBy: 'competences')] private ?Exams $exam = null; #[ORM\ManyToOne] private ?Quarter $quarter = null; // Trace la CompetenceReference nationale (super-admin) dont cette Competence // a été copiée, pour permettre une synchronisation ultérieure (nouvelles // compétences ajoutées côté référentiel) sans écraser les personnalisations // locales déjà faites par l'école — cf. SubjectLessonCopier pour le patron. #[ORM\ManyToOne] private ?CompetenceReference $sourceCompetence = null; #[ORM\ManyToOne(inversedBy: 'competences')] #[ORM\JoinColumn(nullable: false)] private ?Subject $subject = null; #[ORM\Column(type: 'string', length: 255, nullable: true)] #[Groups(['note'])] private ?string $content = null; #[ORM\ManyToOne(inversedBy: 'competences')] #[ORM\JoinColumn(nullable: false)] private ?School $school = null; #[ORM\ManyToOne(inversedBy: 'competences')] #[ORM\JoinColumn(nullable: false)] private ?TheClass $classe = null; #[ORM\ManyToOne(inversedBy: 'competences')] #[ORM\JoinColumn(nullable: false)] private ?SchoolYear $year = null; #[ORM\ManyToOne(inversedBy: 'competences')] #[ORM\JoinColumn(nullable: false)] private ?User $author = null; public function getId(): ?int { return $this->id; } public function getExam(): ?Exams { return $this->exam; } public function setExam(?Exams $exam): static { $this->exam = $exam; return $this; } public function getQuarter(): ?Quarter { return $this->quarter; } public function setQuarter(?Quarter $quarter): static { $this->quarter = $quarter; return $this; } public function getSourceCompetence(): ?CompetenceReference { return $this->sourceCompetence; } public function setSourceCompetence(?CompetenceReference $sourceCompetence): static { $this->sourceCompetence = $sourceCompetence; return $this; } public function getSubject(): ?Subject { return $this->subject; } public function setSubject(?Subject $subject): static { $this->subject = $subject; return $this; } public function getContent(): ?string { return $this->content; } public function setContent(?string $content): static { $this->content = $content; return $this; } public function getSchool(): ?School { return $this->school; } public function setSchool(?School $school): static { $this->school = $school; return $this; } public function getClasse(): ?TheClass { return $this->classe; } public function setClasse(?TheClass $classe): static { $this->classe = $classe; 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; }}