src/Entity/EeocFeed.php line 12

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\EeocFeedRepository")
  8.  */
  9. class EeocFeed
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=1000)
  19.      */
  20.     private $title;
  21.     /**
  22.      * @ORM\Column(type="string", length=600)
  23.      */
  24.     private $link;
  25.     /**
  26.      * @ORM\Column(type="text")
  27.      */
  28.     private $description;
  29.     /**
  30.      * @ORM\Column(type="text", nullable=true)
  31.      */
  32.     private $fullDescription;
  33.     /**
  34.      * @ORM\Column(type="datetime")
  35.      */
  36.     private $publishDate;
  37.     /**
  38.      * @ORM\Column(type="string", length=200)
  39.      */
  40.     private $creator;
  41.     /**
  42.      * @ORM\Column(type="boolean", nullable=true)
  43.      */
  44.     private $isPermalink;
  45.     /**
  46.      * @ORM\Column(type="boolean")
  47.      */
  48.     private $isActive;
  49.     /**
  50.      * @ORM\Column(type="datetime")
  51.      */
  52.     private $createdAt;
  53.     /**
  54.      * @ORM\Column(type="datetime", nullable=true)
  55.      */
  56.     private $updatedAt;
  57.     /**
  58.      * @var ArrayCollection
  59.      *
  60.      * @ORM\ManyToMany(targetEntity="App\Entity\Company", inversedBy="eeocFeeds")
  61.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  62.      */
  63.     private $companies;
  64.     /**
  65.      * @var ArrayCollection
  66.      *
  67.      * @ORM\ManyToMany(targetEntity="App\Entity\ComplaintType", inversedBy="eeocFeeds")
  68.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  69.      */
  70.     private $complaintTypes;
  71.     public function __construct()
  72.     {
  73.         $this->isActive false;
  74.         $this->isPermalink false;
  75.         $this->createdAt = new \DateTime();
  76.         $this->companies = new ArrayCollection();
  77.         $this->complaintTypes = new ArrayCollection();
  78.     }
  79.     /**
  80.      * @return string
  81.      */
  82.     public function __toString()
  83.     {
  84.         return $this->title;
  85.     }
  86.     public function getId(): ?int
  87.     {
  88.         return $this->id;
  89.     }
  90.     public function getTitle(): ?string
  91.     {
  92.         return $this->title;
  93.     }
  94.     public function setTitle(string $title): self
  95.     {
  96.         $this->title $title;
  97.         return $this;
  98.     }
  99.     public function getLink(): ?string
  100.     {
  101.         return $this->link;
  102.     }
  103.     public function setLink(string $link): self
  104.     {
  105.         $this->link $link;
  106.         return $this;
  107.     }
  108.     public function getDescription(): ?string
  109.     {
  110.         return $this->description;
  111.     }
  112.     public function setDescription(string $description): self
  113.     {
  114.         $this->description $description;
  115.         return $this;
  116.     }
  117.     public function getFullDescription(): ?string
  118.     {
  119.         return $this->fullDescription;
  120.     }
  121.     public function setFullDescription(?string $fullDescription): self
  122.     {
  123.         $this->fullDescription $fullDescription;
  124.         return $this;
  125.     }
  126.     public function getPublishDate(): ?\DateTimeInterface
  127.     {
  128.         return $this->publishDate;
  129.     }
  130.     public function setPublishDate(\DateTimeInterface $publishDate): self
  131.     {
  132.         $this->publishDate $publishDate;
  133.         return $this;
  134.     }
  135.     public function getCreator(): ?string
  136.     {
  137.         return $this->creator;
  138.     }
  139.     public function setCreator(string $creator): self
  140.     {
  141.         $this->creator $creator;
  142.         return $this;
  143.     }
  144.     public function getIsPermalink(): ?bool
  145.     {
  146.         return $this->isPermalink;
  147.     }
  148.     public function setIsPermalink(?bool $isPermalink): self
  149.     {
  150.         $this->isPermalink $isPermalink;
  151.         return $this;
  152.     }
  153.     public function getIsActive(): ?bool
  154.     {
  155.         return $this->isActive;
  156.     }
  157.     public function setIsActive(bool $isActive): self
  158.     {
  159.         $this->isActive $isActive;
  160.         return $this;
  161.     }
  162.     public function getCreatedAt(): ?\DateTimeInterface
  163.     {
  164.         return $this->createdAt;
  165.     }
  166.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  167.     {
  168.         $this->createdAt $createdAt;
  169.         return $this;
  170.     }
  171.     public function getUpdatedAt(): ?\DateTimeInterface
  172.     {
  173.         return $this->updatedAt;
  174.     }
  175.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  176.     {
  177.         $this->updatedAt $updatedAt;
  178.         return $this;
  179.     }
  180.     /**
  181.      * @return Collection|Company[]
  182.      */
  183.     public function getCompanies(): Collection
  184.     {
  185.         return $this->companies;
  186.     }
  187.     public function addCompany(Company $company): self
  188.     {
  189.         if (!$this->companies->contains($company)) {
  190.             $this->companies[] = $company;
  191.         }
  192.         return $this;
  193.     }
  194.     public function removeCompany(Company $company): self
  195.     {
  196.         if ($this->companies->contains($company)) {
  197.             $this->companies->removeElement($company);
  198.         }
  199.         return $this;
  200.     }
  201.     /**
  202.      * @return Collection|ComplaintType[]
  203.      */
  204.     public function getComplaintTypes(): Collection
  205.     {
  206.         return $this->complaintTypes;
  207.     }
  208.     public function addComplaintType(ComplaintType $complaintType): self
  209.     {
  210.         if (!$this->complaintTypes->contains($complaintType)) {
  211.             $this->complaintTypes[] = $complaintType;
  212.         }
  213.         return $this;
  214.     }
  215.     public function removeComplaintType(ComplaintType $complaintType): self
  216.     {
  217.         if ($this->complaintTypes->contains($complaintType)) {
  218.             $this->complaintTypes->removeElement($complaintType);
  219.         }
  220.         return $this;
  221.     }
  222. }