src/Entity/TimeSlot.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TimeSlotRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassTimeSlotRepository::class)]
  7. class TimeSlot
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  14.     private ?\DateTimeInterface $startTime null;
  15.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  16.     private ?\DateTimeInterface $endtime null;
  17.     #[ORM\OneToOne(mappedBy'timeSlot'cascade: ['persist''remove'])]
  18.     private ?Appointment $appointment null;
  19.     #[ORM\ManyToOne(inversedBy'timeSlots')]
  20.     #[ORM\JoinColumn(nullablefalse)]
  21.     private ?AppointmentDate $date null;
  22.     #[ORM\Column(nullabletrue)]
  23.     private ?bool $isClosed null;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getStartTime(): ?\DateTimeInterface
  29.     {
  30.         return $this->startTime;
  31.     }
  32.     public function setStartTime(\DateTimeInterface $startTime): static
  33.     {
  34.         $this->startTime $startTime;
  35.         return $this;
  36.     }
  37.     public function getEndtime(): ?\DateTimeInterface
  38.     {
  39.         return $this->endtime;
  40.     }
  41.     public function setEndtime(\DateTimeInterface $endtime): static
  42.     {
  43.         $this->endtime $endtime;
  44.         return $this;
  45.     }
  46.     public function getAppointment(): ?Appointment
  47.     {
  48.         return $this->appointment;
  49.     }
  50.     public function setAppointment(Appointment $appointment): static
  51.     {
  52.         // set the owning side of the relation if necessary
  53.         if ($appointment->getTimeSlot() !== $this) {
  54.             $appointment->setTimeSlot($this);
  55.         }
  56.         $this->appointment $appointment;
  57.         return $this;
  58.     }
  59.     public function getDate(): ?AppointmentDate
  60.     {
  61.         return $this->date;
  62.     }
  63.     public function setDate(?AppointmentDate $date): static
  64.     {
  65.         $this->date $date;
  66.         return $this;
  67.     }
  68.     public function isIsClosed(): ?bool
  69.     {
  70.         return $this->isClosed;
  71.     }
  72.     public function setIsClosed(?bool $isClosed): static
  73.     {
  74.         $this->isClosed $isClosed;
  75.         return $this;
  76.     }
  77. }