src/Entity/DnsitType.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Mask\MarkingCodesMask;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * DnsitType
  7.  *
  8.  * @ORM\Table(name="dnsit_type")
  9.  * @ORM\Entity(repositoryClass="App\Repository\DnsitTypeRepository")
  10.  */
  11. class DnsitType
  12. {
  13.     /**
  14.      * @var string|null
  15.      *
  16.      * @ORM\Column(name="type_text_key", type="string", length=255, nullable=true, unique=true)
  17.      */
  18.     private $typeTextKey;
  19.     /**
  20.      * @var string|null
  21.      *
  22.      * @ORM\Column(name="name", type="string", length=255, nullable=true)
  23.      */
  24.     private $name;
  25.     /**
  26.      * @var int|null
  27.      *
  28.      * @ORM\Column(name="type_code", type="bigint", nullable=true)
  29.      */
  30.     private $typeCode;
  31.     /**
  32.      * @var int|null
  33.      *
  34.      * @ORM\Column(name="entity", type="bigint", nullable=true)
  35.      */
  36.     private $entity;
  37.     /**
  38.      * @var int|null
  39.      *
  40.      * @ORM\Column(name="marking", type="smallint", nullable=true)
  41.      */
  42.     private $marking;
  43.     /**
  44.      * @var string|null
  45.      *
  46.      * @ORM\Column(name="params", type="text", nullable=true)
  47.      */
  48.     private $params;
  49.     /**
  50.      * @var string|null
  51.      *
  52.      * @ORM\Column(name="type_tag_key", type="string", length=255, nullable=true, unique=true)
  53.      */
  54.     private $typeTagKey;
  55.     /**
  56.      * @var \DateTime|null
  57.      *
  58.      * @ORM\Column(name="created_at", type="datetime", nullable=true)
  59.      */
  60.     private $createdAt;
  61.     /**
  62.      * @var int|null
  63.      *
  64.      * @ORM\Column(name="created_by", type="bigint", nullable=true)
  65.      */
  66.     private $createdBy;
  67.     /**
  68.      * @var \DateTime|null
  69.      *
  70.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  71.      */
  72.     private $updatedAt;
  73.     /**
  74.      * @var int|null
  75.      *
  76.      * @ORM\Column(name="updated_by", type="bigint", nullable=true)
  77.      */
  78.     private $updatedBy;
  79.     /**
  80.      * @var int
  81.      *
  82.      * @ORM\Column(name="id", type="bigint")
  83.      * @ORM\Id
  84.      * @ORM\GeneratedValue(strategy="IDENTITY")
  85.      */
  86.     private $id;
  87.     /**
  88.      * @var \App\Entity\DnsitCategory
  89.      *
  90.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitCategory")
  91.      * @ORM\JoinColumns({
  92.      *   @ORM\JoinColumn(name="category_id", referencedColumnName="id")
  93.      * })
  94.      */
  95.     private $category;
  96.     /**
  97.      * @var \App\Entity\DnsitTranslateType
  98.      *
  99.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitTranslateType")
  100.      * @ORM\JoinColumns({
  101.      *   @ORM\JoinColumn(name="translate_id", referencedColumnName="id")
  102.      * })
  103.      */
  104.     private $translate;
  105.     public function getTypeTextKey(): ?string
  106.     {
  107.         return $this->typeTextKey;
  108.     }
  109.     public function setTypeTextKey(?string $typeTextKey): self
  110.     {
  111.         $this->typeTextKey $typeTextKey;
  112.         return $this;
  113.     }
  114.     public function getName(): ?string
  115.     {
  116.         return $this->name;
  117.     }
  118.     public function setName(?string $name): self
  119.     {
  120.         $this->name $name;
  121.         return $this;
  122.     }
  123.     public function getTypeCode(): ?int
  124.     {
  125.         return $this->typeCode;
  126.     }
  127.     public function setTypeCode(?int $typeCode): self
  128.     {
  129.         $this->typeCode $typeCode;
  130.         return $this;
  131.     }
  132.     public function getEntity(): ?int
  133.     {
  134.         return $this->entity;
  135.     }
  136.     public function setEntity(?int $entity): self
  137.     {
  138.         $this->entity $entity;
  139.         return $this;
  140.     }
  141.     public function getMarking(): ?int
  142.     {
  143.         return $this->marking;
  144.     }
  145.     public function setMarking(?int $marking): self
  146.     {
  147.         $this->marking $marking;
  148.         return $this;
  149.     }
  150.     public function getParams(): ?string
  151.     {
  152.         return $this->params;
  153.     }
  154.     public function setParams(?string $params): self
  155.     {
  156.         $this->params $params;
  157.         return $this;
  158.     }
  159.     public function getTypeTagKey(): ?string
  160.     {
  161.         return $this->typeTagKey;
  162.     }
  163.     public function setTypeTagKey(?string $typeTagKey): self
  164.     {
  165.         $this->typeTagKey $typeTagKey;
  166.         return $this;
  167.     }
  168.     public function getCreatedAt(): ?\DateTimeInterface
  169.     {
  170.         return $this->createdAt;
  171.     }
  172.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  173.     {
  174.         $this->createdAt $createdAt;
  175.         return $this;
  176.     }
  177.     public function getCreatedBy(): ?int
  178.     {
  179.         return $this->createdBy;
  180.     }
  181.     public function setCreatedBy(?int $createdBy): self
  182.     {
  183.         $this->createdBy $createdBy;
  184.         return $this;
  185.     }
  186.     public function getUpdatedAt(): ?\DateTimeInterface
  187.     {
  188.         return $this->updatedAt;
  189.     }
  190.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  191.     {
  192.         $this->updatedAt $updatedAt;
  193.         return $this;
  194.     }
  195.     public function getUpdatedBy(): ?int
  196.     {
  197.         return $this->updatedBy;
  198.     }
  199.     public function setUpdatedBy(?int $updatedBy): self
  200.     {
  201.         $this->updatedBy $updatedBy;
  202.         return $this;
  203.     }
  204.     public function getId(): ?int
  205.     {
  206.         return $this->id;
  207.     }
  208.     public function getCategory(): ?DnsitCategory
  209.     {
  210.         return $this->category;
  211.     }
  212.     public function setCategory(?DnsitCategory $category): self
  213.     {
  214.         $this->category $category;
  215.         return $this;
  216.     }
  217.     public function getTranslate(): ?DnsitTranslateType
  218.     {
  219.         return $this->translate;
  220.     }
  221.     public function setTranslate(?DnsitTranslateType $translate): self
  222.     {
  223.         $this->translate $translate;
  224.         return $this;
  225.     }
  226.     public function bindLeiData($xmlType$language){
  227.         $this->setTypeCode((int) $xmlType->TYPE);
  228.         $this->setName((string) $xmlType->NomType);
  229.         $this->setMarking(MarkingCodesMask::LEI);
  230.     }
  231. }