<?php
namespace App\Entity\System;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\System\CountryLanguageRepository")
*
* @ORM\Table(
* name="ps_country_lang",
* uniqueConstraints={
*
* @ORM\UniqueConstraint(name="uk_country_language", columns={"id_country", "id_lang"})
* }
* )
*/
class CountryLanguage
{
/**
* @var int
*
* @ORM\GeneratedValue()
*
* @ORM\Column(type="integer")
*
* @ORM\Id
*/
protected $id;
/**
* @var Country
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Country", inversedBy="countryLanguages")
*
* @ORM\JoinColumn(name="id_country", referencedColumnName="id_country", nullable=false)
*/
private $country;
/**
* @var Language
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Language", inversedBy="countryLanguages")
*
* @ORM\JoinColumn(name="id_lang", referencedColumnName="id_lang", nullable=false)
*/
private $language;
/**
* @var string
*
* @ORM\Column(type="string", length=64)
*/
private $name;
/**
* @return Country
*/
public function getCountry(): Country
{
return $this->country;
}
/**
* @param Country $country
*
* @return CountryLanguage
*/
public function setCountry(Country $country): CountryLanguage
{
$this->country = $country;
return $this;
}
/**
* @return Language
*/
public function getLanguage(): Language
{
return $this->language;
}
/**
* @param Language $language
*
* @return CountryLanguage
*/
public function setLanguage(Language $language): CountryLanguage
{
$this->language = $language;
return $this;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*
* @return CountryLanguage
*/
public function setName(string $name): CountryLanguage
{
$this->name = $name;
return $this;
}
}