src/Entity/DnsitCriterionCategory.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * DnsitCriterionCategory
  8.  *
  9.  * @ORM\Table(name="dnsit_criterion_category")
  10.  * @ORM\Entity(repositoryClass="App\Repository\DnsitCriterionCategoryRepository")
  11.  */
  12. class DnsitCriterionCategory
  13. {
  14.     /**
  15.      * @var string|null
  16.      *
  17.      * @ORM\Column(name="name", type="string", length=255, nullable=true)
  18.      */
  19.     private $name;
  20.     /**
  21.      * @var int|null
  22.      *
  23.      * @ORM\Column(name="category_code", type="bigint", nullable=true)
  24.      */
  25.     private $categoryCode;
  26.     /**
  27.      * @var int|null
  28.      *
  29.      * @ORM\Column(name="entity", type="bigint", nullable=true)
  30.      */
  31.     private $entity;
  32.     /**
  33.      * @var int|null
  34.      *
  35.      * @ORM\Column(name="marking", type="smallint", nullable=true)
  36.      */
  37.     private $marking;
  38.     /**
  39.      * @var string|null
  40.      *
  41.      * @ORM\Column(name="params", type="text", nullable=true)
  42.      */
  43.     private $params;
  44.     /**
  45.      * @var \DateTime|null
  46.      *
  47.      * @ORM\Column(name="created_at", type="datetime", nullable=true)
  48.      */
  49.     private $createdAt;
  50.     /**
  51.      * @var int|null
  52.      *
  53.      * @ORM\Column(name="created_by", type="bigint", nullable=true)
  54.      */
  55.     private $createdBy;
  56.     /**
  57.      * @var \DateTime|null
  58.      *
  59.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  60.      */
  61.     private $updatedAt;
  62.     /**
  63.      * @var int|null
  64.      *
  65.      * @ORM\Column(name="updated_by", type="bigint", nullable=true)
  66.      */
  67.     private $updatedBy;
  68.     /**
  69.      * @var int
  70.      *
  71.      * @ORM\Column(name="id", type="bigint")
  72.      * @ORM\Id
  73.      * @ORM\GeneratedValue(strategy="IDENTITY")
  74.      */
  75.     private $id;
  76.     /**
  77.      * @var \Doctrine\Common\Collections\Collection
  78.      *
  79.      * @ORM\OneToMany(targetEntity="App\Entity\DnsitCriterion", mappedBy="criterionCategory", cascade={"persist"})
  80.      */
  81.     private $criterions;
  82.     /**
  83.      * @var \Doctrine\Common\Collections\Collection
  84.      *
  85.      * @ORM\OneToMany(targetEntity="App\Entity\DnsitTranslateCriterion", mappedBy="criterionCategory", cascade={"persist"})
  86.      */
  87.     private $translateCriterions;
  88.     public function __construct()
  89.     {
  90.         $this->criterions = new ArrayCollection();
  91.         $this->translateCriterions = new ArrayCollection();
  92.     }
  93.     public function getName(): ?string
  94.     {
  95.         return $this->name;
  96.     }
  97.     public function setName(?string $name): self
  98.     {
  99.         $this->name $name;
  100.         return $this;
  101.     }
  102.     public function getEntity(): ?int
  103.     {
  104.         return $this->entity;
  105.     }
  106.     public function setEntity(?int $entity): self
  107.     {
  108.         $this->entity $entity;
  109.         return $this;
  110.     }
  111.     public function getMarking(): ?int
  112.     {
  113.         return $this->marking;
  114.     }
  115.     public function setMarking(?int $marking): self
  116.     {
  117.         $this->marking $marking;
  118.         return $this;
  119.     }
  120.     public function getParams(): ?string
  121.     {
  122.         return $this->params;
  123.     }
  124.     public function setParams(?string $params): self
  125.     {
  126.         $this->params $params;
  127.         return $this;
  128.     }
  129.     public function getCreatedAt(): ?\DateTimeInterface
  130.     {
  131.         return $this->createdAt;
  132.     }
  133.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  134.     {
  135.         $this->createdAt $createdAt;
  136.         return $this;
  137.     }
  138.     public function getCreatedBy(): ?int
  139.     {
  140.         return $this->createdBy;
  141.     }
  142.     public function setCreatedBy(?int $createdBy): self
  143.     {
  144.         $this->createdBy $createdBy;
  145.         return $this;
  146.     }
  147.     public function getUpdatedAt(): ?\DateTimeInterface
  148.     {
  149.         return $this->updatedAt;
  150.     }
  151.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  152.     {
  153.         $this->updatedAt $updatedAt;
  154.         return $this;
  155.     }
  156.     public function getUpdatedBy(): ?int
  157.     {
  158.         return $this->updatedBy;
  159.     }
  160.     public function setUpdatedBy(?int $updatedBy): self
  161.     {
  162.         $this->updatedBy $updatedBy;
  163.         return $this;
  164.     }
  165.     public function getId(): ?int
  166.     {
  167.         return $this->id;
  168.     }
  169.     /**
  170.      * @return Collection|DnsitCriterion[]
  171.      */
  172.     public function getCriterions(): Collection
  173.     {
  174.         return $this->criterions;
  175.     }
  176.     public function addCriterion(DnsitCriterion $criterion): self
  177.     {
  178.         if (!$this->criterions->contains($criterion)) {
  179.             $this->criterions[] = $criterion;
  180.             $criterion->setCriterionCategory($this);
  181.         }
  182.         return $this;
  183.     }
  184.     public function removeCriterion(DnsitCriterion $criterion): self
  185.     {
  186.         if ($this->criterions->contains($criterion)) {
  187.             $this->criterions->removeElement($criterion);
  188.             // set the owning side to null (unless already changed)
  189.             if ($criterion->getCriterionCategory() === $this) {
  190.                 $criterion->setCriterionCategory(null);
  191.             }
  192.         }
  193.         return $this;
  194.     }
  195.     /**
  196.      * @return Collection|DnsitTranslateCriterion[]
  197.      */
  198.     public function getTranslateCriterions(): Collection
  199.     {
  200.         return $this->translateCriterions;
  201.     }
  202.     public function addTranslateCriterion(DnsitTranslateCriterion $translateCriterion): self
  203.     {
  204.         if (!$this->translateCriterions->contains($translateCriterion)) {
  205.             $this->translateCriterions[] = $translateCriterion;
  206.             $translateCriterion->setCriterionCategory($this);
  207.         }
  208.         return $this;
  209.     }
  210.     public function removeTranslateCriterion(DnsitTranslateCriterion $translateCriterion): self
  211.     {
  212.         if ($this->translateCriterions->contains($translateCriterion)) {
  213.             $this->translateCriterions->removeElement($translateCriterion);
  214.             // set the owning side to null (unless already changed)
  215.             if ($translateCriterion->getCriterionCategory() === $this) {
  216.                 $translateCriterion->setCriterionCategory(null);
  217.             }
  218.         }
  219.         return $this;
  220.     }
  221.     public function getCategoryCode(): ?int
  222.     {
  223.         return $this->categoryCode;
  224.     }
  225.     public function setCategoryCode(?int $code): self
  226.     {
  227.         $this->categoryCode $code;
  228.         return $this;
  229.     }
  230. }