src/Entity/Faq.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FaqRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7.  * @ORM\Entity(repositoryClass=FaqRepository::class)
  8.  */
  9. class Faq
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $question;
  21.     /**
  22.      * @Gedmo\Slug(fields={"question"}, unique=true)
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $slug;
  26.     /**
  27.      * @ORM\Column(type="text", nullable=true)
  28.      */
  29.     private $answer;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=FaqCategory::class, inversedBy="questions")
  32.      * @ORM\JoinColumn(nullable=false)
  33.      */
  34.     private $category;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getQuestion(): ?string
  40.     {
  41.         return $this->question;
  42.     }
  43.     public function setQuestion(string $question): self
  44.     {
  45.         $this->question $question;
  46.         return $this;
  47.     }
  48.     public function getSlug(): ?string
  49.     {
  50.         return $this->slug;
  51.     }
  52.     public function setSlug(string $slug): self
  53.     {
  54.         $this->slug $slug;
  55.         return $this;
  56.     }
  57.     public function getAnswer(): ?string
  58.     {
  59.         return $this->answer;
  60.     }
  61.     public function setAnswer(?string $answer): self
  62.     {
  63.         $this->answer $answer;
  64.         return $this;
  65.     }
  66.     public function getCategory(): ?FaqCategory
  67.     {
  68.         return $this->category;
  69.     }
  70.     public function setCategory(?FaqCategory $category): self
  71.     {
  72.         $this->category $category;
  73.         return $this;
  74.     }
  75. }