src/Entity/SubNote.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\SubNoteRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\HasLifecycleCallbacks]
  7. #[ORM\Entity(repositoryClassSubNoteRepository::class)]
  8. class SubNote
  9. {
  10.     use Timestampable;
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     #[Groups(['subNote'])]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255)]
  17.     #[Groups(['subNote'])]
  18.     private ?string $name null;
  19.     #[ORM\Column]
  20.     #[Groups(['subNote'])]
  21.     private ?float $note null;
  22.     #[ORM\Column]
  23.     #[Groups(['subNote'])]
  24.     private ?float $percentage null;
  25.     #[ORM\ManyToOne(inversedBy'subNotes')]
  26.     #[ORM\JoinColumn(nullablefalse)]
  27.     private ?Subject $subject null;
  28.     #[ORM\ManyToOne(inversedBy'subNotes')]
  29.     #[ORM\JoinColumn(nullablefalse)]
  30.     private ?TheClass $classe null;
  31.     #[ORM\ManyToOne(inversedBy'subNotes')]
  32.     #[ORM\JoinColumn(nullablefalse)]
  33.     private ?School $school null;
  34.     #[ORM\ManyToOne(inversedBy'subNotes')]
  35.     #[ORM\JoinColumn(nullablefalse)]
  36.     private ?User $author null;
  37.     #[ORM\ManyToOne(inversedBy'subNotes')]
  38.     private ?Note $parent null;
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getName(): ?string
  44.     {
  45.         return $this->name;
  46.     }
  47.     public function setName(string $name): static
  48.     {
  49.         $this->name $name;
  50.         return $this;
  51.     }
  52.     public function getNote(): ?float
  53.     {
  54.         return $this->note;
  55.     }
  56.     public function setNote(float $note): static
  57.     {
  58.         $this->note $note;
  59.         return $this;
  60.     }
  61.     public function getPercentage(): ?float
  62.     {
  63.         return $this->percentage;
  64.     }
  65.     public function setPercentage(float $percentage): static
  66.     {
  67.         $this->percentage $percentage;
  68.         return $this;
  69.     }
  70.     public function getSubject(): ?Subject
  71.     {
  72.         return $this->subject;
  73.     }
  74.     public function setSubject(?Subject $subject): static
  75.     {
  76.         $this->subject $subject;
  77.         return $this;
  78.     }
  79.     public function getClasse(): ?TheClass
  80.     {
  81.         return $this->classe;
  82.     }
  83.     public function setClasse(?TheClass $classe): static
  84.     {
  85.         $this->classe $classe;
  86.         return $this;
  87.     }
  88.     public function getSchool(): ?School
  89.     {
  90.         return $this->school;
  91.     }
  92.     public function setSchool(?School $school): static
  93.     {
  94.         $this->school $school;
  95.         return $this;
  96.     }
  97.     public function getAuthor(): ?User
  98.     {
  99.         return $this->author;
  100.     }
  101.     public function setAuthor(?User $author): static
  102.     {
  103.         $this->author $author;
  104.         return $this;
  105.     }
  106.     public function getParent(): ?Note
  107.     {
  108.         return $this->parent;
  109.     }
  110.     public function setParent(?Note $parent): static
  111.     {
  112.         $this->parent $parent;
  113.         return $this;
  114.     }
  115. }