<?php
namespace Aviatur\SearchBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
/**
* TravelCountry
*
* @ORM\Entity(repositoryClass="Aviatur\SearchBundle\Entity\TravelCountryRepository")
* @ORM\Table(name="travel_countries")
*/
class TravelCountry
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="bigint", options={"unsigned": true})
*/
private int $id;
/**
* @ORM\Column(type="string", length=10)
*/
private string $countryCode;
/**
* @ORM\Column(type="string", length=10)
*/
private string $countryISO3166;
/**
* @ORM\Column(type="string", length=100)
*/
private string $countryName;
/**
* @ORM\OneToMany(targetEntity="Aviatur\SearchBundle\Entity\TravelCountry", mappedBy="country", cascade={"remove"})
*/
private Collection $destinations;
public function __construct()
{
$this->destinations = new ArrayCollection();
}
// Getters and Setters
public function getId(): int { return $this->id; }
public function getCountryCode(): string { return $this->countryCode; }
public function setCountryCode(string $countryCode): self { $this->countryCode = $countryCode; return $this; }
public function getCountryISO3166(): string { return $this->countryISO3166; }
public function setCountryISO3166(string $countryISO3166): self { $this->countryISO3166 = $countryISO3166; return $this; }
public function getCountryName(): string { return $this->countryName; }
public function setCountryName(string $countryName): self { $this->countryName = $countryName; return $this; }
public function getDestinations(): Collection { return $this->destinations; }
}