src/Aviatur/SearchBundle/Entity/TravelCountry.php line 15

Open in your IDE?
  1. <?php
  2. namespace Aviatur\SearchBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. /**
  7.  * TravelCountry
  8.  * 
  9.  * @ORM\Entity(repositoryClass="Aviatur\SearchBundle\Entity\TravelCountryRepository")
  10.  * @ORM\Table(name="travel_countries")
  11.  */
  12. class TravelCountry
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="bigint", options={"unsigned": true})
  18.      */
  19.     private int $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=10)
  22.      */
  23.     private string $countryCode;
  24.     /**
  25.      * @ORM\Column(type="string", length=10)
  26.      */
  27.     private string $countryISO3166;
  28.     /**
  29.      * @ORM\Column(type="string", length=100)
  30.      */
  31.     private string $countryName;
  32.     /**
  33.      * @ORM\OneToMany(targetEntity="Aviatur\SearchBundle\Entity\TravelCountry", mappedBy="country", cascade={"remove"})
  34.      */
  35.     private Collection $destinations;
  36.     public function __construct()
  37.     {
  38.         $this->destinations = new ArrayCollection();
  39.     }
  40.     // Getters and Setters
  41.     public function getId(): int { return $this->id; }
  42.     public function getCountryCode(): string { return $this->countryCode; }
  43.     public function setCountryCode(string $countryCode): self $this->countryCode $countryCode; return $this; }
  44.     public function getCountryISO3166(): string { return $this->countryISO3166; }
  45.     public function setCountryISO3166(string $countryISO3166): self $this->countryISO3166 $countryISO3166; return $this; }
  46.     public function getCountryName(): string { return $this->countryName; }
  47.     public function setCountryName(string $countryName): self $this->countryName $countryName; return $this; }
  48.     public function getDestinations(): Collection { return $this->destinations; }
  49. }