src/Entity/Competence.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CompetenceRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JMS\Serializer\Annotation\Groups;
  6. #[ORM\Entity(repositoryClassCompetenceRepository::class)]
  7. class Competence
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     #[Groups(['note'])]
  13.     private ?int $id null;
  14.     // Nullable : une Competence du système "par compétence" est rattachée à un
  15.     // Quarter (trimestre), pas à un Exams (séquence) — exam et quarter sont
  16.     // mutuellement exclusifs selon le système d'évaluation de la classe.
  17.     #[ORM\ManyToOne(inversedBy'competences')]
  18.     private ?Exams $exam null;
  19.     #[ORM\ManyToOne]
  20.     private ?Quarter $quarter null;
  21.     // Trace la CompetenceReference nationale (super-admin) dont cette Competence
  22.     // a été copiée, pour permettre une synchronisation ultérieure (nouvelles
  23.     // compétences ajoutées côté référentiel) sans écraser les personnalisations
  24.     // locales déjà faites par l'école — cf. SubjectLessonCopier pour le patron.
  25.     #[ORM\ManyToOne]
  26.     private ?CompetenceReference $sourceCompetence null;
  27.     #[ORM\ManyToOne(inversedBy'competences')]
  28.     #[ORM\JoinColumn(nullablefalse)]
  29.     private ?Subject $subject null;
  30.     #[ORM\Column(type'string'length255nullabletrue)]
  31.     #[Groups(['note'])]
  32.     private ?string $content null;
  33.     #[ORM\ManyToOne(inversedBy'competences')]
  34.     #[ORM\JoinColumn(nullablefalse)]
  35.     private ?School $school null;
  36.     #[ORM\ManyToOne(inversedBy'competences')]
  37.     #[ORM\JoinColumn(nullablefalse)]
  38.     private ?TheClass $classe null;
  39.     #[ORM\ManyToOne(inversedBy'competences')]
  40.     #[ORM\JoinColumn(nullablefalse)]
  41.     private ?SchoolYear $year null;
  42.     #[ORM\ManyToOne(inversedBy'competences')]
  43.     #[ORM\JoinColumn(nullablefalse)]
  44.     private ?User $author null;
  45.     public function getId(): ?int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function getExam(): ?Exams
  50.     {
  51.         return $this->exam;
  52.     }
  53.     public function setExam(?Exams $exam): static
  54.     {
  55.         $this->exam $exam;
  56.         return $this;
  57.     }
  58.     public function getQuarter(): ?Quarter
  59.     {
  60.         return $this->quarter;
  61.     }
  62.     public function setQuarter(?Quarter $quarter): static
  63.     {
  64.         $this->quarter $quarter;
  65.         return $this;
  66.     }
  67.     public function getSourceCompetence(): ?CompetenceReference
  68.     {
  69.         return $this->sourceCompetence;
  70.     }
  71.     public function setSourceCompetence(?CompetenceReference $sourceCompetence): static
  72.     {
  73.         $this->sourceCompetence $sourceCompetence;
  74.         return $this;
  75.     }
  76.     public function getSubject(): ?Subject
  77.     {
  78.         return $this->subject;
  79.     }
  80.     public function setSubject(?Subject $subject): static
  81.     {
  82.         $this->subject $subject;
  83.         return $this;
  84.     }
  85.     public function getContent(): ?string
  86.     {
  87.         return $this->content;
  88.     }
  89.     public function setContent(?string $content): static
  90.     {
  91.         $this->content $content;
  92.         return $this;
  93.     }
  94.     public function getSchool(): ?School
  95.     {
  96.         return $this->school;
  97.     }
  98.     public function setSchool(?School $school): static
  99.     {
  100.         $this->school $school;
  101.         return $this;
  102.     }
  103.     public function getClasse(): ?TheClass
  104.     {
  105.         return $this->classe;
  106.     }
  107.     public function setClasse(?TheClass $classe): static
  108.     {
  109.         $this->classe $classe;
  110.         return $this;
  111.     }
  112.     public function getYear(): ?SchoolYear
  113.     {
  114.         return $this->year;
  115.     }
  116.     public function setYear(?SchoolYear $year): static
  117.     {
  118.         $this->year $year;
  119.         return $this;
  120.     }
  121.     public function getAuthor(): ?User
  122.     {
  123.         return $this->author;
  124.     }
  125.     public function setAuthor(?User $author): static
  126.     {
  127.         $this->author $author;
  128.         return $this;
  129.     }
  130. }