src/Entity/ProfSchoolPlanner.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProfSchoolPlannerRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassProfSchoolPlannerRepository::class)]
  9. class ProfSchoolPlanner
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::TEXT)]
  16.     private ?string $comment null;
  17.     #[ORM\ManyToOne(inversedBy'profSchoolPlanners')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?Subject $subject null;
  20.     #[ORM\ManyToOne(inversedBy'profSchoolPlanners')]
  21.     #[ORM\JoinColumn(nullablefalse)]
  22.     private ?Exams $exam null;
  23.     #[ORM\ManyToOne(inversedBy'profSchoolPlanners')]
  24.     private ?ExamWeek $week null;
  25.     #[ORM\ManyToOne(inversedBy'profSchoolPlanners')]
  26.     #[ORM\JoinColumn(nullablefalse)]
  27.     private ?SchoolYear $year null;
  28.     #[ORM\ManyToOne(inversedBy'profSchoolPlanners')]
  29.     #[ORM\JoinColumn(nullablefalse)]
  30.     private ?School $school null;
  31.     #[ORM\OneToMany(mappedBy'profSchoolPlanner'targetEntityWeekSubjectGoal::class)]
  32.     private Collection $weekGoals;
  33.     public function __construct()
  34.     {
  35.         $this->weekGoals = new ArrayCollection();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getComment(): ?string
  42.     {
  43.         return $this->comment;
  44.     }
  45.     public function setComment(string $comment): static
  46.     {
  47.         $this->comment $comment;
  48.         return $this;
  49.     }
  50.     public function getSubject(): ?Subject
  51.     {
  52.         return $this->subject;
  53.     }
  54.     public function setSubject(?Subject $subject): static
  55.     {
  56.         $this->subject $subject;
  57.         return $this;
  58.     }
  59.     public function getExam(): ?Exams
  60.     {
  61.         return $this->exam;
  62.     }
  63.     public function setExam(?Exams $exam): static
  64.     {
  65.         $this->exam $exam;
  66.         return $this;
  67.     }
  68.     public function getWeek(): ?ExamWeek
  69.     {
  70.         return $this->week;
  71.     }
  72.     public function setWeek(?ExamWeek $week): static
  73.     {
  74.         $this->week $week;
  75.         return $this;
  76.     }
  77.     public function getYear(): ?SchoolYear
  78.     {
  79.         return $this->year;
  80.     }
  81.     public function setYear(?SchoolYear $year): static
  82.     {
  83.         $this->year $year;
  84.         return $this;
  85.     }
  86.     public function getSchool(): ?School
  87.     {
  88.         return $this->school;
  89.     }
  90.     public function setSchool(?School $school): static
  91.     {
  92.         $this->school $school;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return Collection<int, WeekSubjectGoal>
  97.      */
  98.     public function getWeekGoals(): Collection
  99.     {
  100.         return $this->weekGoals;
  101.     }
  102.     public function addWeekGoal(WeekSubjectGoal $weekGoal): static
  103.     {
  104.         if (!$this->weekGoals->contains($weekGoal)) {
  105.             $this->weekGoals->add($weekGoal);
  106.             $weekGoal->setProfSchoolPlanner($this);
  107.         }
  108.         return $this;
  109.     }
  110.     public function removeWeekGoal(WeekSubjectGoal $weekGoal): static
  111.     {
  112.         if ($this->weekGoals->removeElement($weekGoal)) {
  113.             // set the owning side to null (unless already changed)
  114.             if ($weekGoal->getProfSchoolPlanner() === $this) {
  115.                 $weekGoal->setProfSchoolPlanner(null);
  116.             }
  117.         }
  118.         return $this;
  119.     }
  120. }