src/CoreBundle/Entity/TextbookSubTopicQuestion.php line 12

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table("textbook_subtopic_question")
  7. * @ORM\Entity(repositoryClass="TextbookSubTopicQuestionRepository")
  8. */
  9. class TextbookSubTopicQuestion
  10. {
  11. /**
  12. * @var int
  13. *
  14. * @ORM\Column(name="id", type="integer")
  15. * @ORM\Id
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. */
  18. private $id;
  19. /**
  20. * @var string
  21. *
  22. * @ORM\Column(name="question_txt", type="string", length=500)
  23. */
  24. private $questionTxt;
  25. /**
  26. * @var TextbookSubTopic
  27. *
  28. * @ORM\ManyToOne(targetEntity="TextbookSubTopic", inversedBy="questions")
  29. * @ORM\JoinColumn(name="textbook_subtopic_id", referencedColumnName="id")
  30. */
  31. private $subTopic;
  32. /**
  33. *
  34. * @var ArrayCollection
  35. *
  36. * @ORM\OneToMany(targetEntity="TextbookSubTopicAnswer", mappedBy="question", cascade={"persist", "remove"})
  37. */
  38. private $answers;
  39. /**
  40. * @return string
  41. */
  42. public function getQuestionTxt()
  43. {
  44. return $this->questionTxt;
  45. }
  46. /**
  47. * @return ArrayCollection
  48. */
  49. public function getAnswers()
  50. {
  51. return $this->answers;
  52. }
  53. /**
  54. * @return int
  55. */
  56. public function getId()
  57. {
  58. return $this->id;
  59. }
  60. /**
  61. * @return TextbookSubTopic
  62. */
  63. public function getSubTopic()
  64. {
  65. return $this->subTopic;
  66. }
  67. }