<?php
namespace App\MDS\GreenPatioBundle\Entity;
use App\Entity\GpReminder;
use App\Entity\HtFile;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Annotation\Ignore;
/**
* Reservation
*
* @ORM\Table(name="reservation")
* @ORM\Entity(repositoryClass="App\MDS\GreenPatioBundle\Repository\ReservationRepository")
*/
class Reservation
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=255)
* @Assert\NotBlank
*/
private $title;
/**
* @var string
*
* @ORM\Column(name="client", type="string", length=255, nullable=true )
*
*/
private $client;
/**
* @var string
*
* @ORM\Column(name="clientContact", type="string", length=255, nullable=true )
*
*/
private $clientContact;
/**
* @var string
*
* @ORM\Column(name="contactUnregistered", type="string", length=255, nullable=true )
*
*/
private $contactUnregistered;
/**
* @var string
*
* @ORM\Column(name="nameContactUnregistered", type="string", length=255, nullable=true )
*
*/
private $nameContactUnregistered;
/**
* @var string
*
* @ORM\Column(name="phoneContactUnregistered", type="string", length=255, nullable=true )
*
*/
private $phoneContactUnregistered;
/**
* @var string
*
* @ORM\Column(name="days", type="string", length=255, nullable=true )
*
*/
private $days;
/**
* @var \DateTime
*
* @ORM\Column(name="createdAt", type="datetime")
*/
private $createdAt;
/**
* @var string
*
* @ORM\Column(name="priority", type="string", length=255)
*/
private $priority;
/**
* @var string
*
* @ORM\Column(name="createdBy", type="string", length=255)
*/
private $createdBy;
/**
* @var string
*
* @ORM\Column(name="supplier", type="string", length=255, nullable=true)
*/
private $supplier;
/**
* @var string
*
* @ORM\Column(name="status", type="string", length=255, nullable=true)
*/
private $status;
/**
* @var \DateTime
*
* @ORM\Column(name="updatedAt", type="datetime")
*/
private $updatedAt;
/**
* @var string
*
* @ORM\Column(name="updatedBy", type="string", length=255)
*/
private $updatedBy;
/**
* @var int
*
* @ORM\Column(name="daysBlock", type="integer", nullable=true)
*/
private $daysBlock;
/**
* @var string
*
* @ORM\Column(name="advancePayment", type="string", length=255, nullable=true)
*/
private $advancePayment;
/**
* @var int
*
* @ORM\Column(name="idProposal", type="integer", nullable=true)
*/
private $idProposal;
/**
* @var string
*
* @ORM\Column(name="cateringName", type="string", length=255, nullable=true)
*/
private $cateringName;
/**
* @var string
*
* @ORM\Column(name="boolCatering", type="boolean", nullable=true)
*/
private $boolCatering;
/**
* @var \DateTime
*
* @ORM\Column(name="dateStart", type="datetime", nullable=true)
*/
private $dateStart;
/**
* @var \DateTime
*
* @ORM\Column(name="dateEnd", type="datetime", nullable=true)
*/
private $dateEnd;
/**
* @var int
*
* @ORM\Column(name="pax", type="integer", nullable=true)
*/
private $pax;
/**
* @var int
*
* @ORM\Column(name="deposit", type="integer", nullable=true)
*/
private $deposit;
/**
* @var string
*
* @ORM\Column(name="access_key", type="string", length=255, nullable=true)
*/
private $accessKey;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
/**
* @var string
*
* @ORM\Column(name="contract", type="text", nullable=true)
*/
private $contract;
/**
* @ORM\OneToOne(targetEntity=HtFile::class, mappedBy="reservation", cascade={"persist", "remove"})
* @Ignore
*/
private $htFile;
/**
* @var string
*
* @ORM\Column(name="token", type="text", nullable=true)
*/
private $token;
/**
* @ORM\OneToMany(targetEntity=GpReminder::class, mappedBy="reservation", orphanRemoval=true)
*/
private $gpReminders;
public function __construct()
{
$this->gpReminders = new ArrayCollection();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set title
*
* @param string $title
*
* @return Reservation
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set client
*
* @param string $client
*
* @return Reservation
*/
public function setClient($client)
{
$this->client = $client;
return $this;
}
/**
* Get client
*
* @return string
*/
public function getClient()
{
return $this->client;
}
/**
* Set createdAt
*
* @param \DateTime $createdAt
*
* @return Reservation
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set priority
*
* @param string $priority
*
* @return Reservation
*/
public function setPriority($priority)
{
$this->priority = $priority;
return $this;
}
/**
* Get priority
*
* @return string
*/
public function getPriority()
{
return $this->priority;
}
/**
* Set createdBy
*
* @param string $createdBy
*
* @return Reservation
*/
public function setCreatedBy($createdBy)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Get createdBy
*
* @return string
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Set supplier
*
* @param string $supplier
*
* @return Reservation
*/
public function setSupplier($supplier)
{
$this->supplier = $supplier;
return $this;
}
/**
* Get supplier
*
* @return string
*/
public function getSupplier()
{
return $this->supplier;
}
/**
* Set status
*
* @param string $status
*
* @return Reservation
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status
*
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* Set updatedAt
*
* @param \DateTime $updatedAt
*
* @return Reservation
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set updatedBy
*
* @param string $updatedBy
*
* @return Reservation
*/
public function setUpdatedBy($updatedBy)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get updatedBy
*
* @return string
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* Set daysBlock
*
* @param integer $daysBlock
*
* @return Reservation
*/
public function setDaysBlock($daysBlock)
{
$this->daysBlock = $daysBlock;
return $this;
}
/**
* Get daysBlock
*
* @return integer
*/
public function getDaysBlock()
{
return $this->daysBlock;
}
/**
* Set advancePayment
*
* @param string $advancePayment
*
* @return Reservation
*/
public function setAdvancePayment($advancePayment)
{
$this->advancePayment = $advancePayment;
return $this;
}
/**
* Get advancePayment
*
* @return string
*/
public function getAdvancePayment()
{
return $this->advancePayment;
}
/**
* Set idProposal
*
* @param integer $idProposal
*
* @return Reservation
*/
public function setIdProposal($idProposal)
{
$this->idProposal = $idProposal;
return $this;
}
/**
* Get idProposal
*
* @return integer
*/
public function getIdProposal()
{
return $this->idProposal;
}
/**
* Set cateringName
*
* @param string $cateringName
*
* @return Reservation
*/
public function setCateringName($cateringName)
{
$this->cateringName = $cateringName;
return $this;
}
/**
* Get cateringName
*
* @return string
*/
public function getCateringName()
{
return $this->cateringName;
}
/**
* Set boolCatering
*
* @param boolean $boolCatering
*
* @return Reservation
*/
public function setBoolCatering($boolCatering)
{
$this->boolCatering = $boolCatering;
return $this;
}
/**
* Get boolCatering
*
* @return boolean
*/
public function getBoolCatering()
{
return $this->boolCatering;
}
/**
* Set dateStart
*
* @param \DateTime $dateStart
*
* @return Reservation
*/
public function setDateStart($dateStart)
{
$this->dateStart = $dateStart;
return $this;
}
/**
* Get dateStart
*
* @return \DateTime
*/
public function getDateStart()
{
return $this->dateStart;
}
/**
* Set dateEnd
*
* @param \DateTime $dateEnd
*
* @return Reservation
*/
public function setDateEnd($dateEnd)
{
$this->dateEnd = $dateEnd;
return $this;
}
/**
* Get dateEnd
*
* @return \DateTime
*/
public function getDateEnd()
{
return $this->dateEnd;
}
/**
* Set pax
*
* @param integer $pax
*
* @return Reservation
*/
public function setPax($pax)
{
$this->pax = $pax;
return $this;
}
/**
* Get pax
*
* @return integer
*/
public function getPax()
{
return $this->pax;
}
/**
* Set deposit
*
* @param integer $deposit
*
* @return Reservation
*/
public function setDeposit($deposit)
{
$this->deposit = $deposit;
return $this;
}
/**
* Get deposit
*
* @return integer
*/
public function getDeposit()
{
return $this->deposit;
}
/**
* Set accessKey
*
* @param string $accessKey
*
* @return Reservation
*/
public function setAccessKey($accessKey)
{
$this->accessKey = $accessKey;
return $this;
}
/**
* Get accessKey
*
* @return string
*/
public function getAccessKey()
{
return $this->accessKey;
}
/**
* Set description
*
* @param string $description
*
* @return Reservation
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set clientContact
*
* @param string $clientContact
*
* @return Reservation
*/
public function setClientContact($clientContact)
{
$this->clientContact = $clientContact;
return $this;
}
/**
* Get clientContact
*
* @return string
*/
public function getClientContact()
{
return $this->clientContact;
}
/**
* Set contactUnregistered
*
* @param string $contactUnregistered
*
* @return Reservation
*/
public function setContactUnregistered($contactUnregistered)
{
$this->contactUnregistered = $contactUnregistered;
return $this;
}
/**
* Get contactUnregistered
*
* @return string
*/
public function getContactUnregistered()
{
return $this->contactUnregistered;
}
/**
* Set days
*
* @param string $days
*
* @return Reservation
*/
public function setDays($days)
{
$this->days = $days;
return $this;
}
/**
* Get days
*
* @return string
*/
public function getDays()
{
return $this->days;
}
/**
* Set contract
*
* @param string $contract
*
* @return Reservation
*/
public function setContract($contract)
{
$this->contract = $contract;
return $this;
}
/**
* Get contract
*
* @return string
*/
public function getContract()
{
return $this->contract;
}
/**
* Set nameContactUnregistered
*
* @param string $nameContactUnregistered
*
* @return Reservation
*/
public function setNameContactUnregistered($nameContactUnregistered)
{
$this->nameContactUnregistered = $nameContactUnregistered;
return $this;
}
/**
* Get nameContactUnregistered
*
* @return string
*/
public function getNameContactUnregistered()
{
return $this->nameContactUnregistered;
}
/**
* Set phoneContactUnregistered
*
* @param string $phoneContactUnregistered
*
* @return Reservation
*/
public function setPhoneContactUnregistered($phoneContactUnregistered)
{
$this->phoneContactUnregistered = $phoneContactUnregistered;
return $this;
}
/**
* Get phoneContactUnregistered
*
* @return string
*/
public function getPhoneContactUnregistered()
{
return $this->phoneContactUnregistered;
}
public function getHtFile(): ?HtFile
{
return $this->htFile;
}
public function setHtFile(?HtFile $htFile): self
{
// unset the owning side of the relation if necessary
if ($htFile === null && $this->htFile !== null) {
$this->htFile->setReservation(null);
}
// set the owning side of the relation if necessary
if ($htFile !== null && $htFile->getReservation() !== $this) {
$htFile->setReservation($this);
}
$this->htFile = $htFile;
return $this;
}
/**
* Set token
*
* @param string $token
*
* @return Reservation
*/
public function setToken($token)
{
$this->token = $token;
return $this;
}
/**
* Get token
*
* @return string
*/
public function getToken()
{
return $this->token;
}
/**
* @return Collection<int, GpReminder>
*/
public function getGpReminders(): Collection
{
return $this->gpReminders;
}
public function addGpReminder(GpReminder $gpReminder): self
{
if (!$this->gpReminders->contains($gpReminder)) {
$this->gpReminders[] = $gpReminder;
$gpReminder->setReservation($this);
}
return $this;
}
public function removeGpReminder(GpReminder $gpReminder): self
{
if ($this->gpReminders->removeElement($gpReminder)) {
// set the owning side to null (unless already changed)
if ($gpReminder->getReservation() === $this) {
$gpReminder->setReservation(null);
}
}
return $this;
}
}