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

Open in your IDE?
  1. <?php
  2. namespace Aviatur\FlightBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Airline.
  6.  *
  7.  * @ORM\Table(name="airline")
  8.  * @ORM\Entity(repositoryClass="Aviatur\FlightBundle\Entity\AirlineRepository")
  9.  */
  10. class Airline
  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.      * @var string
  22.      *
  23.      * @ORM\Column(name="iata", type="string", length=10, nullable=false)
  24.      */
  25.     private $iata;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="name", type="string", length=100, nullable=false)
  30.      */
  31.     private $name;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(name="countryName", type="string", length=100, nullable=false)
  36.      */
  37.     private $countryname;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="countryCode", type="string", length=10, nullable=false)
  42.      */
  43.     private $countrycode;
  44.     /**
  45.      * @ORM\OneToMany(targetEntity="AdminFee", mappedBy="airline", cascade={"all"})
  46.      */
  47.     private $adminFee;
  48.     /**
  49.      * @ORM\OneToMany(targetEntity="AirlineValidation", mappedBy="airline", cascade={"all"})
  50.      */
  51.     private $airlineValidation;
  52.     /**
  53.      * @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\AirlineOver", mappedBy="airline", cascade={"all"})
  54.      */
  55.     private $airlineOver;
  56.     /**
  57.      * @ORM\OneToMany(targetEntity="Aviatur\GeneralBundle\Entity\PromoSearchAgency", mappedBy="airlineId", cascade={"all"})
  58.      */
  59.     private $promoSearchAgency;
  60.     public function __toString()
  61.     {
  62.         $return $this->getName().'('.$this->getIata().')';
  63.         return $return;
  64.     }
  65.     /**
  66.      * @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\AdminFeeActivityLog", mappedBy="order", cascade={"all"})
  67.      */
  68.     private $adminFeeActivityLog;
  69.     /**
  70.      * Constructor.
  71.      */
  72.     public function __construct()
  73.     {
  74.         $this->adminFee = new \Doctrine\Common\Collections\ArrayCollection();
  75.         $this->airlineValidation = new \Doctrine\Common\Collections\ArrayCollection();
  76.         $this->promoSearchAgency = new \Doctrine\Common\Collections\ArrayCollection();
  77.         $this->airlineOver = new \Doctrine\Common\Collections\ArrayCollection();
  78.         $this->adminFeeActivityLog = new \Doctrine\Common\Collections\ArrayCollection();
  79.     }
  80.     /**
  81.      * Get id.
  82.      *
  83.      * @return int
  84.      */
  85.     public function getId()
  86.     {
  87.         return $this->id;
  88.     }
  89.     /**
  90.      * Set iata.
  91.      *
  92.      * @param string $iata
  93.      *
  94.      * @return Airline
  95.      */
  96.     public function setIata($iata)
  97.     {
  98.         $this->iata $iata;
  99.         return $this;
  100.     }
  101.     /**
  102.      * Get iata.
  103.      *
  104.      * @return string
  105.      */
  106.     public function getIata()
  107.     {
  108.         return $this->iata;
  109.     }
  110.     /**
  111.      * Set name.
  112.      *
  113.      * @param string $name
  114.      *
  115.      * @return Airline
  116.      */
  117.     public function setName($name)
  118.     {
  119.         $this->name $name;
  120.         return $this;
  121.     }
  122.     /**
  123.      * Get name.
  124.      *
  125.      * @return string
  126.      */
  127.     public function getName()
  128.     {
  129.         return $this->name;
  130.     }
  131.     /**
  132.      * Set countryname.
  133.      *
  134.      * @param string $countryname
  135.      *
  136.      * @return Airline
  137.      */
  138.     public function setCountryname($countryname)
  139.     {
  140.         $this->countryname $countryname;
  141.         return $this;
  142.     }
  143.     /**
  144.      * Get countryname.
  145.      *
  146.      * @return string
  147.      */
  148.     public function getCountryname()
  149.     {
  150.         return $this->countryname;
  151.     }
  152.     /**
  153.      * Set countrycode.
  154.      *
  155.      * @param string $countrycode
  156.      *
  157.      * @return Airline
  158.      */
  159.     public function setCountrycode($countrycode)
  160.     {
  161.         $this->countrycode $countrycode;
  162.         return $this;
  163.     }
  164.     /**
  165.      * Get countrycode.
  166.      *
  167.      * @return string
  168.      */
  169.     public function getCountrycode()
  170.     {
  171.         return $this->countrycode;
  172.     }
  173.     /**
  174.      * Add adminFee.
  175.      *
  176.      * @return Airline
  177.      */
  178.     public function addAdminFee(\Aviatur\FlightBundle\Entity\AdminFee $adminFee)
  179.     {
  180.         $this->adminFee[] = $adminFee;
  181.         return $this;
  182.     }
  183.     /**
  184.      * Remove adminFee.
  185.      */
  186.     public function removeAdminFee(\Aviatur\FlightBundle\Entity\AdminFee $adminFee)
  187.     {
  188.         $this->adminFee->removeElement($adminFee);
  189.     }
  190.     /**
  191.      * Get adminFee.
  192.      *
  193.      * @return \Doctrine\Common\Collections\Collection
  194.      */
  195.     public function getAdminFee()
  196.     {
  197.         return $this->adminFee;
  198.     }
  199.     /**
  200.      * Add airlineValidation.
  201.      *
  202.      * @return Airline
  203.      */
  204.     public function addAirlineValidation(\Aviatur\FlightBundle\Entity\AirlineValidation $airlineValidation)
  205.     {
  206.         $this->airlineValidation[] = $airlineValidation;
  207.         return $this;
  208.     }
  209.     /**
  210.      * Remove airlineValidation.
  211.      */
  212.     public function removeAirlineValidation(\Aviatur\FlightBundle\Entity\AirlineValidation $airlineValidation)
  213.     {
  214.         $this->airlineValidation->removeElement($airlineValidation);
  215.     }
  216.     /**
  217.      * Get airlineValidation.
  218.      *
  219.      * @return \Doctrine\Common\Collections\Collection
  220.      */
  221.     public function getAirlineValidation()
  222.     {
  223.         return $this->airlineValidation;
  224.     }
  225.     /**
  226.      * Add promoSearchAgency.
  227.      *
  228.      * @return Airline
  229.      */
  230.     public function addPromoSearchAgency(\Aviatur\GeneralBundle\Entity\PromoSearchAgency $promoSearchAgency)
  231.     {
  232.         $this->promoSearchAgency[] = $promoSearchAgency;
  233.         return $this;
  234.     }
  235.     /**
  236.      * Remove promoSearchAgency.
  237.      */
  238.     public function removePromoSearchAgency(\Aviatur\GeneralBundle\Entity\PromoSearchAgency $promoSearchAgency)
  239.     {
  240.         $this->promoSearchAgency->removeElement($promoSearchAgency);
  241.     }
  242.     /**
  243.      * Get promoSearchAgency.
  244.      *
  245.      * @return \Doctrine\Common\Collections\Collection
  246.      */
  247.     public function getPromoSearchAgency()
  248.     {
  249.         return $this->promoSearchAgency;
  250.     }
  251.     /**
  252.      * Add airlineOver.
  253.      *
  254.      * @return Airline
  255.      */
  256.     public function addAirlineOver(\Aviatur\FlightBundle\Entity\AirlineOver $airlineOver)
  257.     {
  258.         $this->airlineOver[] = $airlineOver;
  259.         return $this;
  260.     }
  261.     /**
  262.      * Remove airlineOver.
  263.      */
  264.     public function removeAirlineOver(\Aviatur\FlightBundle\Entity\AirlineOver $airlineOver)
  265.     {
  266.         $this->airlineOver->removeElement($airlineOver);
  267.     }
  268.     /**
  269.      * Get airlineOver.
  270.      *
  271.      * @return \Doctrine\Common\Collections\Collection
  272.      */
  273.     public function getAirlineOver()
  274.     {
  275.         return $this->airlineOver;
  276.     }
  277.     /**
  278.      * Add adminFeeActivityLog.
  279.      *
  280.      * @return AdminFeeActivityLog
  281.      */
  282.     public function addAdminFeeActivityLog(\Aviatur\FlightBundle\Entity\AdminFeeActivityLog $adminFeeActivityLog)
  283.     {
  284.         $this->adminFeeActivityLog[] = $adminFeeActivityLog;
  285.         return $this;
  286.     }
  287.     /**
  288.      * Remove AdminFeeActivityLog.
  289.      */
  290.     public function removeAdminFeeActivityLog(\Aviatur\FlightBundle\Entity\AdminFeeActivityLog $adminFeeActivityLog)
  291.     {
  292.         $this->adminFeeActivityLog->removeElement($adminFeeActivityLog);
  293.     }
  294.     /**
  295.      * Get AdminFeeActivityLog.
  296.      *
  297.      * @return \Doctrine\Common\Collections\Collection
  298.      */
  299.     public function getAdminFeeActivityLog()
  300.     {
  301.         return $this->adminFeeActivityLog;
  302.     }
  303. }