src/Entity/Core/Textbook/TextbookSubTopicAnswer.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core\Textbook;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table('textbook_subtopic_answer')]
  5. #[ORM\Entity]
  6. class TextbookSubTopicAnswer
  7. {
  8. /**
  9. * @var int
  10. */
  11. #[ORM\Column(name: 'id', type: 'integer')]
  12. #[ORM\Id]
  13. #[ORM\GeneratedValue(strategy: 'AUTO')]
  14. private $id;
  15. /**
  16. * @var string
  17. */
  18. #[ORM\Column(name: 'answer_txt', type: 'string', length: 255)]
  19. private $answerTxt;
  20. /**
  21. * TextbookSubTopicQuestion subTopicQuestion
  22. */
  23. #[ORM\JoinColumn(name: 'textbook_subtopic_question_id', referencedColumnName: 'id')]
  24. #[ORM\ManyToOne(targetEntity: TextbookSubTopicQuestion::class, inversedBy: 'answers')]
  25. private $question;
  26. /**
  27. * @var bool
  28. */
  29. #[ORM\Column(name: 'is_correct', type: 'boolean')]
  30. private $isCorrect;
  31. /**
  32. * @return string
  33. */
  34. public function getAnswerTxt()
  35. {
  36. return $this->answerTxt;
  37. }
  38. public function isCorrect(): bool
  39. {
  40. return $this->isCorrect;
  41. }
  42. /**
  43. * @return int
  44. */
  45. public function getId()
  46. {
  47. return $this->id;
  48. }
  49. }