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.     public function __construct()
  205.     {
  206.         $this->gpReminders = new ArrayCollection();
  207.     }
  208.     /**
  209.      * Get id
  210.      *
  211.      * @return int
  212.      */
  213.     public function getId()
  214.     {
  215.         return $this->id;
  216.     }
  217.     /**
  218.      * Set title
  219.      *
  220.      * @param string $title
  221.      *
  222.      * @return Reservation
  223.      */
  224.     public function setTitle($title)
  225.     {
  226.         $this->title $title;
  227.         return $this;
  228.     }
  229.     /**
  230.      * Get title
  231.      *
  232.      * @return string
  233.      */
  234.     public function getTitle()
  235.     {
  236.         return $this->title;
  237.     }
  238.     /**
  239.      * Set client
  240.      *
  241.      * @param string $client
  242.      *
  243.      * @return Reservation
  244.      */
  245.     public function setClient($client)
  246.     {
  247.         $this->client $client;
  248.         return $this;
  249.     }
  250.     /**
  251.      * Get client
  252.      *
  253.      * @return string
  254.      */
  255.     public function getClient()
  256.     {
  257.         return $this->client;
  258.     }
  259.     /**
  260.      * Set createdAt
  261.      *
  262.      * @param \DateTime $createdAt
  263.      *
  264.      * @return Reservation
  265.      */
  266.     public function setCreatedAt($createdAt)
  267.     {
  268.         $this->createdAt $createdAt;
  269.         return $this;
  270.     }
  271.     /**
  272.      * Get createdAt
  273.      *
  274.      * @return \DateTime
  275.      */
  276.     public function getCreatedAt()
  277.     {
  278.         return $this->createdAt;
  279.     }
  280.     /**
  281.      * Set priority
  282.      *
  283.      * @param string $priority
  284.      *
  285.      * @return Reservation
  286.      */
  287.     public function setPriority($priority)
  288.     {
  289.         $this->priority $priority;
  290.         return $this;
  291.     }
  292.     /**
  293.      * Get priority
  294.      *
  295.      * @return string
  296.      */
  297.     public function getPriority()
  298.     {
  299.         return $this->priority;
  300.     }
  301.     /**
  302.      * Set createdBy
  303.      *
  304.      * @param string $createdBy
  305.      *
  306.      * @return Reservation
  307.      */
  308.     public function setCreatedBy($createdBy)
  309.     {
  310.         $this->createdBy $createdBy;
  311.         return $this;
  312.     }
  313.     /**
  314.      * Get createdBy
  315.      *
  316.      * @return string
  317.      */
  318.     public function getCreatedBy()
  319.     {
  320.         return $this->createdBy;
  321.     }
  322.     /**
  323.      * Set supplier
  324.      *
  325.      * @param string $supplier
  326.      *
  327.      * @return Reservation
  328.      */
  329.     public function setSupplier($supplier)
  330.     {
  331.         $this->supplier $supplier;
  332.         return $this;
  333.     }
  334.     /**
  335.      * Get supplier
  336.      *
  337.      * @return string
  338.      */
  339.     public function getSupplier()
  340.     {
  341.         return $this->supplier;
  342.     }
  343.     /**
  344.      * Set status
  345.      *
  346.      * @param string $status
  347.      *
  348.      * @return Reservation
  349.      */
  350.     public function setStatus($status)
  351.     {
  352.         $this->status $status;
  353.         return $this;
  354.     }
  355.     /**
  356.      * Get status
  357.      *
  358.      * @return string
  359.      */
  360.     public function getStatus()
  361.     {
  362.         return $this->status;
  363.     }
  364.     /**
  365.      * Set updatedAt
  366.      *
  367.      * @param \DateTime $updatedAt
  368.      *
  369.      * @return Reservation
  370.      */
  371.     public function setUpdatedAt($updatedAt)
  372.     {
  373.         $this->updatedAt $updatedAt;
  374.         return $this;
  375.     }
  376.     /**
  377.      * Get updatedAt
  378.      *
  379.      * @return \DateTime
  380.      */
  381.     public function getUpdatedAt()
  382.     {
  383.         return $this->updatedAt;
  384.     }
  385.     /**
  386.      * Set updatedBy
  387.      *
  388.      * @param string $updatedBy
  389.      *
  390.      * @return Reservation
  391.      */
  392.     public function setUpdatedBy($updatedBy)
  393.     {
  394.         $this->updatedBy $updatedBy;
  395.         return $this;
  396.     }
  397.     /**
  398.      * Get updatedBy
  399.      *
  400.      * @return string
  401.      */
  402.     public function getUpdatedBy()
  403.     {
  404.         return $this->updatedBy;
  405.     }
  406.     /**
  407.      * Set daysBlock
  408.      *
  409.      * @param integer $daysBlock
  410.      *
  411.      * @return Reservation
  412.      */
  413.     public function setDaysBlock($daysBlock)
  414.     {
  415.         $this->daysBlock $daysBlock;
  416.         return $this;
  417.     }
  418.     /**
  419.      * Get daysBlock
  420.      *
  421.      * @return integer
  422.      */
  423.     public function getDaysBlock()
  424.     {
  425.         return $this->daysBlock;
  426.     }
  427.     /**
  428.      * Set advancePayment
  429.      *
  430.      * @param string $advancePayment
  431.      *
  432.      * @return Reservation
  433.      */
  434.     public function setAdvancePayment($advancePayment)
  435.     {
  436.         $this->advancePayment $advancePayment;
  437.         return $this;
  438.     }
  439.     /**
  440.      * Get advancePayment
  441.      *
  442.      * @return string
  443.      */
  444.     public function getAdvancePayment()
  445.     {
  446.         return $this->advancePayment;
  447.     }
  448.     /**
  449.      * Set idProposal
  450.      *
  451.      * @param integer $idProposal
  452.      *
  453.      * @return Reservation
  454.      */
  455.     public function setIdProposal($idProposal)
  456.     {
  457.         $this->idProposal $idProposal;
  458.         return $this;
  459.     }
  460.     /**
  461.      * Get idProposal
  462.      *
  463.      * @return integer
  464.      */
  465.     public function getIdProposal()
  466.     {
  467.         return $this->idProposal;
  468.     }
  469.     /**
  470.      * Set cateringName
  471.      *
  472.      * @param string $cateringName
  473.      *
  474.      * @return Reservation
  475.      */
  476.     public function setCateringName($cateringName)
  477.     {
  478.         $this->cateringName $cateringName;
  479.         return $this;
  480.     }
  481.     /**
  482.      * Get cateringName
  483.      *
  484.      * @return string
  485.      */
  486.     public function getCateringName()
  487.     {
  488.         return $this->cateringName;
  489.     }
  490.     /**
  491.      * Set boolCatering
  492.      *
  493.      * @param boolean $boolCatering
  494.      *
  495.      * @return Reservation
  496.      */
  497.     public function setBoolCatering($boolCatering)
  498.     {
  499.         $this->boolCatering $boolCatering;
  500.         return $this;
  501.     }
  502.     /**
  503.      * Get boolCatering
  504.      *
  505.      * @return boolean
  506.      */
  507.     public function getBoolCatering()
  508.     {
  509.         return $this->boolCatering;
  510.     }
  511.     /**
  512.      * Set dateStart
  513.      *
  514.      * @param \DateTime $dateStart
  515.      *
  516.      * @return Reservation
  517.      */
  518.     public function setDateStart($dateStart)
  519.     {
  520.         $this->dateStart $dateStart;
  521.         return $this;
  522.     }
  523.     /**
  524.      * Get dateStart
  525.      *
  526.      * @return \DateTime
  527.      */
  528.     public function getDateStart()
  529.     {
  530.         return $this->dateStart;
  531.     }
  532.     /**
  533.      * Set dateEnd
  534.      *
  535.      * @param \DateTime $dateEnd
  536.      *
  537.      * @return Reservation
  538.      */
  539.     public function setDateEnd($dateEnd)
  540.     {
  541.         $this->dateEnd $dateEnd;
  542.         return $this;
  543.     }
  544.     /**
  545.      * Get dateEnd
  546.      *
  547.      * @return \DateTime
  548.      */
  549.     public function getDateEnd()
  550.     {
  551.         return $this->dateEnd;
  552.     }
  553.     /**
  554.      * Set pax
  555.      *
  556.      * @param integer $pax
  557.      *
  558.      * @return Reservation
  559.      */
  560.     public function setPax($pax)
  561.     {
  562.         $this->pax $pax;
  563.         return $this;
  564.     }
  565.     /**
  566.      * Get pax
  567.      *
  568.      * @return integer
  569.      */
  570.     public function getPax()
  571.     {
  572.         return $this->pax;
  573.     }
  574.     /**
  575.      * Set deposit
  576.      *
  577.      * @param integer $deposit
  578.      *
  579.      * @return Reservation
  580.      */
  581.     public function setDeposit($deposit)
  582.     {
  583.         $this->deposit $deposit;
  584.         return $this;
  585.     }
  586.     /**
  587.      * Get deposit
  588.      *
  589.      * @return integer
  590.      */
  591.     public function getDeposit()
  592.     {
  593.         return $this->deposit;
  594.     }
  595.     /**
  596.      * Set accessKey
  597.      *
  598.      * @param string $accessKey
  599.      *
  600.      * @return Reservation
  601.      */
  602.     public function setAccessKey($accessKey)
  603.     {
  604.         $this->accessKey $accessKey;
  605.         return $this;
  606.     }
  607.     /**
  608.      * Get accessKey
  609.      *
  610.      * @return string
  611.      */
  612.     public function getAccessKey()
  613.     {
  614.         return $this->accessKey;
  615.     }
  616.     /**
  617.      * Set description
  618.      *
  619.      * @param string $description
  620.      *
  621.      * @return Reservation
  622.      */
  623.     public function setDescription($description)
  624.     {
  625.         $this->description $description;
  626.         return $this;
  627.     }
  628.     /**
  629.      * Get description
  630.      *
  631.      * @return string
  632.      */
  633.     public function getDescription()
  634.     {
  635.         return $this->description;
  636.     }
  637.     /**
  638.      * Set clientContact
  639.      *
  640.      * @param string $clientContact
  641.      *
  642.      * @return Reservation
  643.      */
  644.     public function setClientContact($clientContact)
  645.     {
  646.         $this->clientContact $clientContact;
  647.         return $this;
  648.     }
  649.     /**
  650.      * Get clientContact
  651.      *
  652.      * @return string
  653.      */
  654.     public function getClientContact()
  655.     {
  656.         return $this->clientContact;
  657.     }
  658.     /**
  659.      * Set contactUnregistered
  660.      *
  661.      * @param string $contactUnregistered
  662.      *
  663.      * @return Reservation
  664.      */
  665.     public function setContactUnregistered($contactUnregistered)
  666.     {
  667.         $this->contactUnregistered $contactUnregistered;
  668.         return $this;
  669.     }
  670.     /**
  671.      * Get contactUnregistered
  672.      *
  673.      * @return string
  674.      */
  675.     public function getContactUnregistered()
  676.     {
  677.         return $this->contactUnregistered;
  678.     }
  679.     /**
  680.      * Set days
  681.      *
  682.      * @param string $days
  683.      *
  684.      * @return Reservation
  685.      */
  686.     public function setDays(?\DateTimeInterface $days): self
  687.     {
  688.         $this->days $days;
  689.         
  690.         return $this;
  691.     }
  692.     /**
  693.      * Get days
  694.      *
  695.      * @return string
  696.      */
  697.     public function getDays(): ?\DateTimeInterface
  698.     {
  699.         return $this->days;
  700.     }
  701.     /**
  702.      * Set contract
  703.      *
  704.      * @param string $contract
  705.      *
  706.      * @return Reservation
  707.      */
  708.     public function setContract($contract)
  709.     {
  710.         $this->contract $contract;
  711.         return $this;
  712.     }
  713.     /**
  714.      * Get contract
  715.      *
  716.      * @return string
  717.      */
  718.     public function getContract()
  719.     {
  720.         return $this->contract;
  721.     }
  722.     /**
  723.      * Set nameContactUnregistered
  724.      *
  725.      * @param string $nameContactUnregistered
  726.      *
  727.      * @return Reservation
  728.      */
  729.     public function setNameContactUnregistered($nameContactUnregistered)
  730.     {
  731.         $this->nameContactUnregistered $nameContactUnregistered;
  732.         return $this;
  733.     }
  734.     /**
  735.      * Get nameContactUnregistered
  736.      *
  737.      * @return string
  738.      */
  739.     public function getNameContactUnregistered()
  740.     {
  741.         return $this->nameContactUnregistered;
  742.     }
  743.     /**
  744.      * Set phoneContactUnregistered
  745.      *
  746.      * @param string $phoneContactUnregistered
  747.      *
  748.      * @return Reservation
  749.      */
  750.     public function setPhoneContactUnregistered($phoneContactUnregistered)
  751.     {
  752.         $this->phoneContactUnregistered $phoneContactUnregistered;
  753.         return $this;
  754.     }
  755.     /**
  756.      * Get phoneContactUnregistered
  757.      *
  758.      * @return string
  759.      */
  760.     public function getPhoneContactUnregistered()
  761.     {
  762.         return $this->phoneContactUnregistered;
  763.     }
  764.     public function getHtFile(): ?HtFile
  765.     {
  766.         return $this->htFile;
  767.     }
  768.     public function setHtFile(?HtFile $htFile): self
  769.     {
  770.         // unset the owning side of the relation if necessary
  771.         if ($htFile === null && $this->htFile !== null) {
  772.             $this->htFile->setReservation(null);
  773.         }
  774.         // set the owning side of the relation if necessary
  775.         if ($htFile !== null && $htFile->getReservation() !== $this) {
  776.             $htFile->setReservation($this);
  777.         }
  778.         $this->htFile $htFile;
  779.         return $this;
  780.     }
  781.     /**
  782.      * Set token
  783.      *
  784.      * @param string $token
  785.      *
  786.      * @return Reservation
  787.      */
  788.     public function setToken($token)
  789.     {
  790.         $this->token $token;
  791.         return $this;
  792.     }
  793.     /**
  794.      * Get token
  795.      *
  796.      * @return string
  797.      */
  798.     public function getToken()
  799.     {
  800.         return $this->token;
  801.     }
  802.     /**
  803.      * @return Collection<int, GpReminder>
  804.      */
  805.     public function getGpReminders(): Collection
  806.     {
  807.         return $this->gpReminders;
  808.     }
  809.     public function addGpReminder(GpReminder $gpReminder): self
  810.     {
  811.         if (!$this->gpReminders->contains($gpReminder)) {
  812.             $this->gpReminders[] = $gpReminder;
  813.             $gpReminder->setReservation($this);
  814.         }
  815.         return $this;
  816.     }
  817.     public function removeGpReminder(GpReminder $gpReminder): self
  818.     {
  819.         if ($this->gpReminders->removeElement($gpReminder)) {
  820.             // set the owning side to null (unless already changed)
  821.             if ($gpReminder->getReservation() === $this) {
  822.                 $gpReminder->setReservation(null);
  823.             }
  824.         }
  825.         return $this;
  826.     }
  827. }