src/MDS/GreenPatioBundle/Entity/Reservation.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\MDS\GreenPatioBundle\Entity;
  3. use App\Entity\GpReminder;
  4. use App\Entity\HtFile;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  10. use Symfony\Component\Serializer\Annotation\Ignore;
  11. /**
  12.  * Reservation
  13.  *
  14.  * @ORM\Table(name="reservation")
  15.  * @ORM\Entity(repositoryClass="App\MDS\GreenPatioBundle\Repository\ReservationRepository")
  16.  */
  17. class Reservation
  18. {
  19.     /**
  20.      * @var int
  21.      *
  22.      * @ORM\Column(name="id", type="integer")
  23.      * @ORM\Id
  24.      * @ORM\GeneratedValue(strategy="AUTO")
  25.      */
  26.     private $id;
  27.     /**
  28.      * @var string
  29.      *
  30.      * @ORM\Column(name="title", type="string", length=255)
  31.      * @Assert\NotBlank
  32.      */
  33.     private $title;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="client", type="string", length=255, nullable=true )
  38.      *
  39.      */
  40.     private $client;
  41.     /**
  42.      * @var string
  43.      *
  44.      * @ORM\Column(name="clientContact", type="string", length=255, nullable=true )
  45.      *
  46.      */
  47.     private $clientContact;
  48.     /**
  49.      * @var string
  50.      *
  51.      * @ORM\Column(name="contactUnregistered", type="string", length=255, nullable=true )
  52.      *
  53.      */
  54.     private $contactUnregistered;
  55.     /**
  56.      * @var string
  57.      *
  58.      * @ORM\Column(name="nameContactUnregistered", type="string", length=255, nullable=true )
  59.      *
  60.      */
  61.     private $nameContactUnregistered;
  62.     /**
  63.      * @var string
  64.      *
  65.      * @ORM\Column(name="phoneContactUnregistered", type="string", length=255, nullable=true )
  66.      *
  67.      */
  68.     private $phoneContactUnregistered;
  69.     /**
  70.      * @var \DateTimeInterface|null
  71.      *
  72.      * @ORM\Column(name="days", type="datetime", nullable=true)
  73.      */
  74.     private $days;
  75.     /**
  76.      * @var \DateTime
  77.      *
  78.      * @ORM\Column(name="createdAt", type="datetime")
  79.      */
  80.     private $createdAt;
  81.     /**
  82.      * @var string
  83.      *
  84.      * @ORM\Column(name="priority", type="string", length=255)
  85.      */
  86.     private $priority;
  87.     /**
  88.      * @var string
  89.      *
  90.      * @ORM\Column(name="createdBy", type="string", length=255)
  91.      */
  92.     private $createdBy;
  93.     /**
  94.      * @var string
  95.      *
  96.      * @ORM\Column(name="supplier", type="string", length=255, nullable=true)
  97.      */
  98.     private $supplier;
  99.     /**
  100.      * @var string
  101.      *
  102.      * @ORM\Column(name="status", type="string", length=255, nullable=true)
  103.      */
  104.     private $status;
  105.     /**
  106.      * @var \DateTime
  107.      *
  108.      * @ORM\Column(name="updatedAt", type="datetime")
  109.      */
  110.     private $updatedAt;
  111.     /**
  112.      * @var string
  113.      *
  114.      * @ORM\Column(name="updatedBy", type="string", length=255)
  115.      */
  116.     private $updatedBy;
  117.     /**
  118.      * @var int
  119.      *
  120.      * @ORM\Column(name="daysBlock", type="integer", nullable=true)
  121.      */
  122.     private $daysBlock;
  123.     /**
  124.      * @var string
  125.      *
  126.      * @ORM\Column(name="advancePayment", type="string", length=255, nullable=true)
  127.      */
  128.     private $advancePayment;
  129.     /**
  130.      * @var int
  131.      *
  132.      * @ORM\Column(name="idProposal", type="integer", nullable=true)
  133.      */
  134.     private $idProposal;
  135.     /**
  136.      * @var string
  137.      *
  138.      * @ORM\Column(name="cateringName", type="string", length=255, nullable=true)
  139.      */
  140.     private $cateringName;
  141.     /**
  142.      * @var string
  143.      *
  144.      * @ORM\Column(name="boolCatering", type="boolean", nullable=true)
  145.      */
  146.     private $boolCatering;
  147.     /**
  148.      * @var \DateTime
  149.      *
  150.      * @ORM\Column(name="dateStart", type="datetime", nullable=true)
  151.      */
  152.     private $dateStart;
  153.     /**
  154.      * @var \DateTime
  155.      *
  156.      * @ORM\Column(name="dateEnd", type="datetime", nullable=true)
  157.      */
  158.     private $dateEnd;
  159.     /**
  160.      * @var int
  161.      *
  162.      * @ORM\Column(name="pax", type="integer", nullable=true)
  163.      */
  164.     private $pax;
  165.     /**
  166.      * @var int
  167.      *
  168.      * @ORM\Column(name="deposit", type="integer", nullable=true)
  169.      */
  170.     private $deposit;
  171.     /**
  172.      * @var string
  173.      *
  174.      * @ORM\Column(name="access_key", type="string", length=255, nullable=true)
  175.      */
  176.     private $accessKey;
  177.     /**
  178.      * @var string
  179.      *
  180.      * @ORM\Column(name="description", type="text", nullable=true)
  181.      */
  182.     private $description;
  183.     /**
  184.      * @var string
  185.      *
  186.      * @ORM\Column(name="contract", type="text", nullable=true)
  187.      */
  188.     private $contract;
  189.     /**
  190.      * @ORM\OneToOne(targetEntity=HtFile::class, mappedBy="reservation", cascade={"persist", "remove"})
  191.      * @Ignore
  192.      */
  193.     private $htFile;
  194.     /**
  195.      * @var string
  196.      *
  197.      * @ORM\Column(name="token", type="text", nullable=true)
  198.      */
  199.     private $token;
  200.     /**
  201.      * @ORM\OneToMany(targetEntity=GpReminder::class, mappedBy="reservation", orphanRemoval=true)
  202.      */
  203.     private $gpReminders;
  204.     /**
  205.      * @var float
  206.      *
  207.      * @ORM\Column(name="comAvGp", type="float", nullable=true)
  208.      * Comisión que AvExpress debe pagar a GrennPatio (10% por defecto)
  209.      */
  210.     private $comAvGp;
  211.     /**
  212.      * @var float
  213.      *
  214.      * @ORM\Column(name="comHtGp", type="float", nullable=true)
  215.      * Comisión que Higo&Trigo debe pagar a GrennPatio (14% por defecto)
  216.      */
  217.     private $comHtGp;
  218.     /**
  219.      * @var string
  220.      * Contiene la informacion que llega desde el formulario de la pagina web
  221.      *
  222.      * @ORM\Column(name="infoFormWeb", type="string", length=255, nullable=true )
  223.      *
  224.      */
  225.     private $infoFormWeb;
  226.     public function __construct()
  227.     {
  228.         $this->gpReminders = new ArrayCollection();
  229.     }
  230.     /**
  231.      * Get id
  232.      *
  233.      * @return int
  234.      */
  235.     public function getId()
  236.     {
  237.         return $this->id;
  238.     }
  239.     /**
  240.      * Set title
  241.      *
  242.      * @param string $title
  243.      *
  244.      * @return Reservation
  245.      */
  246.     public function setTitle($title)
  247.     {
  248.         $this->title $title;
  249.         return $this;
  250.     }
  251.     /**
  252.      * Get title
  253.      *
  254.      * @return string
  255.      */
  256.     public function getTitle()
  257.     {
  258.         return $this->title;
  259.     }
  260.     /**
  261.      * Set client
  262.      *
  263.      * @param string $client
  264.      *
  265.      * @return Reservation
  266.      */
  267.     public function setClient($client)
  268.     {
  269.         $this->client $client;
  270.         return $this;
  271.     }
  272.     /**
  273.      * Get client
  274.      *
  275.      * @return string
  276.      */
  277.     public function getClient()
  278.     {
  279.         return $this->client;
  280.     }
  281.     /**
  282.      * Set createdAt
  283.      *
  284.      * @param \DateTime $createdAt
  285.      *
  286.      * @return Reservation
  287.      */
  288.     public function setCreatedAt($createdAt)
  289.     {
  290.         $this->createdAt $createdAt;
  291.         return $this;
  292.     }
  293.     /**
  294.      * Get createdAt
  295.      *
  296.      * @return \DateTime
  297.      */
  298.     public function getCreatedAt()
  299.     {
  300.         return $this->createdAt;
  301.     }
  302.     /**
  303.      * Set priority
  304.      *
  305.      * @param string $priority
  306.      *
  307.      * @return Reservation
  308.      */
  309.     public function setPriority($priority)
  310.     {
  311.         $this->priority $priority;
  312.         return $this;
  313.     }
  314.     /**
  315.      * Get priority
  316.      *
  317.      * @return string
  318.      */
  319.     public function getPriority()
  320.     {
  321.         return $this->priority;
  322.     }
  323.     /**
  324.      * Set createdBy
  325.      *
  326.      * @param string $createdBy
  327.      *
  328.      * @return Reservation
  329.      */
  330.     public function setCreatedBy($createdBy)
  331.     {
  332.         $this->createdBy $createdBy;
  333.         return $this;
  334.     }
  335.     /**
  336.      * Get createdBy
  337.      *
  338.      * @return string
  339.      */
  340.     public function getCreatedBy()
  341.     {
  342.         return $this->createdBy;
  343.     }
  344.     /**
  345.      * Set supplier
  346.      *
  347.      * @param string $supplier
  348.      *
  349.      * @return Reservation
  350.      */
  351.     public function setSupplier($supplier)
  352.     {
  353.         $this->supplier $supplier;
  354.         return $this;
  355.     }
  356.     /**
  357.      * Get supplier
  358.      *
  359.      * @return string
  360.      */
  361.     public function getSupplier()
  362.     {
  363.         return $this->supplier;
  364.     }
  365.     /**
  366.      * Set status
  367.      *
  368.      * @param string $status
  369.      *
  370.      * @return Reservation
  371.      */
  372.     public function setStatus($status)
  373.     {
  374.         $this->status $status;
  375.         return $this;
  376.     }
  377.     /**
  378.      * Get status
  379.      *
  380.      * @return string
  381.      */
  382.     public function getStatus()
  383.     {
  384.         return $this->status;
  385.     }
  386.     /**
  387.      * Set updatedAt
  388.      *
  389.      * @param \DateTime $updatedAt
  390.      *
  391.      * @return Reservation
  392.      */
  393.     public function setUpdatedAt($updatedAt)
  394.     {
  395.         $this->updatedAt $updatedAt;
  396.         return $this;
  397.     }
  398.     /**
  399.      * Get updatedAt
  400.      *
  401.      * @return \DateTime
  402.      */
  403.     public function getUpdatedAt()
  404.     {
  405.         return $this->updatedAt;
  406.     }
  407.     /**
  408.      * Set updatedBy
  409.      *
  410.      * @param string $updatedBy
  411.      *
  412.      * @return Reservation
  413.      */
  414.     public function setUpdatedBy($updatedBy)
  415.     {
  416.         $this->updatedBy $updatedBy;
  417.         return $this;
  418.     }
  419.     /**
  420.      * Get updatedBy
  421.      *
  422.      * @return string
  423.      */
  424.     public function getUpdatedBy()
  425.     {
  426.         return $this->updatedBy;
  427.     }
  428.     /**
  429.      * Set daysBlock
  430.      *
  431.      * @param integer $daysBlock
  432.      *
  433.      * @return Reservation
  434.      */
  435.     public function setDaysBlock($daysBlock)
  436.     {
  437.         $this->daysBlock $daysBlock;
  438.         return $this;
  439.     }
  440.     /**
  441.      * Get daysBlock
  442.      *
  443.      * @return integer
  444.      */
  445.     public function getDaysBlock()
  446.     {
  447.         return $this->daysBlock;
  448.     }
  449.     /**
  450.      * Set advancePayment
  451.      *
  452.      * @param string $advancePayment
  453.      *
  454.      * @return Reservation
  455.      */
  456.     public function setAdvancePayment($advancePayment)
  457.     {
  458.         $this->advancePayment $advancePayment;
  459.         return $this;
  460.     }
  461.     /**
  462.      * Get advancePayment
  463.      *
  464.      * @return string
  465.      */
  466.     public function getAdvancePayment()
  467.     {
  468.         return $this->advancePayment;
  469.     }
  470.     /**
  471.      * Set idProposal
  472.      *
  473.      * @param integer $idProposal
  474.      *
  475.      * @return Reservation
  476.      */
  477.     public function setIdProposal($idProposal)
  478.     {
  479.         $this->idProposal $idProposal;
  480.         return $this;
  481.     }
  482.     /**
  483.      * Get idProposal
  484.      *
  485.      * @return integer
  486.      */
  487.     public function getIdProposal()
  488.     {
  489.         return $this->idProposal;
  490.     }
  491.     /**
  492.      * Set cateringName
  493.      *
  494.      * @param string $cateringName
  495.      *
  496.      * @return Reservation
  497.      */
  498.     public function setCateringName($cateringName)
  499.     {
  500.         $this->cateringName $cateringName;
  501.         return $this;
  502.     }
  503.     /**
  504.      * Get cateringName
  505.      *
  506.      * @return string
  507.      */
  508.     public function getCateringName()
  509.     {
  510.         return $this->cateringName;
  511.     }
  512.     /**
  513.      * Set boolCatering
  514.      *
  515.      * @param boolean $boolCatering
  516.      *
  517.      * @return Reservation
  518.      */
  519.     public function setBoolCatering($boolCatering)
  520.     {
  521.         $this->boolCatering $boolCatering;
  522.         return $this;
  523.     }
  524.     /**
  525.      * Get boolCatering
  526.      *
  527.      * @return boolean
  528.      */
  529.     public function getBoolCatering()
  530.     {
  531.         return $this->boolCatering;
  532.     }
  533.     /**
  534.      * Set dateStart
  535.      *
  536.      * @param \DateTime $dateStart
  537.      *
  538.      * @return Reservation
  539.      */
  540.     public function setDateStart($dateStart)
  541.     {
  542.         $this->dateStart $dateStart;
  543.         return $this;
  544.     }
  545.     /**
  546.      * Get dateStart
  547.      *
  548.      * @return \DateTime
  549.      */
  550.     public function getDateStart()
  551.     {
  552.         return $this->dateStart;
  553.     }
  554.     /**
  555.      * Set dateEnd
  556.      *
  557.      * @param \DateTime $dateEnd
  558.      *
  559.      * @return Reservation
  560.      */
  561.     public function setDateEnd($dateEnd)
  562.     {
  563.         $this->dateEnd $dateEnd;
  564.         return $this;
  565.     }
  566.     /**
  567.      * Get dateEnd
  568.      *
  569.      * @return \DateTime
  570.      */
  571.     public function getDateEnd()
  572.     {
  573.         return $this->dateEnd;
  574.     }
  575.     /**
  576.      * Set pax
  577.      *
  578.      * @param integer $pax
  579.      *
  580.      * @return Reservation
  581.      */
  582.     public function setPax($pax)
  583.     {
  584.         $this->pax $pax;
  585.         return $this;
  586.     }
  587.     /**
  588.      * Get pax
  589.      *
  590.      * @return integer
  591.      */
  592.     public function getPax()
  593.     {
  594.         return $this->pax;
  595.     }
  596.     /**
  597.      * Set deposit
  598.      *
  599.      * @param integer $deposit
  600.      *
  601.      * @return Reservation
  602.      */
  603.     public function setDeposit($deposit)
  604.     {
  605.         $this->deposit $deposit;
  606.         return $this;
  607.     }
  608.     /**
  609.      * Get deposit
  610.      *
  611.      * @return integer
  612.      */
  613.     public function getDeposit()
  614.     {
  615.         return $this->deposit;
  616.     }
  617.     /**
  618.      * Set accessKey
  619.      *
  620.      * @param string $accessKey
  621.      *
  622.      * @return Reservation
  623.      */
  624.     public function setAccessKey($accessKey)
  625.     {
  626.         $this->accessKey $accessKey;
  627.         return $this;
  628.     }
  629.     /**
  630.      * Get accessKey
  631.      *
  632.      * @return string
  633.      */
  634.     public function getAccessKey()
  635.     {
  636.         return $this->accessKey;
  637.     }
  638.     /**
  639.      * Set description
  640.      *
  641.      * @param string $description
  642.      *
  643.      * @return Reservation
  644.      */
  645.     public function setDescription($description)
  646.     {
  647.         $this->description $description;
  648.         return $this;
  649.     }
  650.     /**
  651.      * Get description
  652.      *
  653.      * @return string
  654.      */
  655.     public function getDescription()
  656.     {
  657.         return $this->description;
  658.     }
  659.     /**
  660.      * Set clientContact
  661.      *
  662.      * @param string $clientContact
  663.      *
  664.      * @return Reservation
  665.      */
  666.     public function setClientContact($clientContact)
  667.     {
  668.         $this->clientContact $clientContact;
  669.         return $this;
  670.     }
  671.     /**
  672.      * Get clientContact
  673.      *
  674.      * @return string
  675.      */
  676.     public function getClientContact()
  677.     {
  678.         return $this->clientContact;
  679.     }
  680.     /**
  681.      * Set contactUnregistered
  682.      *
  683.      * @param string $contactUnregistered
  684.      *
  685.      * @return Reservation
  686.      */
  687.     public function setContactUnregistered($contactUnregistered)
  688.     {
  689.         $this->contactUnregistered $contactUnregistered;
  690.         return $this;
  691.     }
  692.     /**
  693.      * Get contactUnregistered
  694.      *
  695.      * @return string
  696.      */
  697.     public function getContactUnregistered()
  698.     {
  699.         return $this->contactUnregistered;
  700.     }
  701.     /**
  702.      * Set days
  703.      *
  704.      * @param string $days
  705.      *
  706.      * @return Reservation
  707.      */
  708.     public function setDays(?\DateTimeInterface $days): self
  709.     {
  710.         $this->days $days;
  711.         
  712.         return $this;
  713.     }
  714.     /**
  715.      * Get days
  716.      *
  717.      * @return string
  718.      */
  719.     public function getDays(): ?\DateTimeInterface
  720.     {
  721.         return $this->days;
  722.     }
  723.     /**
  724.      * Set contract
  725.      *
  726.      * @param string $contract
  727.      *
  728.      * @return Reservation
  729.      */
  730.     public function setContract($contract)
  731.     {
  732.         $this->contract $contract;
  733.         return $this;
  734.     }
  735.     /**
  736.      * Get contract
  737.      *
  738.      * @return string
  739.      */
  740.     public function getContract()
  741.     {
  742.         return $this->contract;
  743.     }
  744.     /**
  745.      * Set nameContactUnregistered
  746.      *
  747.      * @param string $nameContactUnregistered
  748.      *
  749.      * @return Reservation
  750.      */
  751.     public function setNameContactUnregistered($nameContactUnregistered)
  752.     {
  753.         $this->nameContactUnregistered $nameContactUnregistered;
  754.         return $this;
  755.     }
  756.     /**
  757.      * Get nameContactUnregistered
  758.      *
  759.      * @return string
  760.      */
  761.     public function getNameContactUnregistered()
  762.     {
  763.         return $this->nameContactUnregistered;
  764.     }
  765.     /**
  766.      * Set phoneContactUnregistered
  767.      *
  768.      * @param string $phoneContactUnregistered
  769.      *
  770.      * @return Reservation
  771.      */
  772.     public function setPhoneContactUnregistered($phoneContactUnregistered)
  773.     {
  774.         $this->phoneContactUnregistered $phoneContactUnregistered;
  775.         return $this;
  776.     }
  777.     /**
  778.      * Get phoneContactUnregistered
  779.      *
  780.      * @return string
  781.      */
  782.     public function getPhoneContactUnregistered()
  783.     {
  784.         return $this->phoneContactUnregistered;
  785.     }
  786.     public function getHtFile(): ?HtFile
  787.     {
  788.         return $this->htFile;
  789.     }
  790.     public function setHtFile(?HtFile $htFile): self
  791.     {
  792.         // unset the owning side of the relation if necessary
  793.         if ($htFile === null && $this->htFile !== null) {
  794.             $this->htFile->setReservation(null);
  795.         }
  796.         // set the owning side of the relation if necessary
  797.         if ($htFile !== null && $htFile->getReservation() !== $this) {
  798.             $htFile->setReservation($this);
  799.         }
  800.         $this->htFile $htFile;
  801.         return $this;
  802.     }
  803.     /**
  804.      * Set token
  805.      *
  806.      * @param string $token
  807.      *
  808.      * @return Reservation
  809.      */
  810.     public function setToken($token)
  811.     {
  812.         $this->token $token;
  813.         return $this;
  814.     }
  815.     /**
  816.      * Get token
  817.      *
  818.      * @return string
  819.      */
  820.     public function getToken()
  821.     {
  822.         return $this->token;
  823.     }
  824.     /**
  825.      * @return Collection<int, GpReminder>
  826.      */
  827.     public function getGpReminders(): Collection
  828.     {
  829.         return $this->gpReminders;
  830.     }
  831.     public function addGpReminder(GpReminder $gpReminder): self
  832.     {
  833.         if (!$this->gpReminders->contains($gpReminder)) {
  834.             $this->gpReminders[] = $gpReminder;
  835.             $gpReminder->setReservation($this);
  836.         }
  837.         return $this;
  838.     }
  839.     public function removeGpReminder(GpReminder $gpReminder): self
  840.     {
  841.         if ($this->gpReminders->removeElement($gpReminder)) {
  842.             // set the owning side to null (unless already changed)
  843.             if ($gpReminder->getReservation() === $this) {
  844.                 $gpReminder->setReservation(null);
  845.             }
  846.         }
  847.         return $this;
  848.     }
  849.     /**
  850.      * Set comAvGp
  851.      *
  852.      * @param float $comAvGp
  853.      *
  854.      * @return Reservation
  855.      */
  856.     public function setComAvGp($comAvGp)
  857.     {
  858.         $this->comAvGp $comAvGp;
  859.         return $this;
  860.     }
  861.     /**
  862.      * Get comAvGp
  863.      *
  864.      * @return float
  865.      */
  866.     public function getComAvGp()
  867.     {
  868.         return $this->comAvGp;
  869.     }
  870.     /**
  871.      * Set comHtGp
  872.      *
  873.      * @param float $comHtGp
  874.      *
  875.      * @return Reservation
  876.      */
  877.     public function setComHtGp($comHtGp)
  878.     {
  879.         $this->comHtGp $comHtGp;
  880.         return $this;
  881.     }
  882.     /**
  883.      * Get comHtGp
  884.      *
  885.      * @return float
  886.      */
  887.     public function getComHtGp()
  888.     {
  889.         return $this->comHtGp;
  890.     }
  891.     /**
  892.      * Set infoFormWeb
  893.      *
  894.      * @param string $infoFormWeb
  895.      *
  896.      * @return Reservation
  897.      */
  898.     public function setInfoFormWeb($infoFormWeb)
  899.     {
  900.         $this->infoFormWeb $infoFormWeb;
  901.         return $this;
  902.     }
  903.     /**
  904.      * Get infoFormWeb
  905.      *
  906.      * @return string
  907.      */
  908.     public function getInfoFormWeb()
  909.     {
  910.         return $this->infoFormWeb;
  911.     }
  912. }