<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\Groups;
/**
* @ORM\Table("Category")
*
* @ORM\Entity(repositoryClass="App\Repository\CategoryRepository")
*/
class Category
{
/**
* @Groups({"categorylist", "contentdetail", "video_search", "imageset_search"})
*
* @ORM\Id()
*
* @ORM\GeneratedValue("AUTO")
*
* @ORM\Column(type="integer")
*/
private $id;
/**
* @Groups({"categorylist", "video_search", "imageset_search"})
*
* @ORM\Column(type="string", length=100)
*/
private $name;
/**
* @Groups({"categorylist", "video_search"})
*
* @ORM\Column(type="string", length=100)
*/
private $videoSlug;
/**
* @Groups({"categorylist", "imageset_search"})
*
* @ORM\Column(type="string", length=100)
*/
private $imagesetSlug;
/**
* @Groups({"categorydetail", "video_search", "imageset_search"})
*
* @ORM\ManyToOne(targetEntity="App\Entity\CategoryGroup", inversedBy="categories")
*
* @ORM\JoinColumn(nullable=false)
*/
private $group;
/**
* @Groups({"categorylist", "video_search", "imageset_search"})
*
* @ORM\Column(type="integer")
*/
private $sorting = 0;
/**
* @Groups({"categorylist"})
*
* @ORM\Column(type="string", length=100, unique=true, nullable=true)
*/
private $filename;
/**
* @Groups({"categorylist"})
*/
private ?string $imageUrl = null;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getVideoSlug(): ?string
{
return $this->videoSlug;
}
public function setVideoSlug(string $videoSlug): self
{
$this->videoSlug = $videoSlug;
return $this;
}
public function getImagesetSlug(): ?string
{
return $this->imagesetSlug;
}
public function setImagesetSlug(string $imagesetSlug): self
{
$this->imagesetSlug = $imagesetSlug;
return $this;
}
public function getGroup(): ?CategoryGroup
{
return $this->group;
}
public function setGroup(CategoryGroup $group): self
{
$this->group = $group;
return $this;
}
public function getSorting(): int
{
return $this->sorting;
}
public function setSorting(int $sorting): self
{
$this->sorting = $sorting;
return $this;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setFilename(string $filename): self
{
$this->filename = $filename;
return $this;
}
public function setImageUrl(string $url): self
{
$this->imageUrl = $url;
return $this;
}
public function getImageUrl(): ?string
{
return $this->imageUrl;
}
}