src/Aviatur/FlightBundle/Entity/SpecialDiscount.php line 13

Open in your IDE?
  1. <?php
  2. namespace Aviatur\FlightBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * SpecialDiscount.
  6.  *
  7.  * @ORM\Table(name="special_discount", indexes={@ORM\Index(name="airline_id", columns={"airline_id"})})
  8.  * @ORM\Entity(repositoryClass="Aviatur\FlightBundle\Entity\SpecialDiscountRepository")
  9.  */
  10. class SpecialDiscount
  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\GeneralBundle\Entity\SpecialDiscountCampaign", inversedBy="specialDiscount")
  23.      * @ORM\JoinColumns({
  24.      *   @ORM\JoinColumn(name="special_discount_campaign_id", referencedColumnName="id")
  25.      * })
  26.      */
  27.     private ?\Aviatur\GeneralBundle\Entity\SpecialDiscountCampaign $specialDiscountCampaign null;
  28.     /**
  29.      *
  30.      * @ORM\ManyToOne(targetEntity="Aviatur\FlightBundle\Entity\Airline")
  31.      * @ORM\JoinColumns({
  32.      *   @ORM\JoinColumn(name="airline_id", referencedColumnName="id")
  33.      * })
  34.      */
  35.     private ?\Aviatur\FlightBundle\Entity\Airline $airline null;
  36.     /**
  37.      *
  38.      * @ORM\ManyToOne(targetEntity="Aviatur\SearchBundle\Entity\SearchCities", inversedBy="specialDiscount")
  39.      * @ORM\JoinColumns({
  40.      *   @ORM\JoinColumn(name="search_cities_id", referencedColumnName="id")
  41.      * })
  42.      */
  43.     private ?\Aviatur\SearchBundle\Entity\SearchCities $searchCities null;
  44.     /**
  45.      * @ORM\OneToMany(targetEntity="SpecialDiscountReservation", mappedBy="specialDiscount", cascade={"all"})
  46.      */
  47.     private $specialDiscountReservation;
  48.     /**
  49.      *
  50.      * @ORM\ManyToOne(targetEntity="Aviatur\AgencyBundle\Entity\Agency")
  51.      * @ORM\JoinColumns({
  52.      *   @ORM\JoinColumn(name="agency_id", referencedColumnName="id")
  53.      * })
  54.      */
  55.     private ?\Aviatur\AgencyBundle\Entity\Agency $agency null;
  56.     /**
  57.      * @var int
  58.      *
  59.      * @ORM\Column(name="discountType", type="integer", nullable=false)
  60.      */
  61.     private $discounttype;
  62.     /**
  63.      * @var float
  64.      *
  65.      * @ORM\Column(name="discountAmount", type="float", precision=10, scale=0, nullable=false)
  66.      */
  67.     private $discountamount;
  68.     /**
  69.      * @var \DateTime
  70.      *
  71.      * @ORM\Column(name="discountDateStart", type="datetime", nullable=false)
  72.      */
  73.     private $discountdatestart;
  74.     /**
  75.      * @var \DateTime
  76.      *
  77.      * @ORM\Column(name="discountDateEnd", type="datetime", nullable=false)
  78.      */
  79.     private $discountdateend;
  80.     /**
  81.      * @var \DateTime
  82.      *
  83.      * @ORM\Column(name="flightDateStart", type="datetime", nullable=false)
  84.      */
  85.     private $flightdatestart;
  86.     /**
  87.      * @var \DateTime
  88.      *
  89.      * @ORM\Column(name="flightDateEnd", type="datetime", nullable=false)
  90.      */
  91.     private $flightdateend;
  92.     /**
  93.      * @var string
  94.      *
  95.      * @ORM\Column(name="tourCode", type="string", length=50, nullable=true)
  96.      */
  97.     private $tourcode;
  98.     /**
  99.      * @var string
  100.      *
  101.      * @ORM\Column(name="fuelCost", type="string", length=50, nullable=true)
  102.      */
  103.     private $fuelcost;
  104.     /**
  105.      * @var int
  106.      *
  107.      * @ORM\Column(name="flightType", type="integer", nullable=true)
  108.      */
  109.     private $flighttype;
  110.     /**
  111.      * @var string
  112.      *
  113.      * @ORM\Column(name="specialConditions", type="text", nullable=true)
  114.      */
  115.     private $specialconditions;
  116.     /**
  117.      * @var string
  118.      *
  119.      * @ORM\Column(name="countryCodes", type="string", length=50, nullable=true)
  120.      */
  121.     private $countrycodes;
  122.     /**
  123.      * @var string
  124.      *
  125.      * @ORM\Column(name="providers", type="string", length=50, nullable=true)
  126.      */
  127.     private $providers;
  128.     /**
  129.      * @ORM\Column(name="isActive", type="boolean", nullable=true)
  130.      */
  131.     private bool $isactive false;
  132.     /**
  133.      * Get id.
  134.      *
  135.      * @return int
  136.      */
  137.     public function getId()
  138.     {
  139.         return $this->id;
  140.     }
  141.     /**
  142.      * Constructor.
  143.      */
  144.     public function __construct()
  145.     {
  146.         $this->specialDiscountReservation = new \Doctrine\Common\Collections\ArrayCollection();
  147.     }
  148.     /**
  149.      * Set specialDiscountCampaign.
  150.      *
  151.      * @param \Aviatur\GeneralBundle\Entity\SpecialDiscountCampaign $specialDiscountCampaign
  152.      *
  153.      * @return SpecialDiscount
  154.      */
  155.     public function setSpecialDiscountCampaign(\Aviatur\GeneralBundle\Entity\SpecialDiscountCampaign $specialDiscountCampaign null)
  156.     {
  157.         $this->specialDiscountCampaign $specialDiscountCampaign;
  158.         return $this;
  159.     }
  160.     /**
  161.      * Get specialDiscountCampaign.
  162.      *
  163.      * @return int
  164.      */
  165.     public function getSpecialDiscountCampaign()
  166.     {
  167.         return $this->specialDiscountCampaign;
  168.     }
  169.     /**
  170.      * Set airline.
  171.      *
  172.      * @param \Aviatur\FlightBundle\Entity\Airline $airline
  173.      *
  174.      * @return SpecialDiscount
  175.      */
  176.     public function setAirline(\Aviatur\FlightBundle\Entity\Airline $airline null)
  177.     {
  178.         $this->airline $airline;
  179.         return $this;
  180.     }
  181.     /**
  182.      * Get airline.
  183.      *
  184.      * @return \Aviatur\FlightBundle\Entity\Airline
  185.      */
  186.     public function getAirline()
  187.     {
  188.         return $this->airline;
  189.     }
  190.     /**
  191.      * Set searchCities.
  192.      *
  193.      * @param \Aviatur\SearchBundle\Entity\SearchCities $searchCities
  194.      *
  195.      * @return SpecialDiscount
  196.      */
  197.     public function setSearchCities(\Aviatur\SearchBundle\Entity\SearchCities $searchCities null)
  198.     {
  199.         $this->searchCities $searchCities;
  200.         return $this;
  201.     }
  202.     /**
  203.      * Get searchCities.
  204.      *
  205.      * @return \Aviatur\SearchBundle\Entity\SearchCities
  206.      */
  207.     public function getSearchCities()
  208.     {
  209.         return $this->searchCities;
  210.     }
  211.     /**
  212.      * Add specialDiscountReservation.
  213.      *
  214.      * @return SpecialDiscount
  215.      */
  216.     public function addSpecialDiscountReservation(\Aviatur\FlightBundle\Entity\SpecialDiscountReservation $specialDiscountReservation)
  217.     {
  218.         $this->specialDiscountReservation[] = $specialDiscountReservation;
  219.         return $this;
  220.     }
  221.     /**
  222.      * Remove specialDiscountReservation.
  223.      */
  224.     public function removeSpecialDiscountReservation(\Aviatur\FlightBundle\Entity\SpecialDiscountReservation $specialDiscountReservation)
  225.     {
  226.         $this->specialDiscountReservation->removeElement($specialDiscountReservation);
  227.     }
  228.     /**
  229.      * Get specialDiscountReservation.
  230.      *
  231.      * @return \Doctrine\Common\Collections\Collection
  232.      */
  233.     public function getSpecialDiscountReservation()
  234.     {
  235.         return $this->specialDiscountReservation;
  236.     }
  237.     /**
  238.      * Set agency.
  239.      *
  240.      * @param \Aviatur\AgencyBundle\Entity\Agency $agency
  241.      *
  242.      * @return SpecialDiscount
  243.      */
  244.     public function setAgency(\Aviatur\AgencyBundle\Entity\Agency $agency null)
  245.     {
  246.         $this->agency $agency;
  247.         return $this;
  248.     }
  249.     /**
  250.      * Get agency.
  251.      *
  252.      * @return \Aviatur\AgencyBundle\Entity\Agency
  253.      */
  254.     public function getAgency()
  255.     {
  256.         return $this->agency;
  257.     }
  258.     /**
  259.      * Set discounttype.
  260.      *
  261.      * @param int $discounttype
  262.      *
  263.      * @return SpecialDiscount
  264.      */
  265.     public function setDiscounttype($discounttype)
  266.     {
  267.         $this->discounttype $discounttype;
  268.         return $this;
  269.     }
  270.     /**
  271.      * Get discounttype.
  272.      *
  273.      * @return int
  274.      */
  275.     public function getDiscounttype()
  276.     {
  277.         return $this->discounttype;
  278.     }
  279.     /**
  280.      * Set discountamount.
  281.      *
  282.      * @param float $discountamount
  283.      *
  284.      * @return SpecialDiscount
  285.      */
  286.     public function setDiscountamount($discountamount)
  287.     {
  288.         $this->discountamount $discountamount;
  289.         return $this;
  290.     }
  291.     /**
  292.      * Get discountamount.
  293.      *
  294.      * @return float
  295.      */
  296.     public function getDiscountamount()
  297.     {
  298.         return $this->discountamount;
  299.     }
  300.     /**
  301.      * Set discountdatestart.
  302.      *
  303.      * @param \DateTime $discountdatestart
  304.      *
  305.      * @return SpecialDiscount
  306.      */
  307.     public function setDiscountdatestart($discountdatestart)
  308.     {
  309.         $this->discountdatestart $discountdatestart;
  310.         return $this;
  311.     }
  312.     /**
  313.      * Get discountdatestart.
  314.      *
  315.      * @return \DateTime
  316.      */
  317.     public function getDiscountdatestart()
  318.     {
  319.         return $this->discountdatestart;
  320.     }
  321.     /**
  322.      * Set discountdateend.
  323.      *
  324.      * @param \DateTime $discountdateend
  325.      *
  326.      * @return SpecialDiscount
  327.      */
  328.     public function setDiscountdateend($discountdateend)
  329.     {
  330.         $this->discountdateend $discountdateend;
  331.         return $this;
  332.     }
  333.     /**
  334.      * Get discountdateend.
  335.      *
  336.      * @return \DateTime
  337.      */
  338.     public function getDiscountdateend()
  339.     {
  340.         return $this->discountdateend;
  341.     }
  342.     /**
  343.      * Set flightdatestart.
  344.      *
  345.      * @param \DateTime $flightdatestart
  346.      *
  347.      * @return SpecialDiscount
  348.      */
  349.     public function setFlightdatestart($flightdatestart)
  350.     {
  351.         $this->flightdatestart $flightdatestart;
  352.         return $this;
  353.     }
  354.     /**
  355.      * Get flightdatestart.
  356.      *
  357.      * @return \DateTime
  358.      */
  359.     public function getFlightdatestart()
  360.     {
  361.         return $this->flightdatestart;
  362.     }
  363.     /**
  364.      * Set flightdateend.
  365.      *
  366.      * @param \DateTime $flightdateend
  367.      *
  368.      * @return SpecialDiscount
  369.      */
  370.     public function setFlightdateend($flightdateend)
  371.     {
  372.         $this->flightdateend $flightdateend;
  373.         return $this;
  374.     }
  375.     /**
  376.      * Get flightdateend.
  377.      *
  378.      * @return \DateTime
  379.      */
  380.     public function getFlightdateend()
  381.     {
  382.         return $this->flightdateend;
  383.     }
  384.     /**
  385.      * Set tourcode.
  386.      *
  387.      * @param string $tourcode
  388.      *
  389.      * @return SpecialDiscount
  390.      */
  391.     public function setTourcode($tourcode)
  392.     {
  393.         $this->tourcode $tourcode;
  394.         return $this;
  395.     }
  396.     /**
  397.      * Get tourcode.
  398.      *
  399.      * @return string
  400.      */
  401.     public function getTourcode()
  402.     {
  403.         return $this->tourcode;
  404.     }
  405.     /**
  406.      * Set fuelcost.
  407.      *
  408.      * @param string $fuelcost
  409.      *
  410.      * @return SpecialDiscount
  411.      */
  412.     public function setFuelcost($fuelcost)
  413.     {
  414.         $this->fuelcost $fuelcost;
  415.         return $this;
  416.     }
  417.     /**
  418.      * Get fuelcost.
  419.      *
  420.      * @return string
  421.      */
  422.     public function getFuelcost()
  423.     {
  424.         return $this->fuelcost;
  425.     }
  426.     /**
  427.      * Set flighttype.
  428.      *
  429.      * @param int $flighttype
  430.      *
  431.      * @return SpecialDiscount
  432.      */
  433.     public function setFlighttype($flighttype)
  434.     {
  435.         $this->flighttype $flighttype;
  436.         return $this;
  437.     }
  438.     /**
  439.      * Get flighttype.
  440.      *
  441.      * @return int
  442.      */
  443.     public function getFlighttype()
  444.     {
  445.         return $this->flighttype;
  446.     }
  447.     /**
  448.      * Set specialconditions.
  449.      *
  450.      * @param string $specialconditions
  451.      *
  452.      * @return SpecialDiscount
  453.      */
  454.     public function setSpecialconditions($specialconditions)
  455.     {
  456.         $this->specialconditions $specialconditions;
  457.         return $this;
  458.     }
  459.     /**
  460.      * Get specialconditions.
  461.      *
  462.      * @return string
  463.      */
  464.     public function getSpecialconditions()
  465.     {
  466.         return $this->specialconditions;
  467.     }
  468.     /**
  469.      * Set countrycodes.
  470.      *
  471.      * @param string $countrycodes
  472.      *
  473.      * @return SpecialDiscount
  474.      */
  475.     public function setCountrycodes($countrycodes)
  476.     {
  477.         $this->countrycodes $countrycodes;
  478.         return $this;
  479.     }
  480.     /**
  481.      * Get countrycodes.
  482.      *
  483.      * @return string
  484.      */
  485.     public function getCountrycodes()
  486.     {
  487.         return $this->countrycodes;
  488.     }
  489.     /**
  490.      * Set providers.
  491.      *
  492.      * @param string $providers
  493.      *
  494.      * @return SpecialDiscount
  495.      */
  496.     public function setProviders($providers)
  497.     {
  498.         $this->providers $providers;
  499.         return $this;
  500.     }
  501.     /**
  502.      * Get providers.
  503.      *
  504.      * @return string
  505.      */
  506.     public function getProviders()
  507.     {
  508.         return $this->providers;
  509.     }
  510.     /**
  511.      * Set isactive.
  512.      *
  513.      * @param bool $isactive
  514.      *
  515.      * @return SpecialDiscount
  516.      */
  517.     public function setIsactive($isactive)
  518.     {
  519.         $this->isactive $isactive;
  520.         return $this;
  521.     }
  522.     /**
  523.      * Get isactive.
  524.      *
  525.      * @return bool
  526.      */
  527.     public function getIsactive()
  528.     {
  529.         return $this->isactive;
  530.     }
  531. }