<?phpnamespace App\Entity;use App\Repository\AnswerRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=AnswerRepository::class) */class Answer{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\OneToOne(targetEntity=Questions::class, inversedBy="answer", cascade={"persist", "remove"}) */ private $question; /** * @ORM\Column(type="datetime", nullable=true) */ private $createdAt; /** * @ORM\Column(type="datetime", nullable=true) */ private $updatedAt; /** * @ORM\Column(type="text", nullable=true) */ private $answer; /** * @ORM\ManyToOne(targetEntity=Questions::class, inversedBy="answers") */ private $qstn; /** * @ORM\ManyToOne(targetEntity=User::class, inversedBy="answers") */ private $user; public function getId(): ?int { return $this->id; } public function getQuestion(): ?Questions { return $this->question; } public function setQuestion(?Questions $question): self { $this->question = $question; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(?\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(?\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function getAnswer(): ?string { return $this->answer; } public function setAnswer(?string $answer): self { $this->answer = $answer; return $this; } public function getQstn(): ?Questions { return $this->qstn; } public function setQstn(?Questions $qstn): self { $this->qstn = $qstn; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; }}