<?php
namespace App\Entity\Ranking;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* RankingSystem
*
* @ORM\Table(name="tam_ranking_system")
* @ORM\Entity(repositoryClass="App\Repository\Ranking\RankingSystemRepository")
*/
class RankingSystem
{
/**
* @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 integer
*
* @ORM\Column(name="indice", type="integer", options={"default": 0})
*/
private $indice;
/**
* @var integer
*
* @ORM\Column(name="old_id", type="integer", options={"default": 0})
*/
private $oldId;
/**
* @var ArrayCollection
*
* @ORM\OneToMany(targetEntity="\App\Entity\Country", mappedBy="rankingSystem", cascade={"persist"}, orphanRemoval=true)
* @ORM\OrderBy({"label" = "ASC"})
*/
private $countries;
/**
* @var ArrayCollection
*
* @ORM\OneToMany(targetEntity="\App\Entity\Ranking\Ranking", mappedBy="rankingSystem", cascade={"persist"}, orphanRemoval=true)
* @ORM\OrderBy({"indice" = "ASC"})
*/
private $rankings;
/**
* @var ArrayCollection
*
* @ORM\OneToMany(targetEntity="\App\Entity\Player\Player", mappedBy="rankingSystem", cascade={"persist"}, orphanRemoval=true)
*/
private $rankingPlayers;
public function __construct()
{
$this->countries = new ArrayCollection();
$this->rankings = new ArrayCollection();
$this->rankingPlayers = new ArrayCollection();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return RankingSystem
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set indice
*
* @param integer $indice
*
* @return RankingSystem
*/
public function setIndice($indice)
{
$this->indice = $indice;
return $this;
}
/**
* Get indice
*
* @return integer
*/
public function getIndice()
{
return $this->indice;
}
/**
* Set oldId
*
* @param integer $oldId
*
* @return RankingSystem
*/
public function setOldId($oldId)
{
$this->oldId = $oldId;
return $this;
}
/**
* Get oldId
*
* @return integer
*/
public function getOldId()
{
return $this->oldId;
}
/**
* Get countries
*
* @return ArrayCollection
*/
public function getCountries()
{
return $this->countries;
}
/**
* Add country
*
* @param \App\Entity\Country $country
*
* @return RankingSystem
*/
public function addCountry(\App\Entity\Country $country)
{
$country->setRankingSystem($this);
$this->countries[] = $country;
return $this;
}
/**
* Remove country
*
* @param \App\Entity\Country $country
*/
public function removeCountry(\App\Entity\Country $country)
{
$this->countries->removeElement($country);
}
/**
* Get rankings
*
* @return ArrayCollection
*/
public function getRankings()
{
return $this->rankings;
}
/**
* Add ranking
*
* @param \App\Entity\Ranking\Ranking $ranking
*
* @return RankingSystem
*/
public function addRanking(\App\Entity\Ranking\Ranking $ranking)
{
$ranking->setRankingSystem($this);
$this->rankings[] = $country;
return $this;
}
/**
* Remove ranking
*
* @param \App\Entity\Ranking\Ranking $ranking
*/
public function removeRanking(\App\Entity\Ranking\Ranking $ranking)
{
$this->rankings->removeElement($ranking);
}
/**
* Add rankingPlayer
*
* @param \App\Entity\Player\Player $player
*
* @return RankingSystem
*/
public function addRankingPlayer(\App\Entity\Player\Player $player)
{
$user->setRankingSystem($this);
$this->rankingPlayers[] = $user;
return $this;
}
/**
* Remove rankingPlayer
*
* @param \App\Entity\Player\Player $player
*/
public function removeRankingPlayer(\App\Entity\Player\Player $player)
{
$this->rankingPlayers->removeElement($player);
}
/**
* Get rankingPlayers
*
* @return ArrayCollection
*/
public function getRankingPlayers()
{
return $this->rankingPlayers;
}
}