<?php
namespace App\Entity;
use App\Repository\FaqRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass=FaqRepository::class)
*/
class Faq
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $question;
/**
* @Gedmo\Slug(fields={"question"}, unique=true)
* @ORM\Column(type="string", length=255)
*/
private $slug;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $answer;
/**
* @ORM\ManyToOne(targetEntity=FaqCategory::class, inversedBy="questions")
* @ORM\JoinColumn(nullable=false)
*/
private $category;
public function getId(): ?int
{
return $this->id;
}
public function getQuestion(): ?string
{
return $this->question;
}
public function setQuestion(string $question): self
{
$this->question = $question;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getAnswer(): ?string
{
return $this->answer;
}
public function setAnswer(?string $answer): self
{
$this->answer = $answer;
return $this;
}
public function getCategory(): ?FaqCategory
{
return $this->category;
}
public function setCategory(?FaqCategory $category): self
{
$this->category = $category;
return $this;
}
}