src/Entity/NewsletterCategory.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\NewsletterCategoryRepository")
  6.  */
  7. class NewsletterCategory
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      *
  12.      * @ORM\GeneratedValue()
  13.      *
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\Newsletter", inversedBy="categories")
  19.      */
  20.     private $newsletter;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Category", inversedBy="newsletterCategories")
  23.      */
  24.     private $category;
  25.     /**
  26.      * @ORM\Column(type="integer")
  27.      */
  28.     private $position;
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getNewsletter(): ?Newsletter
  34.     {
  35.         return $this->newsletter;
  36.     }
  37.     public function setNewsletter(?Newsletter $newsletter): self
  38.     {
  39.         $this->newsletter $newsletter;
  40.         return $this;
  41.     }
  42.     public function getCategory(): ?Category
  43.     {
  44.         return $this->category;
  45.     }
  46.     public function setCategory(?Category $category): self
  47.     {
  48.         $this->category $category;
  49.         return $this;
  50.     }
  51.     public function getPosition(): ?int
  52.     {
  53.         return $this->position;
  54.     }
  55.     public function setPosition(int $position): self
  56.     {
  57.         $this->position $position;
  58.         return $this;
  59.     }
  60. }