<?php
namespace Aviatur\GeneralBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* CouponDiscount.
*
* @ORM\Table(name="coupon_discount")
* @ORM\Entity
*/
class CouponDiscount
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="description", type="text")
*/
private $description;
/**
* @var string
*
* @ORM\Column(name="key", type="string", length=100, nullable=false)
*/
private $key;
/**
* @var \DateTime
*
* @ORM\Column(name="creationDate", type="datetime")
*/
private $creationdate;
/**
* @var \DateTime
*
* @ORM\Column(name="startDate", type="datetime")
*/
private $startdate;
/**
* @var \DateTime
*
* @ORM\Column(name="finishDate", type="datetime")
*/
private $finishdate;
/**
* @var string
*
* @ORM\Column(name="amount", type="decimal", precision=12, scale=2, nullable=false)
*/
private $amount;
/**
* @var int
*
* @ORM\Column(name="maxPromotionalCode", type="integer", nullable=false)
*/
private $maxpromotionalcode;
/**
* @ORM\Column(name="isActive", type="boolean", nullable=true)
*/
private bool $isactive = false;
/**
* @var string
*
* @ORM\Column(name="params", type="text")
*/
private $params;
/**
* @var \Currency
*
* @ORM\ManyToOne(targetEntity="Aviatur\TrmBundle\Entity\Currency")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="currency_id", referencedColumnName="id")
* })
*/
private $currency;
/**
* @ORM\OneToMany(targetEntity="Aviatur\GeneralBundle\Entity\CouponDiscountAgency", mappedBy="couponDiscount")
*/
private $couponDiscountAgency;
public function __construct()
{
$this->couponDiscountAgency = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set description.
*
* @param string $description
*
* @return CouponDiscount
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set key.
*
* @param string $key
*
* @return CouponDiscount
*/
public function setKey($key)
{
$this->key = $key;
return $this;
}
/**
* Get key.
*
* @return string
*/
public function getKey()
{
return $this->key;
}
/**
* Set creationdate.
*
* @param \DateTime $creationdate
*
* @return CouponDiscount
*/
public function setCreationdate($creationdate)
{
$this->creationdate = $creationdate;
return $this;
}
/**
* Get creationdate.
*
* @return \DateTime
*/
public function getCreationdate()
{
return $this->creationdate;
}
/**
* Set startdate.
*
* @param \DateTime $startdate
*
* @return CouponDiscount
*/
public function setStartdate($startdate)
{
$this->startdate = $startdate;
return $this;
}
/**
* Get startdate.
*
* @return \DateTime
*/
public function getStartdate()
{
return $this->startdate;
}
/**
* Set finishdate.
*
* @param \DateTime $finishdate
*
* @return CouponDiscount
*/
public function setFinishdate($finishdate)
{
$this->finishdate = $finishdate;
return $this;
}
/**
* Get finishdate.
*
* @return \DateTime
*/
public function getFinishdate()
{
return $this->finishdate;
}
/**
* Set amount.
*
* @param string $amount
*
* @return CouponDiscount
*/
public function setAmount($amount)
{
$this->amount = $amount;
return $this;
}
/**
* Get amount.
*
* @return string
*/
public function getAmount()
{
return $this->amount;
}
/**
* Set maxpromotionalcode.
*
* @param int $maxpromotionalcode
*
* @return CouponDiscount
*/
public function setMaxpromotionalcode($maxpromotionalcode)
{
$this->maxpromotionalcode = $maxpromotionalcode;
return $this;
}
/**
* Get maxpromotionalcode.
*
* @return int
*/
public function getMaxpromotionalcode()
{
return $this->maxpromotionalcode;
}
/**
* Set isactive.
*
* @param bool $isactive
*
* @return CouponDiscount
*/
public function setIsactive($isactive)
{
$this->isactive = $isactive;
return $this;
}
/**
* Get isactive.
*
* @return bool
*/
public function getIsactive()
{
return $this->isactive;
}
/**
* Set params.
*
* @param string $params
*
* @return CouponDiscount
*/
public function setParams($params)
{
$this->params = $params;
return $this;
}
/**
* Get params.
*
* @return string
*/
public function getParams()
{
return $this->params;
}
/**
* Add couponDiscountAgency.
*
* @return CouponDiscount
*/
public function addCouponDiscountAgency(\Aviatur\GeneralBundle\Entity\CouponDiscountAgency $couponDiscountAgency)
{
$this->couponDiscountAgency[] = $couponDiscountAgency;
return $this;
}
/**
* Remove couponDiscountAgency.
*/
public function removeCouponDiscountAgency(\Aviatur\GeneralBundle\Entity\CouponDiscountAgency $couponDiscountAgency)
{
$this->couponDiscountAgency->removeElement($couponDiscountAgency);
}
/**
* Get couponDiscountAgency.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getCouponDiscountAgency()
{
return $this->couponDiscountAgency;
}
/**
* Get currency.
*
* @return \Aviatur\TrmBundle\Entity\Currency
*/
public function getCurrency()
{
return $this->currency;
}
}