<?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)]
#[ORM\HasLifecycleCallbacks]
class Faq
{
use \App\Traits\EntityDateTimeAbleTrait;
const STATUS_ACTIVE = 1;
const STATUS_INACTIVE = 0;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @Gedmo\Translatable
*/
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $question = null;
/**
* @Gedmo\Translatable
*/
#[ORM\Column(type: 'text', nullable: true)]
private ?string $answer = null;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $ordering = null;
#[ORM\ManyToOne(targetEntity: Topic::class, inversedBy: 'faqs')]
private ?\App\Entity\Topic $topic = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $status = null;
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 getAnswer(): ?string
{
return $this->answer;
}
public function setAnswer(?string $answer): self
{
$this->answer = $answer;
return $this;
}
public function getOrdering(): ?int
{
return $this->ordering;
}
public function setOrdering(?int $ordering): self
{
$this->ordering = $ordering;
return $this;
}
public function getTopic(): ?Topic
{
return $this->topic;
}
public function setTopic(?Topic $topic): self
{
$this->topic = $topic;
return $this;
}
public function getStatus(): ?bool
{
return $this->status;
}
public function setStatus(?bool $status): self
{
$this->status = $status;
return $this;
}
}