<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Table(name="country")
* @ORM\Entity(repositoryClass="App\Repository\CountryRepository")
*/
class Country
{
/**
* @ORM\Id()
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer", name="id")
*/
private $id;
/**
* @var string
*
* @ORM\Column(type="string", length=5, nullable=true)
*/
private $code;
/**
* @var string
*
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $name;
/**
* @var string
*
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $es_name;
/**
*
* @return string
*/
public function __toString() {
return $this->es_name;
}
public function getId(): ?int
{
return $this->id;
}
public function getCode()
{
return $this->code;
}
public function setCode($code)
{
$this->code = $code;
return $this;
}
public function getName()
{
return $this->name;
}
public function setName($name)
{
$this->name = $name;
return $this;
}
public function getEsName()
{
return $this->es_name;
}
public function setEsName($es_name)
{
$this->es_name = $es_name;
return $this;
}
}