src/Entity/System/CountryLanguage.php line 18

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: Toni Peral <toniperal.a4b@gmail.com>
  5.  * Date: 13/11/20
  6.  * Time: 7:22
  7.  */
  8. namespace App\Entity\System;
  9. use Doctrine\ORM\Mapping as ORM;
  10. /**
  11.  * @ORM\Entity(repositoryClass="App\Repository\System\CountryLanguageRepository")
  12.  *
  13.  * @ORM\Table(name="ps_country_lang")
  14.  */
  15. class CountryLanguage
  16. {
  17.     /**
  18.      * @ORM\Id()
  19.      *
  20.      * @var Country
  21.      *
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Country", inversedBy="countryLanguages")
  23.      *
  24.      * @ORM\JoinColumn(name="id_country", referencedColumnName="id_country")
  25.      */
  26.     private $country;
  27.     /**
  28.      * @ORM\Id()
  29.      *
  30.      * @var Language
  31.      *
  32.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Language", inversedBy="countryLanguages")
  33.      *
  34.      * @ORM\JoinColumn(name="id_lang", referencedColumnName="id_lang")
  35.      */
  36.     private $language;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(type="string", length=64)
  41.      */
  42.     private $name;
  43.     /**
  44.      * @return Country
  45.      */
  46.     public function getCountry(): Country
  47.     {
  48.         return $this->country;
  49.     }
  50.     /**
  51.      * @param Country $country
  52.      *
  53.      * @return CountryLanguage
  54.      */
  55.     public function setCountry(Country $country): CountryLanguage
  56.     {
  57.         $this->country $country;
  58.         return $this;
  59.     }
  60.     /**
  61.      * @return Language
  62.      */
  63.     public function getLanguage(): Language
  64.     {
  65.         return $this->language;
  66.     }
  67.     /**
  68.      * @param Language $language
  69.      *
  70.      * @return CountryLanguage
  71.      */
  72.     public function setLanguage(Language $language): CountryLanguage
  73.     {
  74.         $this->language $language;
  75.         return $this;
  76.     }
  77.     /**
  78.      * @return string
  79.      */
  80.     public function getName(): string
  81.     {
  82.         return $this->name;
  83.     }
  84.     /**
  85.      * @param string $name
  86.      *
  87.      * @return CountryLanguage
  88.      */
  89.     public function setName(string $name): CountryLanguage
  90.     {
  91.         $this->name $name;
  92.         return $this;
  93.     }
  94. }