<?php
namespace App\Entity;
use App\Repository\CountryRepository;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
/**
* @ORM\Entity(repositoryClass=CountryRepository::class)
* @ORM\Table(name="api_geo_country")
*/
class Country
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private ?int $id = null;
/**
* @ORM\Column(type="string", length=100)
*/
private string $name;
/**
* @ORM\Column(type="string", length=2, nullable=false, unique=true)
*/
private ?string $iso2 = null;
/**
* @ORM\Column(type="string", length=3, nullable=false, unique=true)
*/
private ?string $iso3 = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $phoneCode = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $capital = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $currencyCode = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $currencyName = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $currencySymbol = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $region = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $subregion = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $nationality = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $latitude = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $longitude = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $emoji = null;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private ?string $emojiU = null;
/**
* @ORM\Column(type="json")
*/
private array $timezones = [];
/**
* @ORM\Column(type="string", length=50, nullable=false, unique=true)
*/
private ?string $wikiDataId = null;
/**
* @ORM\OneToMany(targetEntity=State::class, mappedBy="country", cascade={"persist", "remove"})
* @ORM\OrderBy({"name" = "ASC"})
*/
private Collection $states;
/**
* @ORM\Column(name="activo", type="integer", nullable=false, options={"comment"="Determina si esta activo 1. Activo 2. Inactivo"})
*/
private int $activo;
/**
* @ORM\OneToMany(targetEntity=Cliente::class, mappedBy="country", orphanRemoval=true)
*/
private $clientes;
public function __construct()
{
$this->states = new ArrayCollection();
$this->clientes = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): string
{
return $this->name;
}
public function getIso2(): ?string
{
return $this->iso2;
}
public function getIso3(): ?string
{
return $this->iso3;
}
public function getPhoneCode(): ?string
{
return $this->phoneCode;
}
public function getWikiDataId(): ?string
{
return $this->wikiDataId;
}
public function getStates(): Collection
{
return $this->states;
}
public function getCapital(): ?string
{
return $this->capital;
}
public function getCurrencyCode(): ?string
{
return $this->currencyCode;
}
public function getCurrencyName(): ?string
{
return $this->currencyName;
}
public function getCurrencySymbol(): ?string
{
return $this->currencySymbol;
}
public function getRegion(): ?string
{
return $this->region;
}
public function getSubregion(): ?string
{
return $this->subregion;
}
public function getNationality(): ?string
{
return $this->nationality;
}
public function getLatitude(): ?string
{
return $this->latitude;
}
public function getLongitude(): ?string
{
return $this->longitude;
}
public function getEmoji(): ?string
{
return $this->emoji;
}
public function getEmojiU(): ?string
{
return $this->emojiU;
}
public function getTimezones(): array
{
return $this->timezones;
}
}