src/Entity/Question.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\QuestionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. #[ORM\Entity(repositoryClassQuestionRepository::class)]
  7. class Question
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255)]
  14.     private ?string $content null;
  15.     #[ORM\Column]
  16.     #[Gedmo\SortablePosition]
  17.     private ?int $position null;
  18.     #[ORM\ManyToOne(inversedBy'questions')]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     #[Gedmo\SortableGroup]
  21.     private ?Block $block null;
  22.     #[ORM\Column]
  23.     private ?bool $active null;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getContent(): ?string
  29.     {
  30.         return $this->content;
  31.     }
  32.     public function setContent(string $content): self
  33.     {
  34.         $this->content $content;
  35.         return $this;
  36.     }
  37.     public function getPosition(): ?int
  38.     {
  39.         return $this->position;
  40.     }
  41.     public function setPosition(int $position): self
  42.     {
  43.         $this->position $position;
  44.         return $this;
  45.     }
  46.     public function getBlock(): ?Block
  47.     {
  48.         return $this->block;
  49.     }
  50.     public function setBlock(?Block $block): self
  51.     {
  52.         $this->block $block;
  53.         return $this;
  54.     }
  55.     public function isActive(): ?bool
  56.     {
  57.         return $this->active;
  58.     }
  59.     public function setActive(bool $active): self
  60.     {
  61.         $this->active $active;
  62.         return $this;
  63.     }
  64. }