<?php
namespace App\Entity;
use App\Mask\MarkingCodesMask;
use Doctrine\ORM\Mapping as ORM;
/**
* DnsitTranslateType
*
* @ORM\Table(name="dnsit_translate_type")
* @ORM\Entity(repositoryClass="App\Repository\DnsitTranslateTypeRepository")
*/
class DnsitTranslateType
{
/**
* @var string|null
*
* @ORM\Column(name="type_text_key", type="string", length=255, nullable=true, unique=true)
*/
private $typeTextKey;
/**
* @var string|null
*
* @ORM\Column(name="en_name", type="string", length=255, nullable=true)
*/
private $enName;
/**
* @var string|null
*
* @ORM\Column(name="de_name", type="string", length=255, nullable=true)
*/
private $deName;
/**
* @var string|null
*
* @ORM\Column(name="nl_name", type="string", length=255, nullable=true)
*/
private $nlName;
/**
* @var string|null
*
* @ORM\Column(name="it_name", type="string", length=255, nullable=true)
*/
private $itName;
/**
* @var string|null
*
* @ORM\Column(name="es_name", type="string", length=255, nullable=true)
*/
private $esName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ptName;
/**
* @var int|null
*
* @ORM\Column(name="type_code", type="bigint", nullable=true)
*/
private $typeCode;
/**
* @var int|null
*
* @ORM\Column(name="entity", type="bigint", nullable=true)
*/
private $entity;
/**
* @var int|null
*
* @ORM\Column(name="marking", type="smallint", nullable=true)
*/
private $marking;
/**
* @var string|null
*
* @ORM\Column(name="params", type="text", nullable=true)
*/
private $params;
/**
* @var string|null
*
* @ORM\Column(name="type_tag_key", type="string", length=255, nullable=true, unique=true)
*/
private $typeTagKey;
/**
* @var \DateTime|null
*
* @ORM\Column(name="created_at", type="datetime", nullable=true)
*/
private $createdAt;
/**
* @var int|null
*
* @ORM\Column(name="created_by", type="bigint", nullable=true)
*/
private $createdBy;
/**
* @var \DateTime|null
*
* @ORM\Column(name="updated_at", type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @var int|null
*
* @ORM\Column(name="updated_by", type="bigint", nullable=true)
*/
private $updatedBy;
/**
* @var int
*
* @ORM\Column(name="id", type="bigint")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var \App\Entity\DnsitTranslateCategory
*
* @ORM\ManyToOne(targetEntity="App\Entity\DnsitTranslateCategory")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="category_id", referencedColumnName="id")
* })
*/
private $category;
public function getTypeTextKey(): ?string
{
return $this->typeTextKey;
}
public function setTypeTextKey(?string $typeTextKey): self
{
$this->typeTextKey = $typeTextKey;
return $this;
}
public function getEnName(): ?string
{
return $this->enName;
}
public function setEnName(?string $enName): self
{
$this->enName = $enName;
return $this;
}
public function getDeName(): ?string
{
return $this->deName;
}
public function setDeName(?string $deName): self
{
$this->deName = $deName;
return $this;
}
public function getNlName(): ?string
{
return $this->nlName;
}
public function setNlName(?string $nlName): self
{
$this->nlName = $nlName;
return $this;
}
public function getItName(): ?string
{
return $this->itName;
}
public function setItName(?string $itName): self
{
$this->itName = $itName;
return $this;
}
public function getEsName(): ?string
{
return $this->esName;
}
public function setEsName(?string $esName): self
{
$this->esName = $esName;
return $this;
}
public function getPtName(): ?string
{
return $this->ptName;
}
public function setPtName(?string $ptName): self
{
$this->ptName = $ptName;
return $this;
}
public function getTypeCode(): ?int
{
return $this->typeCode;
}
public function setTypeCode(?int $typeCode): self
{
$this->typeCode = $typeCode;
return $this;
}
public function getEntity(): ?int
{
return $this->entity;
}
public function setEntity(?int $entity): self
{
$this->entity = $entity;
return $this;
}
public function getMarking(): ?int
{
return $this->marking;
}
public function setMarking(?int $marking): self
{
$this->marking = $marking;
return $this;
}
public function getParams(): ?string
{
return $this->params;
}
public function setParams(?string $params): self
{
$this->params = $params;
return $this;
}
public function getTypeTagKey(): ?string
{
return $this->typeTagKey;
}
public function setTypeTagKey(?string $typeTagKey): self
{
$this->typeTagKey = $typeTagKey;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getCreatedBy(): ?int
{
return $this->createdBy;
}
public function setCreatedBy(?int $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getUpdatedBy(): ?int
{
return $this->updatedBy;
}
public function setUpdatedBy(?int $updatedBy): self
{
$this->updatedBy = $updatedBy;
return $this;
}
public function getId(): ?int
{
return $this->id;
}
public function getCategory(): ?DnsitTranslateCategory
{
return $this->category;
}
public function setCategory(?DnsitTranslateCategory $category): self
{
$this->category = $category;
return $this;
}
public function bindLeiData($xmlType, $language){
$this->setTypeCode((int) $xmlType->TYPE);
switch ($language){
case "en":
$this->setEnName((string) $xmlType->NomType);
break;
case "de":
$this->setDeName((string) $xmlType->NomType);
break;
case "nl":
$this->setNlName((string) $xmlType->NomType);
break;
case "it":
$this->setItName((string) $xmlType->NomType);
break;
case "es":
$this->setEsName((string) $xmlType->NomType);
break;
case "pt":
$this->setPtName((string) $xmlType->NomType);
break;
}
$this->setMarking(MarkingCodesMask::LEI);
}
}