src/Entity/FeedItem.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Timestampable\Traits\TimestampableEntity;
  5. use Greg0ire\Enum\Bridge\Symfony\Validator\Constraint\Enum as EnumAssert;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\FeedItemRepository")
  9.  */
  10. class FeedItem
  11. {
  12.     use TimestampableEntity;
  13.     /**
  14.      * @ORM\Id()
  15.      * @ORM\GeneratedValue()
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=128)
  21.      * @Assert\Length(max="128")
  22.      * @Assert\NotBlank()
  23.      * @EnumAssert(class="App\Enum\FeedItemType")
  24.      */
  25.     private $type;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity="App\Entity\Company", inversedBy="feedItems", cascade={"persist"})
  28.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  29.      */
  30.     private $company;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity="App\Entity\Article", inversedBy="feedItems", cascade={"persist"})
  33.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  34.      */
  35.     private $article;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity="App\Entity\Newsroom", inversedBy="feedItems", cascade={"persist"})
  38.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  39.      */
  40.     private $newsroom;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity="App\Entity\Blog", inversedBy="feedItems", cascade={"persist"})
  43.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  44.      */
  45.     private $blog;
  46.     /**
  47.      * @ORM\ManyToOne(targetEntity="App\Entity\Review", cascade={"persist"})
  48.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  49.      */
  50.     private $review;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity="App\Entity\CompanyFormPage", cascade={"persist"})
  53.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  54.      */
  55.     private $formPage;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity="App\Entity\AnnualReport", cascade={"persist"})
  58.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  59.      */
  60.     private $annualReport;
  61.     /**
  62.      * @ORM\ManyToOne(targetEntity="App\Entity\InvitationRecipient", cascade={"persist"})
  63.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  64.      */
  65.     private $invitationRecipient;
  66.     public function __construct()
  67.     {
  68.     }
  69.     public function getId(): ?int
  70.     {
  71.         return $this->id;
  72.     }
  73.     public function getType(): ?string
  74.     {
  75.         return $this->type;
  76.     }
  77.     public function setType(string $type): self
  78.     {
  79.         $this->type $type;
  80.         return $this;
  81.     }
  82.     public function getCompany(): ?company
  83.     {
  84.         return $this->company;
  85.     }
  86.     public function setCompany(?company $company): self
  87.     {
  88.         $this->company $company;
  89.         return $this;
  90.     }
  91.     public function getArticle(): ?Article
  92.     {
  93.         return $this->article;
  94.     }
  95.     public function setArticle(?Article $article): self
  96.     {
  97.         $this->article $article;
  98.         return $this;
  99.     }
  100.     public function getNewsroom(): ?Newsroom
  101.     {
  102.         return $this->newsroom;
  103.     }
  104.     public function setNewsroom(?Newsroom $newsroom): self
  105.     {
  106.         $this->newsroom $newsroom;
  107.         return $this;
  108.     }
  109.     public function getBlog(): ?Blog
  110.     {
  111.         return $this->blog;
  112.     }
  113.     public function setBlog(?Blog $blog): self
  114.     {
  115.         $this->blog $blog;
  116.         return $this;
  117.     }
  118.     public function getReview(): ?Review
  119.     {
  120.         return $this->review;
  121.     }
  122.     public function setReview(?Review $review): self
  123.     {
  124.         $this->review $review;
  125.         return $this;
  126.     }
  127.     public function getFormPage(): ?CompanyFormPage
  128.     {
  129.         return $this->formPage;
  130.     }
  131.     public function setFormPage(?CompanyFormPage $formPage): self
  132.     {
  133.         $this->formPage $formPage;
  134.         return $this;
  135.     }
  136.     public function getAnnualReport(): ?AnnualReport
  137.     {
  138.         return $this->annualReport;
  139.     }
  140.     public function setAnnualReport(?AnnualReport $annualReport): self
  141.     {
  142.         $this->annualReport $annualReport;
  143.         return $this;
  144.     }
  145.     public function getInvitationRecipient(): ?InvitationRecipient
  146.     {
  147.         return $this->invitationRecipient;
  148.     }
  149.     public function setInvitationRecipient(?InvitationRecipient $invitationRecipient): self
  150.     {
  151.         $this->invitationRecipient $invitationRecipient;
  152.         return $this;
  153.     }
  154. }