src/Aviatur/SearchBundle/Entity/SearchCities.php line 13

Open in your IDE?
  1. <?php
  2. namespace Aviatur\SearchBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * SearchCities
  6.  *
  7.  * @ORM\Table(name="search_cities", indexes={@ORM\Index(name="city", columns={"city"}), @ORM\Index(name="iata", columns={"iata"}), @ORM\Index(name="cityIata", columns={"city", "iata"})})
  8.  * @ORM\Entity(repositoryClass="Aviatur\SearchBundle\Entity\SearchCitiesRepository")
  9.  */
  10. class SearchCities {
  11.     /**
  12.      * @var integer
  13.      *
  14.      * @ORM\Column(name="id", type="integer", nullable=false)
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="IDENTITY")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @var string
  21.      *
  22.      * @ORM\Column(name="iata", type="string", length=3, nullable=false)
  23.      */
  24.     private $iata;
  25.     /**
  26.      * @var string
  27.      *
  28.      * @ORM\Column(name="city", type="string", length=50, nullable=false)
  29.      */
  30.     private $city;
  31.     /**
  32.      * @var string
  33.      *
  34.      * @ORM\Column(name="country", type="string", length=50, nullable=false)
  35.      */
  36.     private $country;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(name="countryCode", type="string", length=2, nullable=false)
  41.      */
  42.     private $countrycode;
  43.     
  44.     /**
  45.      * @ORM\Column(name="hasAirport", type="boolean", nullable=false, options={"default"="1"})
  46.      */
  47.     private string $hasairport '1';
  48.     /**
  49.      * @ORM\ManyToOne(targetEntity="Aviatur\SearchBundle\Entity\TravelDestination", inversedBy="destinations")
  50.      * @ORM\JoinColumn(name="travel_destination_id", referencedColumnName="id", onDelete="CASCADE")
  51.      */
  52.     private ?TravelDestination $travelDestination null;
  53.     
  54.     /**
  55.      * @var string
  56.      *
  57.      * @ORM\Column(name="coordinates", type="string", length=255, nullable=false)
  58.      */
  59.     private $coordinates;
  60.     /**
  61.      * @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\SpecialDiscount", mappedBy="searchCities", cascade={"all"})
  62.      */
  63.     private $specialDiscount;
  64.     /**
  65.      * @ORM\OneToMany(targetEntity="Aviatur\SearchBundle\Entity\SearchAirports", mappedBy="searchCities", cascade={"all"})
  66.      */
  67.     private $searchAirports;
  68.     /**
  69.      * @ORM\OneToMany(targetEntity="Aviatur\HotelBundle\Entity\HotelHomologation", mappedBy="searchCities", cascade={"all"})
  70.      */
  71.     private $hotelHomologation;
  72.     
  73.     /**
  74.      * @ORM\OneToMany(targetEntity="Aviatur\HotelBundle\Entity\Markup", mappedBy="searchCities", cascade={"all"})
  75.      */
  76.     private $markup;
  77.     /**
  78.      * Constructor
  79.      */
  80.     public function __construct() {
  81.         $this->specialDiscount = new \Doctrine\Common\Collections\ArrayCollection();
  82.         $this->searchAirports = new \Doctrine\Common\Collections\ArrayCollection();
  83.         $this->hotelHomologation = new \Doctrine\Common\Collections\ArrayCollection();
  84.         $this->markup = new \Doctrine\Common\Collections\ArrayCollection();
  85.     }
  86.     public function __toString() {
  87.         $return "id:"$this->getId();
  88.         return (string) $return;
  89.     }
  90.     /**
  91.      * Get id
  92.      *
  93.      * @return integer 
  94.      */
  95.     public function getId() {
  96.         return $this->id;
  97.     }
  98.     /**
  99.      * Set iata
  100.      *
  101.      * @param string $iata
  102.      * @return SearchCities
  103.      */
  104.     public function setIata($iata) {
  105.         $this->iata $iata;
  106.         return $this;
  107.     }
  108.     /**
  109.      * Get iata
  110.      *
  111.      * @return string 
  112.      */
  113.     public function getIata() {
  114.         return $this->iata;
  115.     }
  116.     /**
  117.      * Set city
  118.      *
  119.      * @param string $city
  120.      * @return SearchCities
  121.      */
  122.     public function setCity($city) {
  123.         $this->city $city;
  124.         return $this;
  125.     }
  126.     /**
  127.      * Get city
  128.      *
  129.      * @return string 
  130.      */
  131.     public function getCity() {
  132.         return $this->city;
  133.     }
  134.     /**
  135.      * Set country
  136.      *
  137.      * @param string $country
  138.      * @return SearchCities
  139.      */
  140.     public function setCountry($country) {
  141.         $this->country $country;
  142.         return $this;
  143.     }
  144.     /**
  145.      * Get country
  146.      *
  147.      * @return string 
  148.      */
  149.     public function getCountry() {
  150.         return $this->country;
  151.     }
  152.     /**
  153.      * Set countrycode
  154.      *
  155.      * @param string $countrycode
  156.      * @return SearchCities
  157.      */
  158.     public function setCountrycode($countrycode) {
  159.         $this->countrycode $countrycode;
  160.         return $this;
  161.     }
  162.     /**
  163.      * Get countrycode
  164.      *
  165.      * @return string 
  166.      */
  167.     public function getCountrycode() {
  168.         return $this->countrycode;
  169.     }     
  170.     
  171.     /**
  172.      * Set hasairport
  173.      *
  174.      * @param boolean $hasairport
  175.      * @return SearchCities
  176.      */
  177.     public function setHasairport($hasairport) {
  178.         $this->hasairport $hasairport;
  179.         return $this;
  180.     }
  181.     /**
  182.      * Get 
  183.      *
  184.      * @return boolean 
  185.      */
  186.     public function getHasairport() {
  187.         return $this->hasairport;
  188.     }
  189.             
  190.     /**
  191.      * Set coordinates
  192.      *
  193.      * @param string $coordinates
  194.      * @return SearchCities
  195.      */
  196.     public function setCoordinates($coordinates) {
  197.         $this->coordinates $coordinates;
  198.         return $this;
  199.     }
  200.     /**
  201.      * Get coordinates
  202.      *
  203.      * @return string 
  204.      */
  205.     public function getCoordinates() {
  206.         return $this->coordinates;
  207.     }
  208.     /**
  209.      * Add specialDiscount
  210.      *
  211.      * @param \Aviatur\FlightBundle\Entity\SpecialDiscount $specialDiscount
  212.      * @return SearchCities
  213.      */
  214.     public function addSpecialDiscount(\Aviatur\FlightBundle\Entity\SpecialDiscount $specialDiscount) {
  215.         $this->specialDiscount[] = $specialDiscount;
  216.         return $this;
  217.     }
  218.     /**
  219.      * Remove specialDiscount
  220.      *
  221.      * @param \Aviatur\FlightBundle\Entity\SpecialDiscount $specialDiscount
  222.      */
  223.     public function removeSpecialDiscount(\Aviatur\FlightBundle\Entity\SpecialDiscount $specialDiscount) {
  224.         $this->specialDiscount->removeElement($specialDiscount);
  225.     }
  226.     /**
  227.      * Get specialDiscount
  228.      *
  229.      * @return \Doctrine\Common\Collections\Collection 
  230.      */
  231.     public function getSpecialDiscount() {
  232.         return $this->specialDiscount;
  233.     }
  234.     /**
  235.      * Add searchAirports
  236.      *
  237.      * @param \Aviatur\SearchBundle\Entity\SearchAirports $searchAirports
  238.      * @return SearchCities
  239.      */
  240.     public function addSearchAirports(\Aviatur\SearchBundle\Entity\SearchAirports $searchAirports) {
  241.         $this->searchAirports[] = $searchAirports;
  242.         return $this;
  243.     }
  244.     /**
  245.      * Remove searchAirports
  246.      *
  247.      * @param \Aviatur\SearchBundle\Entity\SearchAirports $searchAirports
  248.      */
  249.     public function removeSearchAirports(\Aviatur\SearchBundle\Entity\SearchAirports $searchAirports) {
  250.         $this->searchAirports->removeElement($searchAirports);
  251.     }
  252.     /**
  253.      * Get searchAirports
  254.      *
  255.      * @return \Doctrine\Common\Collections\Collection 
  256.      */
  257.     public function getSearchAirports() {
  258.         return $this->searchAirports;
  259.     }
  260.     public function getTravelDestination(): ?TravelDestination
  261.     {
  262.         return $this->travelDestination;
  263.     }
  264.     public function setTravelDestination(?TravelDestination $destination): self
  265.     {
  266.         $this->travelDestination $destination;
  267.         return $this;
  268.     }
  269.     /**
  270.      * Add hotelHomologation
  271.      *
  272.      * @param \Aviatur\HotelBundle\Entity\HotelHomologation $hotelHomologation
  273.      * @return SearchCities
  274.      */
  275.     public function addHotelHomologation(\Aviatur\HotelBundle\Entity\HotelHomologation $hotelHomologation) {
  276.         $this->hotelHomologation[] = $hotelHomologation;
  277.         return $this;
  278.     }
  279.     /**
  280.      * Remove hotelHomologation
  281.      *
  282.      * @param \Aviatur\HotelBundle\Entity\HotelHomologation $hotelHomologation
  283.      */
  284.     public function removeHotelHomologation(\Aviatur\HotelBundle\Entity\HotelHomologation $hotelHomologation) {
  285.         $this->hotelHomologation->removeElement($hotelHomologation);
  286.     }
  287.     /**
  288.      * Get hotelHomologation
  289.      *
  290.      * @return \Doctrine\Common\Collections\Collection 
  291.      */
  292.     public function getHotelHomologation() {
  293.         return $this->hotelHomologation;
  294.     }
  295.         /**
  296.      * Add markup
  297.      *
  298.      * @param \Aviatur\HotelBundle\Entity\Markup $markup
  299.      * @return City
  300.      */
  301.     public function addMarkup(\Aviatur\HotelBundle\Entity\Markup $markup) {
  302.         $this->markup[] = $markup;
  303.         return $this;
  304.     }
  305.     /**
  306.      * Remove markup
  307.      *
  308.      * @param \Aviatur\HotelBundle\Entity\Markup $markup
  309.      */
  310.     public function removeMarkup(\Aviatur\HotelBundle\Entity\Markup $markup) {
  311.         $this->markup->removeElement($markup);
  312.     }
  313.     /**
  314.      * Get markup
  315.      *
  316.      * @return \Doctrine\Common\Collections\Collection 
  317.      */
  318.     public function getMarkup() {
  319.         return $this->markup;
  320.     }
  321.     
  322. }