src/Entity/Keyword.php line 13

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.  * @ORM\Entity(repositoryClass="App\Repository\KeywordRepository")
  8.  * @ORM\Table(name="keywords", indexes={@ORM\Index(name="id_index", columns={"id"})})
  9.  */
  10. class Keyword
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\Column(type="integer")
  15.      * @ORM\GeneratedValue(strategy="AUTO")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=10, nullable=false)
  20.      */
  21.     private $type;
  22.     /**
  23.      * @ORM\Column(type="string", length=100, nullable=false)
  24.      */
  25.     private $name;
  26.     /**
  27.      * @ORM\Column(type="datetime", nullable=true)
  28.      */
  29.     private $last_import;
  30.     /**
  31.      * @ORM\Column(type="integer", nullable=false)
  32.      */
  33.     private $imported_from_dnpedia;
  34.     /**
  35.      * @ORM\Column(type="integer", nullable=false)
  36.      */
  37.     private $imported_from_phishtank;
  38.     /**
  39.      * @ORM\Column(type="integer", nullable=false)
  40.      */
  41.     private $imported_from_certstream;
  42.     /**
  43.      * @ORM\Column(type="boolean", nullable=false)
  44.      */
  45.     private $is_root;
  46.     /**
  47.      * @ORM\Column(type="boolean", nullable=false)
  48.      */
  49.     private $status;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity="App\Entity\BrandDomain", mappedBy="keyword")
  52.      */
  53.     private $brandDomains;
  54.     /**
  55.      * @ORM\ManyToOne(targetEntity="App\Entity\Brand", inversedBy="keywords")
  56.      * @ORM\JoinColumn(name="brand_id", referencedColumnName="id", nullable=false)
  57.      */
  58.     private $brand;
  59.     public function __construct()
  60.     {
  61.         $this->brandDomains = new ArrayCollection();
  62.     }
  63.     public function getId(): ?int
  64.     {
  65.         return $this->id;
  66.     }
  67.     public function getType(): ?string
  68.     {
  69.         return $this->type;
  70.     }
  71.     public function setType(string $type): self
  72.     {
  73.         $this->type $type;
  74.         return $this;
  75.     }
  76.     public function getName(): ?string
  77.     {
  78.         return $this->name;
  79.     }
  80.     public function setName(string $name): self
  81.     {
  82.         $this->name $name;
  83.         return $this;
  84.     }
  85.     public function getLastImport(): ?\DateTimeInterface
  86.     {
  87.         return $this->last_import;
  88.     }
  89.     public function setLastImport(?\DateTimeInterface $last_import): self
  90.     {
  91.         $this->last_import $last_import;
  92.         return $this;
  93.     }
  94.     public function getImportedFromDnpedia(): ?int
  95.     {
  96.         return $this->imported_from_dnpedia;
  97.     }
  98.     public function setImportedFromDnpedia(int $imported_from_dnpedia): self
  99.     {
  100.         $this->imported_from_dnpedia $imported_from_dnpedia;
  101.         return $this;
  102.     }
  103.     public function getImportedFromPhishtank(): ?int
  104.     {
  105.         return $this->imported_from_phishtank;
  106.     }
  107.     public function setImportedFromPhishtank(int $imported_from_phishtank): self
  108.     {
  109.         $this->imported_from_phishtank $imported_from_phishtank;
  110.         return $this;
  111.     }
  112.     public function getImportedFromCertstream(): ?int
  113.     {
  114.         return $this->imported_from_certstream;
  115.     }
  116.     public function setImportedFromCertstream(int $imported_from_certstream): self
  117.     {
  118.         $this->imported_from_certstream $imported_from_certstream;
  119.         return $this;
  120.     }
  121.     public function getIsRoot(): ?bool
  122.     {
  123.         return $this->is_root;
  124.     }
  125.     public function setIsRoot(bool $is_root): self
  126.     {
  127.         $this->is_root $is_root;
  128.         return $this;
  129.     }
  130.     public function getStatus(): ?bool
  131.     {
  132.         return $this->status;
  133.     }
  134.     public function setStatus(bool $status): self
  135.     {
  136.         $this->status $status;
  137.         return $this;
  138.     }
  139.     /**
  140.      * @return Collection|BrandDomain[]
  141.      */
  142.     public function getBrandDomains(): Collection
  143.     {
  144.         return $this->brandDomains;
  145.     }
  146.     public function addBrandDomain(BrandDomain $brandDomain): self
  147.     {
  148.         if (!$this->brandDomains->contains($brandDomain)) {
  149.             $this->brandDomains[] = $brandDomain;
  150.             $brandDomain->setKeyword($this);
  151.         }
  152.         return $this;
  153.     }
  154.     public function removeBrandDomain(BrandDomain $brandDomain): self
  155.     {
  156.         if ($this->brandDomains->removeElement($brandDomain)) {
  157.             // set the owning side to null (unless already changed)
  158.             if ($brandDomain->getKeyword() === $this) {
  159.                 $brandDomain->setKeyword(null);
  160.             }
  161.         }
  162.         return $this;
  163.     }
  164.     public function getBrand(): ?Brand
  165.     {
  166.         return $this->brand;
  167.     }
  168.     public function setBrand(?Brand $brand): self
  169.     {
  170.         $this->brand $brand;
  171.         return $this;
  172.     }
  173. }