src/Entity/Country.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * @ORM\Table(name="country")
  7.  * @ORM\Entity(repositoryClass="App\Repository\CountryRepository")
  8.  */
  9. class Country
  10. {
  11.    /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue(strategy="AUTO")
  14.      * @ORM\Column(type="integer", name="id")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @var string
  19.      *
  20.      * @ORM\Column(type="string", length=5, nullable=true)
  21.      */
  22.     private $code;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Column(type="string", length=50, nullable=true)
  27.      */
  28.     private $name;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(type="string", length=50, nullable=true)
  33.      */
  34.     private $es_name;
  35.     /**
  36.      * 
  37.      * @return string
  38.      */
  39.     public function __toString() {
  40.         return $this->es_name;
  41.     }
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getCode()
  47.     {
  48.         return $this->code;
  49.     }
  50.     public function setCode($code)
  51.     {
  52.         $this->code $code;
  53.         return $this;
  54.     }
  55.     public function getName()
  56.     {
  57.         return $this->name;
  58.     }
  59.     public function setName($name)
  60.     {
  61.         $this->name $name;
  62.         return $this;
  63.     }
  64.     public function getEsName()
  65.     {
  66.         return $this->es_name;
  67.     }
  68.     public function setEsName($es_name)
  69.     {
  70.         $this->es_name $es_name;
  71.         return $this;
  72.     }
  73. }