src/Entity/FaqAnswer.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FaqAnswerRepository;
  4. use App\Traits\TimeTrackTrait;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. #[ORM\Entity(repositoryClassFaqAnswerRepository::class)]
  9. #[ORM\HasLifecycleCallbacks]
  10. class FaqAnswer
  11. {
  12.     use TimeTrackTrait;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[Assert\NotBlank]
  18.     #[ORM\Column(typeTypes::TEXT)]
  19.     private ?string $answer null;
  20.     #[ORM\ManyToOne(inversedBy'faqAnswers')]
  21.     #[ORM\JoinColumn(nullablefalse)]
  22.     private ?FaqQuestion $faqQuestion null;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getAnswer(): ?string
  28.     {
  29.         return $this->answer;
  30.     }
  31.     public function setAnswer(string $answer): static
  32.     {
  33.         $this->answer $answer;
  34.         return $this;
  35.     }
  36.     public function getFaqQuestion(): ?FaqQuestion
  37.     {
  38.         return $this->faqQuestion;
  39.     }
  40.     public function setFaqQuestion(?FaqQuestion $faqQuestion): static
  41.     {
  42.         $this->faqQuestion $faqQuestion;
  43.         return $this;
  44.     }
  45.     /**
  46.      * Set createdAt.
  47.      *
  48.      * @param \DateTime|null $createdAt
  49.      *
  50.      * @return FaqAnswer
  51.      */
  52.     public function setCreatedAt($createdAt null)
  53.     {
  54.         $this->createdAt $createdAt;
  55.         return $this;
  56.     }
  57.     /**
  58.      * Get createdAt.
  59.      *
  60.      * @return \DateTime|null
  61.      */
  62.     public function getCreatedAt()
  63.     {
  64.         return $this->createdAt;
  65.     }
  66.     /**
  67.      * Set updatedAt.
  68.      *
  69.      * @param \DateTime|null $updatedAt
  70.      *
  71.      * @return FaqAnswer
  72.      */
  73.     public function setUpdatedAt($updatedAt null)
  74.     {
  75.         $this->updatedAt $updatedAt;
  76.         return $this;
  77.     }
  78.     /**
  79.      * Get updatedAt.
  80.      *
  81.      * @return \DateTime|null
  82.      */
  83.     public function getUpdatedAt()
  84.     {
  85.         return $this->updatedAt;
  86.     }
  87. }