src/Entity/Reservation.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Enum\ReservationStatus;
  4. use App\Repository\ReservationRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ReservationRepository::class)
  8.  */
  9. class Reservation
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $firstname;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $lastname;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $telephone;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $email;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $status;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity=Service::class, inversedBy="reservations")
  39.      */
  40.     private $service;
  41.     /**
  42.      * @ORM\Column(type="datetime_immutable", nullable=true)
  43.      */
  44.     private $reservedAt;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      */
  48.     private $code;
  49.     /**
  50.      * @ORM\Column(type="datetime_immutable", nullable=true)
  51.      */
  52.     private $createdAt;
  53.     /**
  54.      * @ORM\Column(type="boolean")
  55.      */
  56.     private $mailSended;
  57.     /**
  58.      * @ORM\Column(type="text", nullable=true)
  59.      */
  60.     private $observations;
  61.     public function __construct()
  62.     {
  63.         $this->status     ReservationStatus::EN_ATTENTE;
  64.         $this->createdAt  = new \DateTimeImmutable();
  65.         $this->mailSended false;
  66.     }
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getFirstname(): ?string
  72.     {
  73.         return $this->firstname;
  74.     }
  75.     public function setFirstname(?string $firstname): self
  76.     {
  77.         $this->firstname $firstname;
  78.         return $this;
  79.     }
  80.     public function getLastname(): ?string
  81.     {
  82.         return $this->lastname;
  83.     }
  84.     public function setLastname(?string $lastname): self
  85.     {
  86.         $this->lastname $lastname;
  87.         return $this;
  88.     }
  89.     public function getTelephone(): ?string
  90.     {
  91.         return $this->telephone;
  92.     }
  93.     public function setTelephone(?string $telephone): self
  94.     {
  95.         $this->telephone $telephone;
  96.         return $this;
  97.     }
  98.     public function getEmail(): ?string
  99.     {
  100.         return $this->email;
  101.     }
  102.     public function setEmail(?string $email): self
  103.     {
  104.         $this->email $email;
  105.         return $this;
  106.     }
  107.     public function getStatus(): ?string
  108.     {
  109.         return $this->status;
  110.     }
  111.     public function setStatus(?string $status): self
  112.     {
  113.         $this->status $status;
  114.         return $this;
  115.     }
  116.     public function getService(): ?Service
  117.     {
  118.         return $this->service;
  119.     }
  120.     public function setService(?Service $service): self
  121.     {
  122.         $this->service $service;
  123.         return $this;
  124.     }
  125.     public function getReservedAt(): ?\DateTimeImmutable
  126.     {
  127.         return $this->reservedAt;
  128.     }
  129.     public function setReservedAt(\DateTimeImmutable $reservedAt): self
  130.     {
  131.         $this->reservedAt $reservedAt;
  132.         return $this;
  133.     }
  134.     public function getCode(): ?string
  135.     {
  136.         return $this->code;
  137.     }
  138.     public function setCode(?string $code): self
  139.     {
  140.         $this->code $code;
  141.         return $this;
  142.     }
  143.     public function getCreatedAt(): ?\DateTimeImmutable
  144.     {
  145.         return $this->createdAt;
  146.     }
  147.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  148.     {
  149.         $this->createdAt $createdAt;
  150.         return $this;
  151.     }
  152.     public function isMailSended(): ?bool
  153.     {
  154.         return $this->mailSended;
  155.     }
  156.     public function setMailSended(bool $mailSended): self
  157.     {
  158.         $this->mailSended $mailSended;
  159.         return $this;
  160.     }
  161.     public function getObservations(): ?string
  162.     {
  163.         return $this->observations;
  164.     }
  165.     public function setObservations(?string $observations): self
  166.     {
  167.         $this->observations $observations;
  168.         return $this;
  169.     }
  170. }