<?php
namespace Aviatur\GeneralBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* SpecialDiscountCampaign.
*
* @ORM\Table(name="special_discount_campaign")
* @ORM\Entity
*/
class SpecialDiscountCampaign
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
*
* @ORM\ManyToOne(targetEntity="\Aviatur\TrmBundle\Entity\Currency")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="currency_id", referencedColumnName="id")
* })
*/
private ?\Aviatur\TrmBundle\Entity\Currency $currency = null;
/**
*
* @ORM\ManyToOne(targetEntity="\Aviatur\AgencyBundle\Entity\Agency", inversedBy="specialDiscountCampaign", cascade={"all"})
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="agency_id", referencedColumnName="id")
* })
*/
private ?\Aviatur\AgencyBundle\Entity\Agency $agency = null;
/**
* @var string
*
* @ORM\Column(name="description", type="text")
*/
private $description;
/**
* @var \DateTime
*
* @ORM\Column(name="startDate", type="datetime")
*/
private $startdate;
/**
* @var \DateTime
*
* @ORM\Column(name="finishDate", type="datetime")
*/
private $finishdate;
/**
* @ORM\Column(name="isActive", type="boolean", nullable=true)
*/
private bool $isactive = false;
/**
* @var float
*
* @ORM\Column(name="amount", type="decimal", scale=2, nullable=false)
*/
private $amount;
/**
* @var string
*
* @ORM\Column(name="params", type="text")
*/
private $params;
/**
* @ORM\OneToMany(targetEntity="Aviatur\HotelBundle\Entity\SpecialDiscountHotel", mappedBy="specialDiscountCampaign")
*/
private $specialDiscountHotel;
/**
* @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\SpecialDiscount", mappedBy="specialDiscountCampaign")
*/
private $specialDiscount;
/**
* @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\SpecialDiscountAviatur", mappedBy="specialDiscountCampaign")
*/
private $specialDiscountAviatur;
/**
* @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\SpecialDiscountAviaturFranchise", mappedBy="specialDiscountCampaign")
*/
private $specialDiscountAviaturFranchise;
/**
* Constructor.
*/
public function __construct()
{
$this->specialDiscountHotel = new \Doctrine\Common\Collections\ArrayCollection();
$this->specialDiscount = new \Doctrine\Common\Collections\ArrayCollection();
$this->specialDiscountAviatur = new \Doctrine\Common\Collections\ArrayCollection();
$this->specialDiscountAviaturFranchise = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set currency.
*
* @param \Aviatur\TrmBundle\Entity\Currency $currency
*
* @return SpecialDiscountCampaign
*/
public function setCurrency(\Aviatur\TrmBundle\Entity\Currency $currency = null)
{
$this->currency = $currency;
return $this;
}
/**
* Get currency.
*
* @return int
*/
public function getCurrency()
{
return $this->currency;
}
/**
* Set agency.
*
* @param \Aviatur\AgencyBundle\Entity\Agency $agency
*
* @return SpecialDiscountCampaign
*/
public function setAgency(\Aviatur\AgencyBundle\Entity\Agency $agency = null)
{
$this->agency = $agency;
return $this;
}
/**
* Get agency.
*
* @return int
*/
public function getAgency()
{
return $this->agency;
}
/**
* Set description.
*
* @param string $description
*
* @return SpecialDiscountCampaign
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set startdate.
*
* @param string $startdate
*
* @return SpecialDiscountCampaign
*/
public function setStartdate($startdate)
{
$this->startdate = $startdate;
return $this;
}
/**
* Get startdate.
*
* @return \DateTime
*/
public function getStartdate()
{
return $this->startdate;
}
/**
* Set finishdate.
*
* @param string $finishdate
*
* @return SpecialDiscountCampaign
*/
public function setFinishdate($finishdate)
{
$this->finishdate = $finishdate;
return $this;
}
/**
* Get finishdate.
*
* @return \DateTime
*/
public function getFinishdate()
{
return $this->finishdate;
}
/**
* Set isactive.
*
* @param bool $isactive
*
* @return SpecialDiscountCampaign
*/
public function setIsactive($isactive)
{
$this->isactive = $isactive;
return $this;
}
/**
* Get isactive.
*
* @return bool
*/
public function getIsactive()
{
return $this->isactive;
}
/**
* Set amount.
*
* @param string $amount
*
* @return SpecialDiscountCampaign
*/
public function setAmount($amount)
{
$this->amount = $amount;
return $this;
}
/**
* Get amount.
*
* @return decimal
*/
public function getAmount()
{
return $this->amount;
}
/**
* Set params.
*
* @param string $params
*
* @return SpecialDiscountCampaign
*/
public function setParams($params)
{
$this->params = $params;
return $this;
}
/**
* Get params.
*
* @return string
*/
public function getParams()
{
return $this->params;
}
/**
* Add specialDiscountHotel.
*
* @return SpecialDiscountCampaign
*/
public function addSpecialDiscountHotel(\Aviatur\HotelBundle\Entity\SpecialDiscountHotel $specialDiscountHotel)
{
$this->specialDiscountHotel[] = $specialDiscountHotel;
return $this;
}
/**
* Remove specialDiscountHotel.
*/
public function removeSpecialDiscountHotel(\Aviatur\HotelBundle\Entity\SpecialDiscountHotel $specialDiscountHotel)
{
$this->specialDiscountHotel->removeElement($specialDiscountHotel);
}
/**
* Get specialDiscountHotel.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getSpecialDiscountHotel()
{
return $this->specialDiscountHotel;
}
/**
* Add specialDiscount.
*
* @return SpecialDiscountCampaign
*/
public function addSpecialDiscount(\Aviatur\FlightBundle\Entity\SpecialDiscount $specialDiscount)
{
$this->specialDiscount[] = $specialDiscount;
return $this;
}
/**
* Remove specialDiscount.
*/
public function removeSpecialDiscount(\Aviatur\FlightBundle\Entity\SpecialDiscount $specialDiscount)
{
$this->specialDiscount->removeElement($specialDiscount);
}
/**
* Get specialDiscount.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getSpecialDiscount()
{
return $this->specialDiscount;
}
/**
* Add specialDiscountAviatur.
*
* @return SpecialDiscountCampaign
*/
public function addSpecialDiscountAviatur(\Aviatur\FlightBundle\Entity\SpecialDiscountAviatur $specialDiscountAviatur)
{
$this->specialDiscountAviatur[] = $specialDiscountAviatur;
return $this;
}
/**
* Remove specialDiscountAviatur.
*/
public function removeSpecialDiscountAviatur(\Aviatur\FlightBundle\Entity\SpecialDiscountAviatur $specialDiscountAviatur)
{
$this->specialDiscountAviatur->removeElement($specialDiscountAviatur);
}
/**
* Get specialDiscountAviatur.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getSpecialDiscountAviatur()
{
return $this->specialDiscountAviatur;
}
/**
* Add specialDiscountAviaturFranchise.
*
* @return SpecialDiscountCampaign
*/
public function addSpecialDiscountAviaturFranchise(\Aviatur\FlightBundle\Entity\SpecialDiscountAviaturFranchise $specialDiscountAviaturFranchise)
{
$this->specialDiscountAviaturFranchise[] = $specialDiscountAviaturFranchise;
return $this;
}
/**
* Remove specialDiscountAviaturFranchise.
*/
public function removeSpecialDiscountAviaturFranchise(\Aviatur\FlightBundle\Entity\SpecialDiscountAviaturFranchise $specialDiscountAviaturFranchise)
{
$this->specialDiscountAviaturFranchise->removeElement($specialDiscountAviaturFranchise);
}
/**
* Get specialDiscountAviaturFranchise.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getSpecialDiscountAviaturFranchise()
{
return $this->specialDiscountAviaturFranchise;
}
}