<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* Country
*
* @ORM\Table(name="tam_country")
* @ORM\Entity(repositoryClass="App\Repository\CountryRepository")
*/
class Country
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="label", type="string", length=255, nullable=true)
*/
private $label;
/**
* @var string
*
* @ORM\Column(name="code", type="string", length=255, nullable=false)
*/
private $code;
/**
* @var \App\Entity\Ranking\RankingSystem
*
* @ORM\ManyToOne(targetEntity="\App\Entity\Ranking\RankingSystem", fetch="EAGER", inversedBy="countries")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="ranking_system", referencedColumnName="id", onDelete="SET NULL")
* })
*/
private $rankingSystem;
/**
* @var float
*
* @ORM\Column(name="exchange_rate", type="float", precision=10, scale=0, nullable=true)
*/
private $exchangeRate;
/**
* @var boolean
*
* @ORM\Column(name="taxe", type="boolean", options={"default": FALSE})
*/
private $taxe;
/**
* @var float
*
* @ORM\Column(name="taxe_rate", type="float", precision=10, scale=0, nullable=true)
*/
private $taxeRate;
/**
* @var string
*
* @ORM\Column(name="currency", type="string", length=255, nullable=true)
*/
private $currency;
/**
* @var string
*
* @ORM\Column(name="currency_html_code", type="string", length=255, nullable=true)
*/
private $currencyHtmlCode;
/**
* @var integer
*
* @ORM\Column(name="old_id", type="integer", options={"default": 0}, nullable=true)
*/
private $oldId;
public function __construct()
{
$this->taxe = false;
$this->rankingUsers = new ArrayCollection();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Country
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set code
*
* @param string $code
*
* @return Country
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set rankingSystem
*
* @param \App\Entity\Ranking\RankingSystem $rankingSystem
*
* @return Country
*/
public function setRankingSystem($rankingSystem)
{
$this->rankingSystem = $rankingSystem;
return $this;
}
/**
* Get rankingSystem
*
* @return \RankingSystem
*/
public function getRankingSystem()
{
return $this->rankingSystem;
}
/**
* Set exchangeRate
*
* @param float $exchangeRate
*
* @return Country
*/
public function setExchangeRate($exchangeRate)
{
if($exchangeRate == "")
$this->exchangeRate = null;
else
$this->exchangeRate = str_replace(",", ".", $exchangeRate);
return $this;
}
/**
* Get exchangeRate
*
* @return float
*/
public function getExchangeRate()
{
return $this->exchangeRate;
}
/**
* Set taxe
*
* @param boolean $taxe
*
* @return Country
*/
public function setTaxe($taxe)
{
$this->taxe = $taxe;
return $this;
}
/**
* Get taxe
*
* @return boolean
*/
public function getTaxe()
{
return $this->taxe;
}
/**
* Set taxeRate
*
* @param float $taxeRate
*
* @return Country
*/
public function setTaxeRate($taxeRate)
{
if($taxeRate == "")
$this->taxeRate = null;
else
$this->taxeRate = str_replace(",", ".", $taxeRate);
return $this;
}
/**
* Get taxeRate
*
* @return float
*/
public function getTaxeRate()
{
return $this->taxeRate;
}
/**
* Set currency
*
* @param string $currency
*
* @return Country
*/
public function setCurrency($currency)
{
$this->currency = $currency;
return $this;
}
/**
* Get currency
*
* @return string
*/
public function getCurrency()
{
return $this->currency;
}
/**
* Set currencyHtmlCode
*
* @param string $currencyHtmlCode
*
* @return Country
*/
public function setCurrencyHtmlCode($currencyHtmlCode)
{
$this->currencyHtmlCode = $currencyHtmlCode;
return $this;
}
/**
* Get currencyHtmlCode
*
* @return string
*/
public function getCurrencyHtmlCode()
{
return $this->currencyHtmlCode;
}
/**
* Set oldId
*
* @param integer $oldId
*
* @return Country
*/
public function setOldId($oldId)
{
$this->oldId = $oldId;
return $this;
}
/**
* Get oldId
*
* @return integer
*/
public function getOldId()
{
return $this->oldId;
}
}