<?phpnamespace App\Entity;use App\Repository\ProfSchoolPlannerRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ProfSchoolPlannerRepository::class)]class ProfSchoolPlanner{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(type: Types::TEXT)] private ?string $comment = null; #[ORM\ManyToOne(inversedBy: 'profSchoolPlanners')] #[ORM\JoinColumn(nullable: false)] private ?Subject $subject = null; #[ORM\ManyToOne(inversedBy: 'profSchoolPlanners')] #[ORM\JoinColumn(nullable: false)] private ?Exams $exam = null; #[ORM\ManyToOne(inversedBy: 'profSchoolPlanners')] private ?ExamWeek $week = null; #[ORM\ManyToOne(inversedBy: 'profSchoolPlanners')] #[ORM\JoinColumn(nullable: false)] private ?SchoolYear $year = null; #[ORM\ManyToOne(inversedBy: 'profSchoolPlanners')] #[ORM\JoinColumn(nullable: false)] private ?School $school = null; #[ORM\OneToMany(mappedBy: 'profSchoolPlanner', targetEntity: WeekSubjectGoal::class)] private Collection $weekGoals; public function __construct() { $this->weekGoals = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getComment(): ?string { return $this->comment; } public function setComment(string $comment): static { $this->comment = $comment; return $this; } public function getSubject(): ?Subject { return $this->subject; } public function setSubject(?Subject $subject): static { $this->subject = $subject; return $this; } public function getExam(): ?Exams { return $this->exam; } public function setExam(?Exams $exam): static { $this->exam = $exam; return $this; } public function getWeek(): ?ExamWeek { return $this->week; } public function setWeek(?ExamWeek $week): static { $this->week = $week; return $this; } public function getYear(): ?SchoolYear { return $this->year; } public function setYear(?SchoolYear $year): static { $this->year = $year; return $this; } public function getSchool(): ?School { return $this->school; } public function setSchool(?School $school): static { $this->school = $school; return $this; } /** * @return Collection<int, WeekSubjectGoal> */ public function getWeekGoals(): Collection { return $this->weekGoals; } public function addWeekGoal(WeekSubjectGoal $weekGoal): static { if (!$this->weekGoals->contains($weekGoal)) { $this->weekGoals->add($weekGoal); $weekGoal->setProfSchoolPlanner($this); } return $this; } public function removeWeekGoal(WeekSubjectGoal $weekGoal): static { if ($this->weekGoals->removeElement($weekGoal)) { // set the owning side to null (unless already changed) if ($weekGoal->getProfSchoolPlanner() === $this) { $weekGoal->setProfSchoolPlanner(null); } } return $this; }}