src/Entity/JogosRegras.php line 12
<?phpnamespace App\Entity;use App\Repository\JogosRegrasRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: JogosRegrasRepository::class)]class JogosRegras{const TP_REGRAS = ['Ajuda' => 'ajuda','Método' => 'metodo',];#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $nome = null;#[ORM\Column]private ?bool $ativo = null;#[ORM\OneToMany(mappedBy: 'JogosRegras', targetEntity: JogosParametros::class)]private Collection $JogosParametros;#[ORM\Column(length: 255)]private ?string $parametro = null;#[ORM\Column(length: 3, nullable: true)]private ?string $acao = null;#[ORM\Column(length: 10)]private ?string $tpRegra = null;public function __construct(){$this->JogosParametros = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getNome(): ?string{return $this->nome;}public function setNome(string $nome): self{$this->nome = $nome;return $this;}public function isAtivo(): ?bool{return $this->ativo;}public function setAtivo(bool $ativo): self{$this->ativo = $ativo;return $this;}/*** @return Collection<int, JogosParametros>*/public function getJogosParametros(): Collection{return $this->JogosParametros;}public function addJogosParametro(JogosParametros $jogosParametro): self{if (!$this->JogosParametros->contains($jogosParametro)) {$this->JogosParametros->add($jogosParametro);$jogosParametro->setJogosRegras($this);}return $this;}public function removeJogosParametro(JogosParametros $jogosParametro): self{if ($this->JogosParametros->removeElement($jogosParametro)) {// set the owning side to null (unless already changed)if ($jogosParametro->getJogosRegras() === $this) {$jogosParametro->setJogosRegras(null);}}return $this;}public function getParametro(): ?string{return $this->parametro;}public function setParametro(string $parametro): self{$this->parametro = $parametro;return $this;}public function getAcao(): ?string{return $this->acao;}public function setAcao(?string $acao): self{$this->acao = $acao;return $this;}public function getTpRegra(): ?string{return $this->tpRegra;}public function setTpRegra(string $tpRegra): static{$this->tpRegra = $tpRegra;return $this;}public function getTpRegraDesc(): ?string{$r = '';foreach(JogosRegras::TP_REGRAS as $key => $label){if($label == $this->tpRegra){$r = $key;}}return $r;}}