<?php
namespace Aviatur\HotelBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Hotel.
*
* @ORM\Table(name="hotel")
* @ORM\Entity
*/
class Hotel
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="codHotel", type="string", length=100, nullable=false)
*/
private $codhotel;
/**
* @var string
*
* @ORM\Column(name="description", type="string", length=255, nullable=false)
*/
private $description;
/**
* @ORM\OneToMany(targetEntity="Aviatur\HotelBundle\Entity\Markup", mappedBy="hotel", cascade={"all"})
*/
private $markup;
public function __toString()
{
$return = $this->getDescription().' ('.$this->getCodhotel().')';
return $return;
}
/**
* @var float
*
* @ORM\Column(name="markup_value", type="float", precision=10, scale=0, nullable=false)
*/
private $markupValue;
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set codhotel.
*
* @param string $codhotel
*
* @return Hotel
*/
public function setCodhotel($codhotel)
{
$this->codhotel = $codhotel;
return $this;
}
/**
* Get codhotel.
*
* @return string
*/
public function getCodhotel()
{
return $this->codhotel;
}
/**
* Set description.
*
* @param string $description
*
* @return Hotel
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Constructor.
*/
public function __construct()
{
$this->markup = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Add markup.
*
* @return Hotel
*/
public function addMarkup(\Aviatur\HotelBundle\Entity\Markup $markup)
{
$this->markup[] = $markup;
return $this;
}
/**
* Remove markup.
*/
public function removeMarkup(\Aviatur\HotelBundle\Entity\Markup $markup)
{
$this->markup->removeElement($markup);
}
/**
* Get markup.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getMarkup()
{
return $this->markup;
}
/**
* Get markupValue.
*
* @return float
*/
public function getMarkupValue()
{
return $this->markupValue;
}
}