src/Entity/SubjectComponentReference.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\SubjectComponentReferenceRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * Sous-matière du programme national (créée par le super-admin), rattachée à
  8.  * un SubjectReference — écoles primaires/maternelles uniquement (Oral, Écrit,
  9.  * Pratique, Attitude...), chacune avec son propre barème. Copiée vers
  10.  * SubjectComponent (locale, par école) à la création d'un Subject issu de ce
  11.  * SubjectReference, pour les écoles primaires/maternelles — voir
  12.  * SubjectComponentCopier, calqué sur CompetenceCopier.
  13.  */
  14. #[ORM\HasLifecycleCallbacks]
  15. #[ORM\Entity(repositoryClassSubjectComponentReferenceRepository::class)]
  16. class SubjectComponentReference
  17. {
  18.     use Timestampable;
  19.     #[ORM\Id]
  20.     #[ORM\GeneratedValue]
  21.     #[ORM\Column]
  22.     private ?int $id null;
  23.     #[ORM\ManyToOne(inversedBy'subjectComponentReferences')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?SubjectReference $subjectReference null;
  26.     #[ORM\Column(length255)]
  27.     private ?string $name null;
  28.     #[ORM\Column(length255nullabletrue)]
  29.     private ?string $nameEn null;
  30.     #[ORM\Column]
  31.     private ?float $maxMark null;
  32.     /**
  33.      * Ordre d'affichage parmi les sous-matières de la même matière.
  34.      */
  35.     #[ORM\Column]
  36.     private ?int $position null;
  37.     #[ORM\ManyToOne]
  38.     private ?User $author null;
  39.     public function __toString(): string
  40.     {
  41.         return $this->name ?? '';
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getSubjectReference(): ?SubjectReference
  48.     {
  49.         return $this->subjectReference;
  50.     }
  51.     public function setSubjectReference(?SubjectReference $subjectReference): static
  52.     {
  53.         $this->subjectReference $subjectReference;
  54.         return $this;
  55.     }
  56.     public function getName(): ?string
  57.     {
  58.         return $this->name;
  59.     }
  60.     public function setName(string $name): static
  61.     {
  62.         $this->name $name;
  63.         return $this;
  64.     }
  65.     public function getNameEn(): ?string
  66.     {
  67.         return $this->nameEn;
  68.     }
  69.     public function setNameEn(?string $nameEn): static
  70.     {
  71.         $this->nameEn $nameEn;
  72.         return $this;
  73.     }
  74.     public function getMaxMark(): ?float
  75.     {
  76.         return $this->maxMark;
  77.     }
  78.     public function setMaxMark(float $maxMark): static
  79.     {
  80.         $this->maxMark $maxMark;
  81.         return $this;
  82.     }
  83.     public function getPosition(): ?int
  84.     {
  85.         return $this->position;
  86.     }
  87.     public function setPosition(int $position): static
  88.     {
  89.         $this->position $position;
  90.         return $this;
  91.     }
  92.     public function getAuthor(): ?User
  93.     {
  94.         return $this->author;
  95.     }
  96.     public function setAuthor(?User $author): static
  97.     {
  98.         $this->author $author;
  99.         return $this;
  100.     }
  101. }