src/Entity/Appreciation.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppreciationRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassAppreciationRepository::class)]
  7. class Appreciation
  8. {
  9.     // Les appréciations du secondaire et celles du primaire/maternelle ont des
  10.     // grilles distinctes (intervalles de moyenne, observations, mentions...) —
  11.     // maternelle est toujours regroupée avec primaire, comme School::isPrimaryOrKindergarten().
  12.     public const LEVEL_SECONDAIRE 'secondaire';
  13.     public const LEVEL_PRIMAIRE 'primaire';
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column]
  17.     private ?int $id null;
  18.     #[ORM\Column(length255)]
  19.     private ?string $abreviation null;
  20.     #[ORM\Column]
  21.     private ?float $start null;
  22.     #[ORM\Column]
  23.     private ?float $end null;
  24.     #[ORM\ManyToOne(inversedBy'appreciations')]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private ?User $author null;
  27.     #[ORM\ManyToOne(inversedBy'appreciations')]
  28.     #[ORM\JoinColumn(nullablefalse)]
  29.     private ?SchoolYear $year null;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $name null;
  32.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  33.     private ?string $observation null;
  34.     #[ORM\Column(length255nullabletrue)]
  35.     private ?string $seqMention null;
  36.     #[ORM\Column(length255nullabletrue)]
  37.     private ?string $quarterMention null;
  38.     #[ORM\Column(length255nullabletrue)]
  39.     private ?string $annualMention null;
  40.     #[ORM\Column(length255nullabletrue)]
  41.     private ?string $mention null;
  42.     #[ORM\Column(length255nullabletrue)]
  43.     private ?string $mentionEn null;
  44.     #[ORM\Column(length255nullabletrue)]
  45.     private ?string $message null;
  46.     #[ORM\Column(length255nullabletrue)]
  47.     private ?string $appreciation null;
  48.     #[ORM\Column(length255nullabletrue)]
  49.     private ?string $appreciationEN null;
  50.     #[ORM\Column(length255nullabletrue)]
  51.     private ?string $nameEn null;
  52.     #[ORM\Column(length255nullabletrue)]
  53.     private ?string $observationEn null;
  54.     #[ORM\Column(length255nullabletrue)]
  55.     private ?string $abreviationEn null;
  56.     #[ORM\Column(length20)]
  57.     private string $level self::LEVEL_SECONDAIRE;
  58.     public function getLevel(): string
  59.     {
  60.         return $this->level;
  61.     }
  62.     public function setLevel(string $level): static
  63.     {
  64.         $this->level $level;
  65.         return $this;
  66.     }
  67.     public function isPrimaryOrKindergarten(): bool
  68.     {
  69.         return $this->level === self::LEVEL_PRIMAIRE;
  70.     }
  71.     public function getId(): ?int
  72.     {
  73.         return $this->id;
  74.     }
  75.     public function getAbreviation(): ?string
  76.     {
  77.         return $this->abreviation;
  78.     }
  79.     public function setAbreviation(string $abreviation): static
  80.     {
  81.         $this->abreviation $abreviation;
  82.         return $this;
  83.     }
  84.     public function getStart()
  85.     {
  86.         return $this->start;
  87.     }
  88.     public function setStart($start): static
  89.     {
  90.         $this->start $start;
  91.         return $this;
  92.     }
  93.     public function getEnd()
  94.     {
  95.         return $this->end;
  96.     }
  97.     public function setEnd($end): static
  98.     {
  99.         $this->end $end;
  100.         return $this;
  101.     }
  102.     public function getAuthor(): ?User
  103.     {
  104.         return $this->author;
  105.     }
  106.     public function setAuthor(?User $author): static
  107.     {
  108.         $this->author $author;
  109.         return $this;
  110.     }
  111.     public function getYear(): ?SchoolYear
  112.     {
  113.         return $this->year;
  114.     }
  115.     public function setYear(?SchoolYear $year): static
  116.     {
  117.         $this->year $year;
  118.         return $this;
  119.     }
  120.     public function getName(): ?string
  121.     {
  122.         return $this->name;
  123.     }
  124.     public function setName(?string $name): static
  125.     {
  126.         $this->name $name;
  127.         return $this;
  128.     }
  129.     public function getObservation(): ?string
  130.     {
  131.         return $this->observation;
  132.     }
  133.     public function setObservation(?string $observation): static
  134.     {
  135.         $this->observation $observation;
  136.         return $this;
  137.     }
  138.     public function getSeqMention(): ?string
  139.     {
  140.         return $this->seqMention;
  141.     }
  142.     public function setSeqMention(?string $seqMention): static
  143.     {
  144.         $this->seqMention $seqMention;
  145.         return $this;
  146.     }
  147.     public function getQuarterMention(): ?string
  148.     {
  149.         return $this->quarterMention;
  150.     }
  151.     public function setQuarterMention(?string $quarterMention): static
  152.     {
  153.         $this->quarterMention $quarterMention;
  154.         return $this;
  155.     }
  156.     public function getAnnualMention(): ?string
  157.     {
  158.         return $this->annualMention;
  159.     }
  160.     public function setAnnualMention(?string $annualMention): static
  161.     {
  162.         $this->annualMention $annualMention;
  163.         return $this;
  164.     }
  165.     public function getMention(): ?string
  166.     {
  167.         return $this->mention;
  168.     }
  169.     public function setMention(?string $mention): static
  170.     {
  171.         $this->mention $mention;
  172.         return $this;
  173.     }
  174.     public function getMentionEn(): ?string
  175.     {
  176.         return $this->mentionEn;
  177.     }
  178.     public function setMentionEn(?string $mentionEn): static
  179.     {
  180.         $this->mentionEn $mentionEn;
  181.         return $this;
  182.     }
  183.     public function getMessage(): ?string
  184.     {
  185.         return $this->message;
  186.     }
  187.     public function setMessage(?string $message): static
  188.     {
  189.         $this->message $message;
  190.         return $this;
  191.     }
  192.     public function getAppreciation(): ?string
  193.     {
  194.         return $this->appreciation;
  195.     }
  196.     public function setAppreciation(?string $appreciation): static
  197.     {
  198.         $this->appreciation $appreciation;
  199.         return $this;
  200.     }
  201.     
  202.     public function getAppreciationEN(): ?string
  203.     {
  204.         return $this->appreciationEn;
  205.     }
  206.     public function setAppreciationEn(?string $appreciationEn): static
  207.     {
  208.         $this->appreciationEn $appreciationEn;
  209.         return $this;
  210.     }
  211.     public function getNameEn(): ?string
  212.     {
  213.         return $this->nameEn;
  214.     }
  215.     public function setNameEn(?string $nameEn): static
  216.     {
  217.         $this->nameEn $nameEn;
  218.         return $this;
  219.     }
  220.     public function getObservationEn(): ?string
  221.     {
  222.         return $this->observationEn;
  223.     }
  224.     public function setObservationEn(?string $observationEn): static
  225.     {
  226.         $this->observationEn $observationEn;
  227.         return $this;
  228.     }
  229.     public function getAbreviationEn(): ?string
  230.     {
  231.         return $this->abreviationEn;
  232.     }
  233.     public function setAbreviationEn(?string $abreviationEn): static
  234.     {
  235.         $this->abreviationEn $abreviationEn;
  236.         return $this;
  237.     }
  238. }