src/Entity/Appointment.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppointmentRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassAppointmentRepository::class)]
  7. class Appointment implements AppointmentInterface
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'appointments')]
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     private ?Patient $client null;
  16.     #[ORM\ManyToOne(inversedBy'appointments')]
  17.     private ?Doctor $doctor null;
  18.     #[ORM\Column(length100)]
  19.     private ?string $status null;
  20.     #[ORM\Column(nullabletrue)]
  21.     private ?\DateTimeImmutable $acceptedAt null;
  22.     #[ORM\Column(length10)]
  23.     private ?string $passcode null;
  24.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  25.     private ?\DateTimeInterface $startDate null;
  26.     #[ORM\Column(nullabletrue)]
  27.     private ?\DateTimeImmutable $createdAt null;
  28.     #[ORM\Column(length100)]
  29.     private ?string $uniqueId null;
  30.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  31.     private ?string $description null;
  32.     #[ORM\Column(length100nullabletrue)]
  33.     private ?string $meetingId null;
  34.     #[ORM\ManyToOne(inversedBy'appointments')]
  35.     #[ORM\JoinColumn(nullablefalse)]
  36.     private ?TimeSlot $timeSlot null;
  37.     #[ORM\Column(nullabletrue)]
  38.     private ?int $duration null;
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getClient(): ?Patient
  44.     {
  45.         return $this->client;
  46.     }
  47.     public function setClient(?Patient $client): self
  48.     {
  49.         $this->client $client;
  50.         return $this;
  51.     }
  52.     public function getDoctor(): ?Doctor
  53.     {
  54.         return $this->doctor;
  55.     }
  56.     public function setDoctor(?Doctor $doctor): self
  57.     {
  58.         $this->doctor $doctor;
  59.         return $this;
  60.     }
  61.     public function getStatus(): ?string
  62.     {
  63.         return $this->status;
  64.     }
  65.     public function setStatus(string $status): self
  66.     {
  67.         $this->status $status;
  68.         return $this;
  69.     }
  70.     public function getAcceptedAt(): ?\DateTimeImmutable
  71.     {
  72.         return $this->acceptedAt;
  73.     }
  74.     public function setAcceptedAt(?\DateTimeImmutable $acceptedAt): self
  75.     {
  76.         $this->acceptedAt $acceptedAt;
  77.         return $this;
  78.     }
  79.     public function getPasscode(): ?string
  80.     {
  81.         return $this->passcode;
  82.     }
  83.     public function setPasscode(string $passcode): self
  84.     {
  85.         $this->passcode $passcode;
  86.         return $this;
  87.     }
  88.     public function getStartDate(): ?\DateTimeInterface
  89.     {
  90.         return $this->startDate;
  91.     }
  92.     public function setStartDate(\DateTimeInterface $startDate): self
  93.     {
  94.         $this->startDate $startDate;
  95.         return $this;
  96.     }
  97.     public function getCreatedAt(): ?\DateTimeImmutable
  98.     {
  99.         return $this->createdAt;
  100.     }
  101.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  102.     {
  103.         $this->createdAt $createdAt;
  104.         return $this;
  105.     }
  106.     public function getUniqueId(): ?string
  107.     {
  108.         return $this->uniqueId;
  109.     }
  110.     public function setUniqueId(string $uniqueId): static
  111.     {
  112.         $this->uniqueId $uniqueId;
  113.         return $this;
  114.     }
  115.     public function getDescription(): ?string
  116.     {
  117.         return $this->description;
  118.     }
  119.     public function setDescription(?string $description): static
  120.     {
  121.         $this->description $description;
  122.         return $this;
  123.     }
  124.     public function getMeetingId(): ?string
  125.     {
  126.         return $this->meetingId;
  127.     }
  128.     public function setMeetingId(?string $meetingId): static
  129.     {
  130.         $this->meetingId $meetingId;
  131.         return $this;
  132.     }
  133.     public function getTimeSlot(): ?TimeSlot
  134.     {
  135.         return $this->timeSlot;
  136.     }
  137.     public function setTimeSlot(?TimeSlot $timeSlot): static
  138.     {
  139.         $this->timeSlot $timeSlot;
  140.         return $this;
  141.     }
  142.     public function getDuration(): ?int
  143.     {
  144.         return $this->duration;
  145.     }
  146.     public function setDuration(?int $duration): static
  147.     {
  148.         $this->duration $duration;
  149.         return $this;
  150.     }
  151.     public function isPending(): bool
  152.     {
  153.         return self::STATUS_PENDING == $this->getStatus();
  154.     }
  155.     
  156.     public function isCancelled(): bool
  157.     {
  158.         return self::STATUS_CANCELLED == $this->getStatus();
  159.     }
  160.     public function isAccepted(): bool
  161.     {
  162.         return self::STATUS_ACCEPTED == $this->getStatus();
  163.     }    
  164. }