src/Aviatur/GeneralBundle/Entity/SpecialDiscountCampaign.php line 13

Open in your IDE?
  1. <?php
  2. namespace Aviatur\GeneralBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * SpecialDiscountCampaign.
  6.  *
  7.  * @ORM\Table(name="special_discount_campaign")
  8.  * @ORM\Entity
  9.  */
  10. class SpecialDiscountCampaign
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(name="id", type="integer", nullable=false)
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $id;
  20.     /**
  21.      *
  22.      * @ORM\ManyToOne(targetEntity="\Aviatur\TrmBundle\Entity\Currency")
  23.      * @ORM\JoinColumns({
  24.      *   @ORM\JoinColumn(name="currency_id", referencedColumnName="id")
  25.      * })
  26.      */
  27.     private ?\Aviatur\TrmBundle\Entity\Currency $currency null;
  28.     /**
  29.      *
  30.      * @ORM\ManyToOne(targetEntity="\Aviatur\AgencyBundle\Entity\Agency", inversedBy="specialDiscountCampaign", cascade={"all"})
  31.      * @ORM\JoinColumns({
  32.      *   @ORM\JoinColumn(name="agency_id", referencedColumnName="id")
  33.      * })
  34.      */
  35.     private ?\Aviatur\AgencyBundle\Entity\Agency $agency null;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="description", type="text")
  40.      */
  41.     private $description;
  42.     /**
  43.      * @var \DateTime
  44.      *
  45.      * @ORM\Column(name="startDate", type="datetime")
  46.      */
  47.     private $startdate;
  48.     /**
  49.      * @var \DateTime
  50.      *
  51.      * @ORM\Column(name="finishDate", type="datetime")
  52.      */
  53.     private $finishdate;
  54.     /**
  55.      * @ORM\Column(name="isActive", type="boolean", nullable=true)
  56.      */
  57.     private bool $isactive false;
  58.     /**
  59.      * @var float
  60.      *
  61.      * @ORM\Column(name="amount", type="decimal", scale=2, nullable=false)
  62.      */
  63.     private $amount;
  64.     /**
  65.      * @var string
  66.      *
  67.      * @ORM\Column(name="params", type="text")
  68.      */
  69.     private $params;
  70.     /**
  71.      * @ORM\OneToMany(targetEntity="Aviatur\HotelBundle\Entity\SpecialDiscountHotel", mappedBy="specialDiscountCampaign")
  72.      */
  73.     private $specialDiscountHotel;
  74.     /**
  75.      * @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\SpecialDiscount", mappedBy="specialDiscountCampaign")
  76.      */
  77.     private $specialDiscount;
  78.     /**
  79.      * @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\SpecialDiscountAviatur", mappedBy="specialDiscountCampaign")
  80.      */
  81.     private $specialDiscountAviatur;
  82.     /**
  83.      * @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\SpecialDiscountAviaturFranchise", mappedBy="specialDiscountCampaign")
  84.      */
  85.     private $specialDiscountAviaturFranchise;
  86.     /**
  87.      * Constructor.
  88.      */
  89.     public function __construct()
  90.     {
  91.         $this->specialDiscountHotel = new \Doctrine\Common\Collections\ArrayCollection();
  92.         $this->specialDiscount = new \Doctrine\Common\Collections\ArrayCollection();
  93.         $this->specialDiscountAviatur = new \Doctrine\Common\Collections\ArrayCollection();
  94.         $this->specialDiscountAviaturFranchise = new \Doctrine\Common\Collections\ArrayCollection();
  95.     }
  96.     /**
  97.      * Get id.
  98.      *
  99.      * @return int
  100.      */
  101.     public function getId()
  102.     {
  103.         return $this->id;
  104.     }
  105.     /**
  106.      * Set currency.
  107.      *
  108.      * @param \Aviatur\TrmBundle\Entity\Currency $currency
  109.      *
  110.      * @return SpecialDiscountCampaign
  111.      */
  112.     public function setCurrency(\Aviatur\TrmBundle\Entity\Currency $currency null)
  113.     {
  114.         $this->currency $currency;
  115.         return $this;
  116.     }
  117.     /**
  118.      * Get currency.
  119.      *
  120.      * @return int
  121.      */
  122.     public function getCurrency()
  123.     {
  124.         return $this->currency;
  125.     }
  126.     /**
  127.      * Set agency.
  128.      *
  129.      * @param \Aviatur\AgencyBundle\Entity\Agency $agency
  130.      *
  131.      * @return SpecialDiscountCampaign
  132.      */
  133.     public function setAgency(\Aviatur\AgencyBundle\Entity\Agency $agency null)
  134.     {
  135.         $this->agency $agency;
  136.         return $this;
  137.     }
  138.     /**
  139.      * Get agency.
  140.      *
  141.      * @return int
  142.      */
  143.     public function getAgency()
  144.     {
  145.         return $this->agency;
  146.     }
  147.     /**
  148.      * Set description.
  149.      *
  150.      * @param string $description
  151.      *
  152.      * @return SpecialDiscountCampaign
  153.      */
  154.     public function setDescription($description)
  155.     {
  156.         $this->description $description;
  157.         return $this;
  158.     }
  159.     /**
  160.      * Get description.
  161.      *
  162.      * @return string
  163.      */
  164.     public function getDescription()
  165.     {
  166.         return $this->description;
  167.     }
  168.     /**
  169.      * Set startdate.
  170.      *
  171.      * @param string $startdate
  172.      *
  173.      * @return SpecialDiscountCampaign
  174.      */
  175.     public function setStartdate($startdate)
  176.     {
  177.         $this->startdate $startdate;
  178.         return $this;
  179.     }
  180.     /**
  181.      * Get startdate.
  182.      *
  183.      * @return \DateTime
  184.      */
  185.     public function getStartdate()
  186.     {
  187.         return $this->startdate;
  188.     }
  189.     /**
  190.      * Set finishdate.
  191.      *
  192.      * @param string $finishdate
  193.      *
  194.      * @return SpecialDiscountCampaign
  195.      */
  196.     public function setFinishdate($finishdate)
  197.     {
  198.         $this->finishdate $finishdate;
  199.         return $this;
  200.     }
  201.     /**
  202.      * Get finishdate.
  203.      *
  204.      * @return \DateTime
  205.      */
  206.     public function getFinishdate()
  207.     {
  208.         return $this->finishdate;
  209.     }
  210.     /**
  211.      * Set isactive.
  212.      *
  213.      * @param bool $isactive
  214.      *
  215.      * @return SpecialDiscountCampaign
  216.      */
  217.     public function setIsactive($isactive)
  218.     {
  219.         $this->isactive $isactive;
  220.         return $this;
  221.     }
  222.     /**
  223.      * Get isactive.
  224.      *
  225.      * @return bool
  226.      */
  227.     public function getIsactive()
  228.     {
  229.         return $this->isactive;
  230.     }
  231.     /**
  232.      * Set amount.
  233.      *
  234.      * @param string $amount
  235.      *
  236.      * @return SpecialDiscountCampaign
  237.      */
  238.     public function setAmount($amount)
  239.     {
  240.         $this->amount $amount;
  241.         return $this;
  242.     }
  243.     /**
  244.      * Get amount.
  245.      *
  246.      * @return decimal
  247.      */
  248.     public function getAmount()
  249.     {
  250.         return $this->amount;
  251.     }
  252.     /**
  253.      * Set params.
  254.      *
  255.      * @param string $params
  256.      *
  257.      * @return SpecialDiscountCampaign
  258.      */
  259.     public function setParams($params)
  260.     {
  261.         $this->params $params;
  262.         return $this;
  263.     }
  264.     /**
  265.      * Get params.
  266.      *
  267.      * @return string
  268.      */
  269.     public function getParams()
  270.     {
  271.         return $this->params;
  272.     }
  273.     /**
  274.      * Add specialDiscountHotel.
  275.      *
  276.      * @return SpecialDiscountCampaign
  277.      */
  278.     public function addSpecialDiscountHotel(\Aviatur\HotelBundle\Entity\SpecialDiscountHotel $specialDiscountHotel)
  279.     {
  280.         $this->specialDiscountHotel[] = $specialDiscountHotel;
  281.         return $this;
  282.     }
  283.     /**
  284.      * Remove specialDiscountHotel.
  285.      */
  286.     public function removeSpecialDiscountHotel(\Aviatur\HotelBundle\Entity\SpecialDiscountHotel $specialDiscountHotel)
  287.     {
  288.         $this->specialDiscountHotel->removeElement($specialDiscountHotel);
  289.     }
  290.     /**
  291.      * Get specialDiscountHotel.
  292.      *
  293.      * @return \Doctrine\Common\Collections\Collection
  294.      */
  295.     public function getSpecialDiscountHotel()
  296.     {
  297.         return $this->specialDiscountHotel;
  298.     }
  299.     /**
  300.      * Add specialDiscount.
  301.      *
  302.      * @return SpecialDiscountCampaign
  303.      */
  304.     public function addSpecialDiscount(\Aviatur\FlightBundle\Entity\SpecialDiscount $specialDiscount)
  305.     {
  306.         $this->specialDiscount[] = $specialDiscount;
  307.         return $this;
  308.     }
  309.     /**
  310.      * Remove specialDiscount.
  311.      */
  312.     public function removeSpecialDiscount(\Aviatur\FlightBundle\Entity\SpecialDiscount $specialDiscount)
  313.     {
  314.         $this->specialDiscount->removeElement($specialDiscount);
  315.     }
  316.     /**
  317.      * Get specialDiscount.
  318.      *
  319.      * @return \Doctrine\Common\Collections\Collection
  320.      */
  321.     public function getSpecialDiscount()
  322.     {
  323.         return $this->specialDiscount;
  324.     }
  325.     /**
  326.      * Add specialDiscountAviatur.
  327.      *
  328.      * @return SpecialDiscountCampaign
  329.      */
  330.     public function addSpecialDiscountAviatur(\Aviatur\FlightBundle\Entity\SpecialDiscountAviatur $specialDiscountAviatur)
  331.     {
  332.         $this->specialDiscountAviatur[] = $specialDiscountAviatur;
  333.         return $this;
  334.     }
  335.     /**
  336.      * Remove specialDiscountAviatur.
  337.      */
  338.     public function removeSpecialDiscountAviatur(\Aviatur\FlightBundle\Entity\SpecialDiscountAviatur $specialDiscountAviatur)
  339.     {
  340.         $this->specialDiscountAviatur->removeElement($specialDiscountAviatur);
  341.     }
  342.     /**
  343.      * Get specialDiscountAviatur.
  344.      *
  345.      * @return \Doctrine\Common\Collections\Collection
  346.      */
  347.     public function getSpecialDiscountAviatur()
  348.     {
  349.         return $this->specialDiscountAviatur;
  350.     }
  351.     /**
  352.      * Add specialDiscountAviaturFranchise.
  353.      *
  354.      * @return SpecialDiscountCampaign
  355.      */
  356.     public function addSpecialDiscountAviaturFranchise(\Aviatur\FlightBundle\Entity\SpecialDiscountAviaturFranchise $specialDiscountAviaturFranchise)
  357.     {
  358.         $this->specialDiscountAviaturFranchise[] = $specialDiscountAviaturFranchise;
  359.         return $this;
  360.     }
  361.     /**
  362.      * Remove specialDiscountAviaturFranchise.
  363.      */
  364.     public function removeSpecialDiscountAviaturFranchise(\Aviatur\FlightBundle\Entity\SpecialDiscountAviaturFranchise $specialDiscountAviaturFranchise)
  365.     {
  366.         $this->specialDiscountAviaturFranchise->removeElement($specialDiscountAviaturFranchise);
  367.     }
  368.     /**
  369.      * Get specialDiscountAviaturFranchise.
  370.      *
  371.      * @return \Doctrine\Common\Collections\Collection
  372.      */
  373.     public function getSpecialDiscountAviaturFranchise()
  374.     {
  375.         return $this->specialDiscountAviaturFranchise;
  376.     }
  377. }