<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Greg0ire\Enum\Bridge\Symfony\Validator\Constraint\Enum as EnumAssert;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\FeedItemRepository")
*/
class FeedItem
{
use TimestampableEntity;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=128)
* @Assert\Length(max="128")
* @Assert\NotBlank()
* @EnumAssert(class="App\Enum\FeedItemType")
*/
private $type;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Company", inversedBy="feedItems", cascade={"persist"})
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $company;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Article", inversedBy="feedItems", cascade={"persist"})
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $article;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Newsroom", inversedBy="feedItems", cascade={"persist"})
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $newsroom;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Blog", inversedBy="feedItems", cascade={"persist"})
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $blog;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Review", cascade={"persist"})
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $review;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\CompanyFormPage", cascade={"persist"})
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $formPage;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\AnnualReport", cascade={"persist"})
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $annualReport;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\InvitationRecipient", cascade={"persist"})
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $invitationRecipient;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getCompany(): ?company
{
return $this->company;
}
public function setCompany(?company $company): self
{
$this->company = $company;
return $this;
}
public function getArticle(): ?Article
{
return $this->article;
}
public function setArticle(?Article $article): self
{
$this->article = $article;
return $this;
}
public function getNewsroom(): ?Newsroom
{
return $this->newsroom;
}
public function setNewsroom(?Newsroom $newsroom): self
{
$this->newsroom = $newsroom;
return $this;
}
public function getBlog(): ?Blog
{
return $this->blog;
}
public function setBlog(?Blog $blog): self
{
$this->blog = $blog;
return $this;
}
public function getReview(): ?Review
{
return $this->review;
}
public function setReview(?Review $review): self
{
$this->review = $review;
return $this;
}
public function getFormPage(): ?CompanyFormPage
{
return $this->formPage;
}
public function setFormPage(?CompanyFormPage $formPage): self
{
$this->formPage = $formPage;
return $this;
}
public function getAnnualReport(): ?AnnualReport
{
return $this->annualReport;
}
public function setAnnualReport(?AnnualReport $annualReport): self
{
$this->annualReport = $annualReport;
return $this;
}
public function getInvitationRecipient(): ?InvitationRecipient
{
return $this->invitationRecipient;
}
public function setInvitationRecipient(?InvitationRecipient $invitationRecipient): self
{
$this->invitationRecipient = $invitationRecipient;
return $this;
}
}