<?php
namespace App\Entity\Tam;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* TamType
*
* @ORM\Table(name="tam_tam_type")
* @ORM\Entity(repositoryClass="App\Repository\Tam\TamTypeRepository")
*/
class TamType
{
/**
* @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_translate", type="string", length=255, nullable=false)
*/
private $codeTranslate;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
/**
* @var string
*
* @ORM\Column(name="description_code_translate", type="string", length=255, nullable=false)
*/
private $descriptionCodeTranslate;
/**
* @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\Tam\Tam", mappedBy="tamType", cascade={"persist"}, orphanRemoval=true)
*/
private $tams;
public function __construct()
{
$this->tams = new ArrayCollection();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return RequestType
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set codeTranslate
*
* @param string $codeTranslate
*
* @return RequestType
*/
public function setCodeTranslate($codeTranslate)
{
$this->codeTranslate = $codeTranslate;
return $this;
}
/**
* Get codeTranslate
*
* @return string
*/
public function getCodeTranslate()
{
return $this->codeTranslate;
}
/**
* Set description
*
* @param string $description
*
* @return RequestType
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set descriptionCodeTranslate
*
* @param string $descriptionCodeTranslate
*
* @return RequestType
*/
public function setDescriptionCodeTranslate($descriptionCodeTranslate)
{
$this->descriptionCodeTranslate = $descriptionCodeTranslate;
return $this;
}
/**
* Get descriptionCodeTranslate
*
* @return string
*/
public function getDescriptionCodeTranslate()
{
return $this->descriptionCodeTranslate;
}
/**
* Set indice
*
* @param integer $indice
*
* @return RequestType
*/
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 RequestType
*/
public function setOldId($oldId)
{
$this->oldId = $oldId;
return $this;
}
/**
* Get oldId
*
* @return integer
*/
public function getOldId()
{
return $this->oldId;
}
/**
* Add tam
*
* @param \App\Entity\Tam\Tam $tam
*
* @return TamType
*/
public function addTam(\App\Entity\Tam\Tam $tam)
{
$this->tams[] = $tam;
return $this;
}
/**
* Remove tam
*
* @param \App\Entity\Tam\Tam $tam
*/
public function removeTam(\App\Entity\Tam\Tam $tam)
{
$this->tams->removeElement($tam);
}
/**
* Get tams
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getTams()
{
return $this->tams;
}
/***********************
* OTHER FUNCTION
***********************/
public function getArrayForJson(){
$array = array();
$array['id'] = $this->getId();
$array['label'] = $this->getLabel();
$array['codeTranslate'] = $this->getCodeTranslate();
return $array;
}
}