src/Entity/ContentCategory.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use JMS\Serializer\Annotation\Groups;
  5. /**
  6.  * @ORM\Table("ContentCategory")
  7.  *
  8.  * @ORM\Entity(repositoryClass="App\Repository\ContentCategoryRepository")
  9.  */
  10. class ContentCategory
  11. {
  12.     /**
  13.      * @Groups({"contentdetail"})
  14.      *
  15.      * @ORM\Id()
  16.      *
  17.      * @ORM\GeneratedValue()
  18.      *
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @Groups({"contentdetail", "video_search", "imageset_search"})
  24.      *
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\Category")
  26.      *
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $category;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity="App\Entity\Content", inversedBy="categories")
  32.      *
  33.      * @ORM\JoinColumn(nullable=false)
  34.      */
  35.     private $content;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getCategory(): ?Category
  41.     {
  42.         return $this->category;
  43.     }
  44.     public function setCategory(Category $category): self
  45.     {
  46.         $this->category $category;
  47.         return $this;
  48.     }
  49.     public function getContent(): ?Content
  50.     {
  51.         return $this->content;
  52.     }
  53.     public function setContent(?Content $content): self
  54.     {
  55.         $this->content $content;
  56.         return $this;
  57.     }
  58. }