src/Entity/Country.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. /**
  6.  * Country
  7.  *
  8.  * @ORM\Table(name="tam_country")
  9.  * @ORM\Entity(repositoryClass="App\Repository\CountryRepository")
  10.  */
  11. class Country
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="label", type="string", length=255, nullable=true)
  26.      */
  27.     private $label;
  28.     
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="code", type="string", length=255, nullable=false)
  33.      */
  34.     private $code;
  35.     
  36.     /**
  37.      * @var \App\Entity\Ranking\RankingSystem
  38.      *
  39.      * @ORM\ManyToOne(targetEntity="\App\Entity\Ranking\RankingSystem", fetch="EAGER", inversedBy="countries")
  40.      * @ORM\JoinColumns({
  41.      *   @ORM\JoinColumn(name="ranking_system", referencedColumnName="id", onDelete="SET NULL")
  42.      * })
  43.      */
  44.     private $rankingSystem;
  45.     
  46.     
  47.     /**
  48.      * @var float
  49.      *
  50.      * @ORM\Column(name="exchange_rate", type="float", precision=10, scale=0, nullable=true)
  51.      */
  52.     private $exchangeRate;
  53.     
  54.     /**
  55.      * @var boolean
  56.      *
  57.      * @ORM\Column(name="taxe", type="boolean", options={"default": FALSE})
  58.      */
  59.     private $taxe;
  60.     
  61.     /**
  62.      * @var float
  63.      *
  64.      * @ORM\Column(name="taxe_rate", type="float", precision=10, scale=0, nullable=true)
  65.      */
  66.     private $taxeRate;
  67.     
  68.     /**
  69.      * @var string
  70.      *
  71.      * @ORM\Column(name="currency", type="string", length=255, nullable=true)
  72.      */
  73.     private $currency;
  74.     
  75.     /**
  76.      * @var string
  77.      *
  78.      * @ORM\Column(name="currency_html_code", type="string", length=255, nullable=true)
  79.      */
  80.     private $currencyHtmlCode;
  81.     
  82.     
  83.     /**
  84.      * @var integer
  85.      *
  86.      * @ORM\Column(name="old_id", type="integer", options={"default": 0}, nullable=true)
  87.      */
  88.     private $oldId;
  89.     
  90.     public function __construct()
  91.     {
  92.         $this->taxe false;
  93.         $this->rankingUsers = new ArrayCollection();
  94.     }
  95.     /**
  96.      * Get id
  97.      *
  98.      * @return int
  99.      */
  100.     public function getId()
  101.     {
  102.         return $this->id;
  103.     }
  104.     
  105.     /**
  106.      * Set label
  107.      *
  108.      * @param string $label
  109.      *
  110.      * @return Country
  111.      */
  112.     public function setLabel($label)
  113.     {
  114.         $this->label $label;
  115.         return $this;
  116.     }
  117.     /**
  118.      * Get label
  119.      *
  120.      * @return string
  121.      */
  122.     public function getLabel()
  123.     {
  124.         return $this->label;
  125.     }
  126.     
  127.     /**
  128.      * Set code
  129.      *
  130.      * @param string $code
  131.      *
  132.      * @return Country
  133.      */
  134.     public function setCode($code)
  135.     {
  136.         $this->code $code;
  137.         return $this;
  138.     }
  139.     /**
  140.      * Get code
  141.      *
  142.      * @return string
  143.      */
  144.     public function getCode()
  145.     {
  146.         return $this->code;
  147.     }
  148.     
  149.     /**
  150.      * Set rankingSystem
  151.      *
  152.      * @param \App\Entity\Ranking\RankingSystem $rankingSystem
  153.      *
  154.      * @return Country
  155.      */
  156.     public function setRankingSystem($rankingSystem)
  157.     {
  158.         $this->rankingSystem $rankingSystem;
  159.         return $this;
  160.     }
  161.     /**
  162.      * Get rankingSystem
  163.      *
  164.      * @return \RankingSystem
  165.      */
  166.     public function getRankingSystem()
  167.     {
  168.         return $this->rankingSystem;
  169.     }
  170.     
  171.     
  172.     /**
  173.      * Set exchangeRate
  174.      *
  175.      * @param float $exchangeRate
  176.      *
  177.      * @return Country
  178.      */
  179.     public function setExchangeRate($exchangeRate)
  180.     {
  181.         if($exchangeRate == "")
  182.             $this->exchangeRate null;
  183.         else
  184.             $this->exchangeRate str_replace(",""."$exchangeRate);
  185.         return $this;
  186.     }
  187.     /**
  188.      * Get exchangeRate
  189.      *
  190.      * @return float
  191.      */
  192.     public function getExchangeRate()
  193.     {
  194.         return $this->exchangeRate;
  195.     }
  196.     
  197.     /**
  198.      * Set taxe
  199.      *
  200.      * @param boolean $taxe
  201.      *
  202.      * @return Country
  203.      */
  204.     public function setTaxe($taxe)
  205.     {
  206.         $this->taxe $taxe;
  207.         return $this;
  208.     }
  209.     /**
  210.      * Get taxe
  211.      *
  212.      * @return boolean
  213.      */
  214.     public function getTaxe()
  215.     {
  216.         return $this->taxe;
  217.     }
  218.     
  219.     /**
  220.      * Set taxeRate
  221.      *
  222.      * @param float $taxeRate
  223.      *
  224.      * @return Country
  225.      */
  226.     public function setTaxeRate($taxeRate)
  227.     {
  228.         if($taxeRate == "")
  229.             $this->taxeRate null;
  230.         else
  231.             $this->taxeRate str_replace(",""."$taxeRate);
  232.         return $this;
  233.     }
  234.     /**
  235.      * Get taxeRate
  236.      *
  237.      * @return float
  238.      */
  239.     public function getTaxeRate()
  240.     {
  241.         return $this->taxeRate;
  242.     }
  243.     
  244.     /**
  245.      * Set currency
  246.      *
  247.      * @param string $currency
  248.      *
  249.      * @return Country
  250.      */
  251.     public function setCurrency($currency)
  252.     {
  253.         $this->currency $currency;
  254.         return $this;
  255.     }
  256.     /**
  257.      * Get currency
  258.      *
  259.      * @return string
  260.      */
  261.     public function getCurrency()
  262.     {
  263.         return $this->currency;
  264.     }
  265.     
  266.     /**
  267.      * Set currencyHtmlCode
  268.      *
  269.      * @param string $currencyHtmlCode
  270.      *
  271.      * @return Country
  272.      */
  273.     public function setCurrencyHtmlCode($currencyHtmlCode)
  274.     {
  275.         $this->currencyHtmlCode $currencyHtmlCode;
  276.         return $this;
  277.     }
  278.     /**
  279.      * Get currencyHtmlCode
  280.      *
  281.      * @return string
  282.      */
  283.     public function getCurrencyHtmlCode()
  284.     {
  285.         return $this->currencyHtmlCode;
  286.     }
  287.     
  288.     /**
  289.      * Set oldId
  290.      *
  291.      * @param integer $oldId
  292.      *
  293.      * @return Country
  294.      */
  295.     public function setOldId($oldId)
  296.     {
  297.         $this->oldId $oldId;
  298.         return $this;
  299.     }
  300.     /**
  301.      * Get oldId
  302.      *
  303.      * @return integer
  304.      */
  305.     public function getOldId()
  306.     {
  307.         return $this->oldId;
  308.     }
  309.     
  310.     
  311. }