<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\Groups;
/**
* @ORM\Table("ContentCategory")
*
* @ORM\Entity(repositoryClass="App\Repository\ContentCategoryRepository")
*/
class ContentCategory
{
/**
* @Groups({"contentdetail"})
*
* @ORM\Id()
*
* @ORM\GeneratedValue()
*
* @ORM\Column(type="integer")
*/
private $id;
/**
* @Groups({"contentdetail", "video_search", "imageset_search"})
*
* @ORM\ManyToOne(targetEntity="App\Entity\Category")
*
* @ORM\JoinColumn(nullable=false)
*/
private $category;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Content", inversedBy="categories")
*
* @ORM\JoinColumn(nullable=false)
*/
private $content;
public function getId(): ?int
{
return $this->id;
}
public function getCategory(): ?Category
{
return $this->category;
}
public function setCategory(Category $category): self
{
$this->category = $category;
return $this;
}
public function getContent(): ?Content
{
return $this->content;
}
public function setContent(?Content $content): self
{
$this->content = $content;
return $this;
}
}