src/Entity/Appointment.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppointmentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassAppointmentRepository::class)]
  6. #[ORM\HasLifecycleCallbacks]
  7. class Appointment
  8. {
  9.     const PHONE_PREFIX '+33';
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\OneToOne(inversedBy'appointment')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private ?TimeSlot $timeSlot null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $lastName null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $firstName null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $email null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $phone null;
  25.     #[ORM\Column(length255)]
  26.     private ?string $inscriptionType null;
  27.     #[ORM\Column(length5)]
  28.     private ?string $childCount null;
  29.     #[ORM\OneToOne(targetEntityself::class)]
  30.     private ?self $linkedTo null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $undoCode null;
  33.     #[ORM\Column(nullabletrue)]
  34.     private ?bool $isMain null;
  35.     #[ORM\Column(nullabletrue)]
  36.     private ?array $infos null;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $reason null;
  39.     #[ORM\Column]
  40.     private ?\DateTimeImmutable $createdAt null;
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getTimeSlot(): ?TimeSlot
  46.     {
  47.         return $this->timeSlot;
  48.     }
  49.     public function setTimeSlot(TimeSlot $timeSlot): static
  50.     {
  51.         $this->timeSlot $timeSlot;
  52.         return $this;
  53.     }
  54.     public function getLastName(): ?string
  55.     {
  56.         return $this->lastName;
  57.     }
  58.     public function setLastName(string $lastName): static
  59.     {
  60.         $this->lastName $lastName;
  61.         return $this;
  62.     }
  63.     public function getFirstName(): ?string
  64.     {
  65.         return $this->firstName;
  66.     }
  67.     public function setFirstName(string $firstName): static
  68.     {
  69.         $this->firstName $firstName;
  70.         return $this;
  71.     }
  72.     public function getEmail(): ?string
  73.     {
  74.         return $this->email;
  75.     }
  76.     public function setEmail(string $email): static
  77.     {
  78.         $this->email $email;
  79.         return $this;
  80.     }
  81.     public function getPhone(): ?string
  82.     {
  83.         return $this->phone;
  84.     }
  85.     public function setPhone(?string $phone): static
  86.     {
  87.         $this->phone $phone;
  88.         return $this;
  89.     }
  90.     public function getInscriptionType(): ?string
  91.     {
  92.         return $this->inscriptionType;
  93.     }
  94.     public function setInscriptionType(string $inscriptionType): static
  95.     {
  96.         $this->inscriptionType $inscriptionType;
  97.         return $this;
  98.     }
  99.     public function getChildCount(): ?string
  100.     {
  101.         return $this->childCount;
  102.     }
  103.     public function setChildCount(string $childCount): static
  104.     {
  105.         $this->childCount $childCount;
  106.         return $this;
  107.     }
  108.     public function getLinkedTo(): ?self
  109.     {
  110.         return $this->linkedTo;
  111.     }
  112.     public function setLinkedTo(?self $linkedTo): static
  113.     {
  114.         $this->linkedTo $linkedTo;
  115.         return $this;
  116.     }
  117.     public function getUndoCode(): ?string
  118.     {
  119.         return $this->undoCode;
  120.     }
  121.     public function setUndoCode(?string $undoCode): static
  122.     {
  123.         $this->undoCode $undoCode;
  124.         return $this;
  125.     }
  126.     public function isIsMain(): ?bool
  127.     {
  128.         return $this->isMain;
  129.     }
  130.     public function setIsMain(?bool $isMain): static
  131.     {
  132.         $this->isMain $isMain;
  133.         return $this;
  134.     }
  135.     public function getInfos($format 'array'): mixed
  136.     {
  137.         if($format === 'json') {
  138.             return json_encode($this->infos);
  139.         }
  140.         return $this->infos;
  141.     }
  142.     public function setInfos(?array $infos): static
  143.     {
  144.         $this->infos $infos;
  145.         return $this;
  146.     }
  147.     public function getReason(): ?string
  148.     {
  149.         return $this->reason;
  150.     }
  151.     public function setReason(?string $reason): static
  152.     {
  153.         $this->reason $reason;
  154.         return $this;
  155.     }
  156.     public function getCreatedAt(): ?\DateTimeImmutable
  157.     {
  158.         return $this->createdAt;
  159.     }
  160.     public function setCreatedAt(\DateTimeImmutable $createdAt): static
  161.     {
  162.         $this->createdAt $createdAt;
  163.         return $this;
  164.     }
  165. }