src/Entity/FAQ.php line 12
<?php
namespace App\Entity;
use App\Repository\FAQRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: FAQRepository::class)]
class FAQ
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $question = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $answer = null;
#[ORM\Column(nullable: true)]
private ?int $sequence = null;
#[ORM\Column(nullable: true)]
private ?bool $isActive = null;
#[ORM\OneToMany(mappedBy: 'faq', targetEntity: FAQTranslation::class)]
private Collection $fAQTranslations;
public function __construct()
{
$this->fAQTranslations = new ArrayCollection();
}
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 getSequence(): ?int
{
return $this->sequence;
}
public function setSequence(?int $sequence): self
{
$this->sequence = $sequence;
return $this;
}
public function isIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(?bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
/**
* @return Collection<int, FAQTranslation>
*/
public function getFAQTranslations(): Collection
{
return $this->fAQTranslations;
}
public function addFAQTranslation(FAQTranslation $fAQTranslation): self
{
if (!$this->fAQTranslations->contains($fAQTranslation)) {
$this->fAQTranslations->add($fAQTranslation);
$fAQTranslation->setFaq($this);
}
return $this;
}
public function removeFAQTranslation(FAQTranslation $fAQTranslation): self
{
if ($this->fAQTranslations->removeElement($fAQTranslation)) {
// set the owning side to null (unless already changed)
if ($fAQTranslation->getFaq() === $this) {
$fAQTranslation->setFaq(null);
}
}
return $this;
}
}