src/Entity/Appointment.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppointmentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=AppointmentRepository::class)
  7.  */
  8. class Appointment
  9. {
  10.     const APPOINTMENT_PENDING='pending' ;
  11.     const APPOINTMENT_VALIDE='valid' ;
  12.     const APPOINTMENT_UPDATED='updated' ;
  13.     const APPOINTMENT_REJECTED='rejected' ;
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $firstName;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $lastName;
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      */
  31.     private $email;
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      */
  35.     private $phone;
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      */
  39.     private $details;
  40.     /**
  41.      * @ORM\Column(type="string", length=255)
  42.      */
  43.     private $object;
  44.     /**
  45.      * @ORM\Column(type="datetime")
  46.      */
  47.     private $availablity;
  48.     /**
  49.      * @ORM\Column(type="datetime", nullable=true)
  50.      */
  51.     private $availablityConfirmed;
  52.     /**
  53.      * @ORM\Column(type="string", length=255)
  54.      */
  55.     private $status;
  56.     /**
  57.      * @ORM\Column(type="datetime")
  58.      */
  59.     private $createdAt;
  60.     /**
  61.      * @ORM\Column(type="datetime", nullable=true)
  62.      */
  63.     private $updatedAt;
  64.     public function __construct()
  65.     {
  66.         $this->createdAt = new \DateTimeImmutable();
  67.         $this->updatedAt = new \DateTimeImmutable();
  68.     }
  69.     public function __toString(): string
  70.     {
  71.         return $this->firstName ' ' $this->lastName;
  72.     }
  73.     public function getId(): ?int
  74.     {
  75.         return $this->id;
  76.     }
  77.     public function getFirstName(): ?string
  78.     {
  79.         return $this->firstName;
  80.     }
  81.     public function setFirstName(string $firstName): self
  82.     {
  83.         $this->firstName $firstName;
  84.         return $this;
  85.     }
  86.     public function getLastName(): ?string
  87.     {
  88.         return $this->lastName;
  89.     }
  90.     public function setLastName(string $lastName): self
  91.     {
  92.         $this->lastName $lastName;
  93.         return $this;
  94.     }
  95.     public function getEmail(): ?string
  96.     {
  97.         return $this->email;
  98.     }
  99.     public function setEmail(?string $email): self
  100.     {
  101.         $this->email $email;
  102.         return $this;
  103.     }
  104.     public function getPhone(): ?string
  105.     {
  106.         return $this->phone;
  107.     }
  108.     public function setPhone(?string $phone): self
  109.     {
  110.         $this->phone $phone;
  111.         return $this;
  112.     }
  113.     public function getDetails(): ?string
  114.     {
  115.         return $this->details;
  116.     }
  117.     public function setDetails(?string $details): self
  118.     {
  119.         $this->details $details;
  120.         return $this;
  121.     }
  122.     public function getObject(): ?string
  123.     {
  124.         return $this->object;
  125.     }
  126.     public function setObject(string $object): self
  127.     {
  128.         $this->object $object;
  129.         return $this;
  130.     }
  131.     public function getAvailablity(): ?\DateTimeInterface
  132.     {
  133.         return $this->availablity;
  134.     }
  135.     public function setAvailablity(\DateTimeInterface $availablity): self
  136.     {
  137.         $this->availablity $availablity;
  138.         return $this;
  139.     }
  140.     public function getAvailablityConfirmed(): ?\DateTimeInterface
  141.     {
  142.         return $this->availablityConfirmed;
  143.     }
  144.     public function setAvailablityConfirmed(?\DateTimeInterface $availablityConfirmed): self
  145.     {
  146.         $this->availablityConfirmed $availablityConfirmed;
  147.         return $this;
  148.     }
  149.     public function getStatus(): ?string
  150.     {
  151.         return $this->status;
  152.     }
  153.     public function setStatus(string $status): self
  154.     {
  155.         $this->status $status;
  156.         return $this;
  157.     }
  158.     public function getCreatedAt(): ?\DateTimeInterface
  159.     {
  160.         return $this->createdAt;
  161.     }
  162.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  163.     {
  164.         $this->createdAt $createdAt;
  165.         return $this;
  166.     }
  167.     public function getUpdatedAt(): ?\DateTimeInterface
  168.     {
  169.         return $this->updatedAt;
  170.     }
  171.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  172.     {
  173.         $this->updatedAt $updatedAt;
  174.         return $this;
  175.     }
  176. }