<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\EeocFeedRepository")
*/
class EeocFeed
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=1000)
*/
private $title;
/**
* @ORM\Column(type="string", length=600)
*/
private $link;
/**
* @ORM\Column(type="text")
*/
private $description;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $fullDescription;
/**
* @ORM\Column(type="datetime")
*/
private $publishDate;
/**
* @ORM\Column(type="string", length=200)
*/
private $creator;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isPermalink;
/**
* @ORM\Column(type="boolean")
*/
private $isActive;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @var ArrayCollection
*
* @ORM\ManyToMany(targetEntity="App\Entity\Company", inversedBy="eeocFeeds")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $companies;
/**
* @var ArrayCollection
*
* @ORM\ManyToMany(targetEntity="App\Entity\ComplaintType", inversedBy="eeocFeeds")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $complaintTypes;
public function __construct()
{
$this->isActive = false;
$this->isPermalink = false;
$this->createdAt = new \DateTime();
$this->companies = new ArrayCollection();
$this->complaintTypes = new ArrayCollection();
}
/**
* @return string
*/
public function __toString()
{
return $this->title;
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getLink(): ?string
{
return $this->link;
}
public function setLink(string $link): self
{
$this->link = $link;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getFullDescription(): ?string
{
return $this->fullDescription;
}
public function setFullDescription(?string $fullDescription): self
{
$this->fullDescription = $fullDescription;
return $this;
}
public function getPublishDate(): ?\DateTimeInterface
{
return $this->publishDate;
}
public function setPublishDate(\DateTimeInterface $publishDate): self
{
$this->publishDate = $publishDate;
return $this;
}
public function getCreator(): ?string
{
return $this->creator;
}
public function setCreator(string $creator): self
{
$this->creator = $creator;
return $this;
}
public function getIsPermalink(): ?bool
{
return $this->isPermalink;
}
public function setIsPermalink(?bool $isPermalink): self
{
$this->isPermalink = $isPermalink;
return $this;
}
public function getIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @return Collection|Company[]
*/
public function getCompanies(): Collection
{
return $this->companies;
}
public function addCompany(Company $company): self
{
if (!$this->companies->contains($company)) {
$this->companies[] = $company;
}
return $this;
}
public function removeCompany(Company $company): self
{
if ($this->companies->contains($company)) {
$this->companies->removeElement($company);
}
return $this;
}
/**
* @return Collection|ComplaintType[]
*/
public function getComplaintTypes(): Collection
{
return $this->complaintTypes;
}
public function addComplaintType(ComplaintType $complaintType): self
{
if (!$this->complaintTypes->contains($complaintType)) {
$this->complaintTypes[] = $complaintType;
}
return $this;
}
public function removeComplaintType(ComplaintType $complaintType): self
{
if ($this->complaintTypes->contains($complaintType)) {
$this->complaintTypes->removeElement($complaintType);
}
return $this;
}
}