src/Entity/PrimaryEvaluation.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\PrimaryEvaluationRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * Évaluation mensuelle d'une école primaire/maternelle — instance locale,
  8.  * copiée depuis PrimaryEvaluationReference (voir PrimaryEvaluationCopier),
  9.  * rattachée à un Quarter réel de l'école. Remplace le simple entier
  10.  * "evalNumber" utilisé initialement : PrimaryComponentNote/DailyAbsence/Late
  11.  * s'y rattachent directement (voir leur champ $evaluation), au lieu d'un
  12.  * entier + Quarter séparé — une seule source de vérité pour le trimestre
  13.  * (accessible via getQuarter()) et pour le libellé affiché sur le bulletin
  14.  * (getEvaluationName()).
  15.  *
  16.  * Éditable localement par l'école après copie (name/nameEn/evaluationName/
  17.  * evaluationNameEn/dates), comme Competence vis-à-vis de CompetenceReference.
  18.  */
  19. #[ORM\HasLifecycleCallbacks]
  20. #[ORM\Entity(repositoryClassPrimaryEvaluationRepository::class)]
  21. class PrimaryEvaluation
  22. {
  23.     use Timestampable;
  24.     #[ORM\Id]
  25.     #[ORM\GeneratedValue]
  26.     #[ORM\Column]
  27.     private ?int $id null;
  28.     #[ORM\ManyToOne]
  29.     #[ORM\JoinColumn(nullablefalse)]
  30.     private ?Quarter $quarter null;
  31.     #[ORM\Column]
  32.     private ?int $position null;
  33.     #[ORM\Column(length255)]
  34.     private ?string $name null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $nameEn null;
  37.     #[ORM\Column(length255)]
  38.     private ?string $evaluationName null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $evaluationNameEn null;
  41.     #[ORM\Column(type'date'nullabletrue)]
  42.     private ?\DateTimeInterface $startAt null;
  43.     #[ORM\Column(type'date'nullabletrue)]
  44.     private ?\DateTimeInterface $endAt null;
  45.     #[ORM\ManyToOne]
  46.     private ?PrimaryEvaluationReference $sourceEvaluation null;
  47.     #[ORM\ManyToOne]
  48.     #[ORM\JoinColumn(nullablefalse)]
  49.     private ?School $school null;
  50.     #[ORM\ManyToOne]
  51.     #[ORM\JoinColumn(nullablefalse)]
  52.     private ?SchoolYear $year null;
  53.     #[ORM\ManyToOne]
  54.     #[ORM\JoinColumn(nullablefalse)]
  55.     private ?User $author null;
  56.     #[ORM\ManyToOne]
  57.     private ?User $editor null;
  58.     public function __toString(): string
  59.     {
  60.         return $this->name ?? '';
  61.     }
  62.     public function getId(): ?int
  63.     {
  64.         return $this->id;
  65.     }
  66.     public function getQuarter(): ?Quarter
  67.     {
  68.         return $this->quarter;
  69.     }
  70.     public function setQuarter(?Quarter $quarter): static
  71.     {
  72.         $this->quarter $quarter;
  73.         return $this;
  74.     }
  75.     public function getPosition(): ?int
  76.     {
  77.         return $this->position;
  78.     }
  79.     public function setPosition(int $position): static
  80.     {
  81.         $this->position $position;
  82.         return $this;
  83.     }
  84.     public function getName(): ?string
  85.     {
  86.         return $this->name;
  87.     }
  88.     public function setName(string $name): static
  89.     {
  90.         $this->name $name;
  91.         return $this;
  92.     }
  93.     public function getNameEn(): ?string
  94.     {
  95.         return $this->nameEn;
  96.     }
  97.     public function setNameEn(?string $nameEn): static
  98.     {
  99.         $this->nameEn $nameEn;
  100.         return $this;
  101.     }
  102.     public function getEvaluationName(): ?string
  103.     {
  104.         return $this->evaluationName;
  105.     }
  106.     public function setEvaluationName(string $evaluationName): static
  107.     {
  108.         $this->evaluationName $evaluationName;
  109.         return $this;
  110.     }
  111.     public function getEvaluationNameEn(): ?string
  112.     {
  113.         return $this->evaluationNameEn;
  114.     }
  115.     public function setEvaluationNameEn(?string $evaluationNameEn): static
  116.     {
  117.         $this->evaluationNameEn $evaluationNameEn;
  118.         return $this;
  119.     }
  120.     public function getStartAt(): ?\DateTimeInterface
  121.     {
  122.         return $this->startAt;
  123.     }
  124.     public function setStartAt(?\DateTimeInterface $startAt): static
  125.     {
  126.         $this->startAt $startAt;
  127.         return $this;
  128.     }
  129.     public function getEndAt(): ?\DateTimeInterface
  130.     {
  131.         return $this->endAt;
  132.     }
  133.     public function setEndAt(?\DateTimeInterface $endAt): static
  134.     {
  135.         $this->endAt $endAt;
  136.         return $this;
  137.     }
  138.     public function getSourceEvaluation(): ?PrimaryEvaluationReference
  139.     {
  140.         return $this->sourceEvaluation;
  141.     }
  142.     public function setSourceEvaluation(?PrimaryEvaluationReference $sourceEvaluation): static
  143.     {
  144.         $this->sourceEvaluation $sourceEvaluation;
  145.         return $this;
  146.     }
  147.     public function getSchool(): ?School
  148.     {
  149.         return $this->school;
  150.     }
  151.     public function setSchool(?School $school): static
  152.     {
  153.         $this->school $school;
  154.         return $this;
  155.     }
  156.     public function getYear(): ?SchoolYear
  157.     {
  158.         return $this->year;
  159.     }
  160.     public function setYear(?SchoolYear $year): static
  161.     {
  162.         $this->year $year;
  163.         return $this;
  164.     }
  165.     public function getAuthor(): ?User
  166.     {
  167.         return $this->author;
  168.     }
  169.     public function setAuthor(?User $author): static
  170.     {
  171.         $this->author $author;
  172.         return $this;
  173.     }
  174.     public function getEditor(): ?User
  175.     {
  176.         return $this->editor;
  177.     }
  178.     public function setEditor(?User $editor): static
  179.     {
  180.         $this->editor $editor;
  181.         return $this;
  182.     }
  183. }