src/Entity/Countries.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Countries
  6.  *
  7.  * @ORM\Table(name="countries")
  8.  * @ORM\Entity()
  9.  */
  10. class Countries
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(name="id", type="integer", nullable=false)
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(name="country_code", type="string", length=2, nullable=false)
  24.      */
  25.     private $countryCode '';
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="country_name", type="string", length=100, nullable=false)
  30.      */
  31.     private $countryName '';
  32.     /**
  33.      * @var AbstractPerson ArrayCollection
  34.      * @ORM\OneToMany(targetEntity="Intervenant", mappedBy="country")
  35.      */
  36.     protected $personn1;
  37.     /**
  38.      * @var AbstractPerson ArrayCollection
  39.      * @ORM\OneToMany(targetEntity="Intervenant", mappedBy="nationality")
  40.      */
  41.     protected $personn2;
  42.     public function __toString(): string
  43.     {
  44.         return (string) $this->getCountryName();
  45.     }
  46.     /**
  47.      * @return int
  48.      */
  49.     public function getId(): int
  50.     {
  51.         return $this->id;
  52.     }
  53.     /**
  54.      * @param int $id
  55.      */
  56.     public function setId(int $id): void
  57.     {
  58.         $this->id $id;
  59.     }
  60.     /**
  61.      * @return string
  62.      */
  63.     public function getCountryCode(): string
  64.     {
  65.         return $this->countryCode;
  66.     }
  67.     /**
  68.      * @param string $countryCode
  69.      */
  70.     public function setCountryCode(string $countryCode): void
  71.     {
  72.         $this->countryCode $countryCode;
  73.     }
  74.     /**
  75.      * @return string
  76.      */
  77.     public function getCountryName(): string
  78.     {
  79.         return $this->countryName;
  80.     }
  81.     /**
  82.      * @param string $countryName
  83.      */
  84.     public function setCountryName(string $countryName): void
  85.     {
  86.         $this->countryName $countryName;
  87.     }
  88. }