<?phpnamespace App\Entity;use App\Repository\TimeSlotRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: TimeSlotRepository::class)]class TimeSlot{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $startTime = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $endtime = null; #[ORM\OneToOne(mappedBy: 'timeSlot', cascade: ['persist', 'remove'])] private ?Appointment $appointment = null; #[ORM\ManyToOne(inversedBy: 'timeSlots')] #[ORM\JoinColumn(nullable: false)] private ?AppointmentDate $date = null; #[ORM\Column(nullable: true)] private ?bool $isClosed = null; public function getId(): ?int { return $this->id; } public function getStartTime(): ?\DateTimeInterface { return $this->startTime; } public function setStartTime(\DateTimeInterface $startTime): static { $this->startTime = $startTime; return $this; } public function getEndtime(): ?\DateTimeInterface { return $this->endtime; } public function setEndtime(\DateTimeInterface $endtime): static { $this->endtime = $endtime; return $this; } public function getAppointment(): ?Appointment { return $this->appointment; } public function setAppointment(Appointment $appointment): static { // set the owning side of the relation if necessary if ($appointment->getTimeSlot() !== $this) { $appointment->setTimeSlot($this); } $this->appointment = $appointment; return $this; } public function getDate(): ?AppointmentDate { return $this->date; } public function setDate(?AppointmentDate $date): static { $this->date = $date; return $this; } public function isIsClosed(): ?bool { return $this->isClosed; } public function setIsClosed(?bool $isClosed): static { $this->isClosed = $isClosed; return $this; }}