src/Entity/Faq.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Config\FaqRouteEnum;
  4. use App\Repository\FaqRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassFaqRepository::class)]
  8. #[ORM\Table(name'faq')]
  9. #[ORM\Index(columns: ['route''routeParameter''isActive'], name'idx_faq_filter')]
  10. class Faq
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(typeTypes::TEXT)]
  17.     private string $question '';
  18.     #[ORM\Column(typeTypes::TEXT)]
  19.     private string $answer '';
  20.     #[ORM\Column(length100enumTypeFaqRouteEnum::class)]
  21.     private ?FaqRouteEnum $route null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $routeParameter null;
  24.     #[ORM\Column]
  25.     private bool $isActive true;
  26.     #[ORM\Column(name'sort_order')]
  27.     private int $position 0;
  28.     #[ORM\Column(nullabletrue)]
  29.     private ?\DateTimeImmutable $deletedAt null;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getQuestion(): string
  35.     {
  36.         return $this->question;
  37.     }
  38.     public function setQuestion(string $question): static
  39.     {
  40.         $this->question $question;
  41.         return $this;
  42.     }
  43.     public function getAnswer(): string
  44.     {
  45.         return $this->answer;
  46.     }
  47.     public function setAnswer(string $answer): static
  48.     {
  49.         $this->answer $answer;
  50.         return $this;
  51.     }
  52.     public function getRoute(): ?FaqRouteEnum
  53.     {
  54.         return $this->route;
  55.     }
  56.     public function setRoute(FaqRouteEnum $route): static
  57.     {
  58.         $this->route $route;
  59.         return $this;
  60.     }
  61.     public function getRouteParameter(): ?string
  62.     {
  63.         return $this->routeParameter;
  64.     }
  65.     public function setRouteParameter(?string $routeParameter): static
  66.     {
  67.         $this->routeParameter $routeParameter;
  68.         return $this;
  69.     }
  70.     public function isActive(): bool
  71.     {
  72.         return $this->isActive;
  73.     }
  74.     public function setIsActive(bool $isActive): static
  75.     {
  76.         $this->isActive $isActive;
  77.         return $this;
  78.     }
  79.     public function getPosition(): int
  80.     {
  81.         return $this->position;
  82.     }
  83.     public function setPosition(int $position): static
  84.     {
  85.         $this->position $position;
  86.         return $this;
  87.     }
  88.     public function getDeletedAt(): ?\DateTimeImmutable
  89.     {
  90.         return $this->deletedAt;
  91.     }
  92.     public function setDeletedAt(?\DateTimeImmutable $deletedAt): static
  93.     {
  94.         $this->deletedAt $deletedAt;
  95.         return $this;
  96.     }
  97. }