src/Entity/Reservation.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ReservationRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ReservationRepository::class)
  9.  */
  10. class Reservation
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="datetime")
  20.      */
  21.     private $reservationPlannedAt;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $payinId;
  26.     /**
  27.      * @ORM\Column(type="datetime")
  28.      */
  29.     private $createdAt;
  30.     /**
  31.      * @ORM\Column(type="datetime")
  32.      */
  33.     private $updatedAt;
  34.     /**
  35.      * @ORM\Column(type="boolean", nullable=true)
  36.      */
  37.     private $isAccepted;
  38.     /**
  39.      * @ORM\Column(type="text", nullable=true)
  40.      */
  41.     private $raisonRefus;
  42.     /**
  43.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="reservations")
  44.      * @ORM\JoinColumn(nullable=false)
  45.      */
  46.     private $client;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="reservations")
  49.      * @ORM\JoinColumn(nullable=false)
  50.      */
  51.     private $product;
  52.     /**
  53.      * @ORM\Column(type="integer", nullable=true)
  54.      */
  55.     private $quantity;
  56.     /**
  57.      * @ORM\Column(type="boolean")
  58.      */
  59.     private $isReceived;
  60.     /**
  61.      * @ORM\Column(type="string", length=255, nullable=true)
  62.      */
  63.     private $trackingCode;
  64.     /**
  65.      * @ORM\Column(type="array", nullable=true)
  66.      */
  67.     private $options = [];
  68.     /**
  69.      * @ORM\Column(type="float", nullable=true)
  70.      */
  71.     private $promo;
  72.     /**
  73.      * @ORM\Column(type="string", length=255, nullable=true)
  74.      */
  75.     private $address;
  76.     /**
  77.      * @ORM\Column(type="string", length=255, nullable=true)
  78.      */
  79.     private $postalCode;
  80.     /**
  81.      * @ORM\Column(type="string", length=255, nullable=true)
  82.      */
  83.     private $city;
  84.     /**
  85.      * @ORM\Column(type="string", length=255, nullable=true)
  86.      */
  87.     private $color;
  88.     /**
  89.      * @ORM\Column(type="string", length=255, nullable=true)
  90.      */
  91.     private $size;
  92.     /**
  93.      * @ORM\Column(type="integer", nullable=true)
  94.      */
  95.     private $nbGuests;
  96.     /**
  97.      * @ORM\Column(type="float", nullable=true)
  98.      */
  99.     private $totalAmount;
  100.     /**
  101.      * @ORM\Column(type="array", nullable=true)
  102.      */
  103.     private $groupOptions = [];
  104.     /**
  105.      * @ORM\OneToMany(targetEntity=Transfert::class, mappedBy="reservation")
  106.      */
  107.     private $transferts;
  108.     /**
  109.      * @ORM\OneToMany(targetEntity=AppFee::class, mappedBy="reservation")
  110.      */
  111.     private $appFees;
  112.     /**
  113.      * @ORM\OneToMany(targetEntity=Paiement::class, mappedBy="reservation")
  114.      */
  115.     private $paiements;
  116.     public function __construct()
  117.     {
  118.         $this->transferts = new ArrayCollection();
  119.         $this->appFees = new ArrayCollection();
  120.         $this->paiements = new ArrayCollection();
  121.     }
  122.     public function getId(): ?int
  123.     {
  124.         return $this->id;
  125.     }
  126.     public function getReservationPlannedAt(): ?\DateTimeInterface
  127.     {
  128.         return $this->reservationPlannedAt;
  129.     }
  130.     public function setReservationPlannedAt(\DateTimeInterface $reservationPlannedAt): self
  131.     {
  132.         $this->reservationPlannedAt $reservationPlannedAt;
  133.         return $this;
  134.     }
  135.     public function getPayinId(): ?string
  136.     {
  137.         return $this->payinId;
  138.     }
  139.     public function setPayinId(string $payinId): self
  140.     {
  141.         $this->payinId $payinId;
  142.         return $this;
  143.     }
  144.     public function getCreatedAt(): ?\DateTimeInterface
  145.     {
  146.         return $this->createdAt;
  147.     }
  148.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  149.     {
  150.         $this->createdAt $createdAt;
  151.         return $this;
  152.     }
  153.     public function getUpdatedAt(): ?\DateTimeInterface
  154.     {
  155.         return $this->updatedAt;
  156.     }
  157.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  158.     {
  159.         $this->updatedAt $updatedAt;
  160.         return $this;
  161.     }
  162.     public function getIsAccepted(): ?bool
  163.     {
  164.         return $this->isAccepted;
  165.     }
  166.     public function setIsAccepted(?bool $isAccepted): self
  167.     {
  168.         $this->isAccepted $isAccepted;
  169.         return $this;
  170.     }
  171.     public function getRaisonRefus(): ?string
  172.     {
  173.         return $this->raisonRefus;
  174.     }
  175.     public function setRaisonRefus(?string $raisonRefus): self
  176.     {
  177.         $this->raisonRefus $raisonRefus;
  178.         return $this;
  179.     }
  180.     public function getClient(): ?User
  181.     {
  182.         return $this->client;
  183.     }
  184.     public function setClient(?User $client): self
  185.     {
  186.         $this->client $client;
  187.         return $this;
  188.     }
  189.     public function getProduct(): ?Product
  190.     {
  191.         return $this->product;
  192.     }
  193.     public function setProduct(?Product $product): self
  194.     {
  195.         $this->product $product;
  196.         return $this;
  197.     }
  198.     public function getQuantity(): ?int
  199.     {
  200.         return $this->quantity;
  201.     }
  202.     public function setQuantity(?int $quantity): self
  203.     {
  204.         $this->quantity $quantity;
  205.         return $this;
  206.     }
  207.     public function getIsReceived(): ?bool
  208.     {
  209.         return $this->isReceived;
  210.     }
  211.     public function setIsReceived(bool $isReceived): self
  212.     {
  213.         $this->isReceived $isReceived;
  214.         return $this;
  215.     }
  216.     public function getTrackingCode(): ?string
  217.     {
  218.         return $this->trackingCode;
  219.     }
  220.     public function setTrackingCode(?string $trackingCode): self
  221.     {
  222.         $this->trackingCode $trackingCode;
  223.         return $this;
  224.     }
  225.     public function getOptions(): ?array
  226.     {
  227.         return $this->options;
  228.     }
  229.     public function setOptions(?array $options): self
  230.     {
  231.         $this->options $options;
  232.         return $this;
  233.     }
  234.     public function getPromo(): ?float
  235.     {
  236.         return $this->promo;
  237.     }
  238.     public function setPromo(?float $promo): self
  239.     {
  240.         $this->promo $promo;
  241.         return $this;
  242.     }
  243.     public function getAddress(): ?string
  244.     {
  245.         return $this->address;
  246.     }
  247.     public function setAddress(?string $address): self
  248.     {
  249.         $this->address $address;
  250.         return $this;
  251.     }
  252.     public function getPostalCode(): ?string
  253.     {
  254.         return $this->postalCode;
  255.     }
  256.     public function setPostalCode(?string $postalCode): self
  257.     {
  258.         $this->postalCode $postalCode;
  259.         return $this;
  260.     }
  261.     public function getCity(): ?string
  262.     {
  263.         return $this->city;
  264.     }
  265.     public function setCity(?string $city): self
  266.     {
  267.         $this->city $city;
  268.         return $this;
  269.     }
  270.     public function getColor(): ?string
  271.     {
  272.         return $this->color;
  273.     }
  274.     public function setColor(?string $color): self
  275.     {
  276.         $this->color $color;
  277.         return $this;
  278.     }
  279.     public function getSize(): ?string
  280.     {
  281.         return $this->size;
  282.     }
  283.     public function setSize(?string $size): self
  284.     {
  285.         $this->size $size;
  286.         return $this;
  287.     }
  288.     public function getNbGuests(): ?int
  289.     {
  290.         return $this->nbGuests;
  291.     }
  292.     public function setNbGuests(?int $nbGuests): self
  293.     {
  294.         $this->nbGuests $nbGuests;
  295.         return $this;
  296.     }
  297.     public function getTotalAmount(): ?float
  298.     {
  299.         return $this->totalAmount;
  300.     }
  301.     public function setTotalAmount(?float $totalAmount): self
  302.     {
  303.         $this->totalAmount $totalAmount;
  304.         return $this;
  305.     }
  306.     public function getGroupOptions(): ?array
  307.     {
  308.         return $this->groupOptions;
  309.     }
  310.     public function setGroupOptions(?array $groupOptions): self
  311.     {
  312.         $this->groupOptions $groupOptions;
  313.         return $this;
  314.     }
  315.     /**
  316.      * @return Collection<int, Transfert>
  317.      */
  318.     public function getTransferts(): Collection
  319.     {
  320.         return $this->transferts;
  321.     }
  322.     public function addTransfert(Transfert $transfert): self
  323.     {
  324.         if (!$this->transferts->contains($transfert)) {
  325.             $this->transferts[] = $transfert;
  326.             $transfert->setReservation($this);
  327.         }
  328.         return $this;
  329.     }
  330.     public function removeTransfert(Transfert $transfert): self
  331.     {
  332.         if ($this->transferts->removeElement($transfert)) {
  333.             // set the owning side to null (unless already changed)
  334.             if ($transfert->getReservation() === $this) {
  335.                 $transfert->setReservation(null);
  336.             }
  337.         }
  338.         return $this;
  339.     }
  340.     /**
  341.      * @return Collection<int, AppFee>
  342.      */
  343.     public function getAppFees(): Collection
  344.     {
  345.         return $this->appFees;
  346.     }
  347.     public function addAppFee(AppFee $appFee): self
  348.     {
  349.         if (!$this->appFees->contains($appFee)) {
  350.             $this->appFees[] = $appFee;
  351.             $appFee->setReservation($this);
  352.         }
  353.         return $this;
  354.     }
  355.     public function removeAppFee(AppFee $appFee): self
  356.     {
  357.         if ($this->appFees->removeElement($appFee)) {
  358.             // set the owning side to null (unless already changed)
  359.             if ($appFee->getReservation() === $this) {
  360.                 $appFee->setReservation(null);
  361.             }
  362.         }
  363.         return $this;
  364.     }
  365.     /**
  366.      * @return Collection<int, Paiement>
  367.      */
  368.     public function getPaiements(): Collection
  369.     {
  370.         return $this->paiements;
  371.     }
  372.     public function addPaiement(Paiement $paiement): self
  373.     {
  374.         if (!$this->paiements->contains($paiement)) {
  375.             $this->paiements[] = $paiement;
  376.             $paiement->setReservation($this);
  377.         }
  378.         return $this;
  379.     }
  380.     public function removePaiement(Paiement $paiement): self
  381.     {
  382.         if ($this->paiements->removeElement($paiement)) {
  383.             // set the owning side to null (unless already changed)
  384.             if ($paiement->getReservation() === $this) {
  385.                 $paiement->setReservation(null);
  386.             }
  387.         }
  388.         return $this;
  389.     }
  390. }