src/CoreBundle/Entity/TextbookSessionRead.php line 12

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use UserBundle\Entity\User;
  5. /**
  6. * @ORM\Table(name="textbook_session_read")
  7. * @ORM\Entity(repositoryClass="CoreBundle\Entity\TextbookSessionReadRepository")
  8. */
  9. class TextbookSessionRead
  10. {
  11. /**
  12. * @var int
  13. *
  14. * @ORM\Id
  15. * @ORM\Column(name="id", type="integer")
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. */
  18. private $id;
  19. /**
  20. * @var User
  21. *
  22. * @ORM\ManyToOne(targetEntity="UserBundle\Entity\User")
  23. * @ORM\JoinColumn(name="student", nullable=false)
  24. */
  25. private $student;
  26. /**
  27. * @var TextbookSession
  28. *
  29. * @ORM\ManyToOne(targetEntity="CoreBundle\Entity\TextbookSession")
  30. * @ORM\JoinColumn(name="textbook_session", nullable=false)
  31. */
  32. private $textbookSession;
  33. /**
  34. * @var TextbookSubTopic
  35. *
  36. * @ORM\ManyToOne(targetEntity="CoreBundle\Entity\TextbookSubTopic")
  37. * @ORM\JoinColumn(name="textbook_sub_topic", nullable=false)
  38. */
  39. private $textbookSubTopic;
  40. /**
  41. * @var bool
  42. *
  43. * @ORM\Column(name="is_valid", type="boolean", nullable=true, options={"default":true})
  44. */
  45. private $isValid = true;
  46. /**
  47. * @var \DateTime
  48. *
  49. * @ORM\Column(name="archived_at", type="datetime", nullable=true)
  50. */
  51. private $archivedAt;
  52. /**
  53. * @return int
  54. */
  55. public function getId(): int
  56. {
  57. return $this->id;
  58. }
  59. /**
  60. * @param int $id
  61. */
  62. public function setId(int $id): void
  63. {
  64. $this->id = $id;
  65. }
  66. /**
  67. * @return User
  68. */
  69. public function getStudent(): User
  70. {
  71. return $this->student;
  72. }
  73. /**
  74. * @param User $student
  75. */
  76. public function setStudent(User $student): void
  77. {
  78. $this->student = $student;
  79. }
  80. /**
  81. * @return TextbookSession
  82. */
  83. public function getTextbookSession(): TextbookSession
  84. {
  85. return $this->textbookSession;
  86. }
  87. /**
  88. * @param TextbookSession $textbookSession
  89. */
  90. public function setTextbookSession(TextbookSession $textbookSession): void
  91. {
  92. $this->textbookSession = $textbookSession;
  93. }
  94. /**
  95. * @return TextbookSubTopic
  96. */
  97. public function getTextbookSubTopic(): TextbookSubTopic
  98. {
  99. return $this->textbookSubTopic;
  100. }
  101. /**
  102. * @param TextbookSubTopic $textbookSubTopic
  103. */
  104. public function setTextbookSubTopic(TextbookSubTopic $textbookSubTopic): void
  105. {
  106. $this->textbookSubTopic = $textbookSubTopic;
  107. }
  108. /**
  109. * @return bool
  110. */
  111. public function isValid(): bool
  112. {
  113. return $this->isValid;
  114. }
  115. /**
  116. * @param bool $isValid
  117. */
  118. public function setIsValid(bool $isValid): void
  119. {
  120. $this->isValid = $isValid;
  121. }
  122. /**
  123. * @return \DateTime|null
  124. */
  125. public function getArchivedAt(): ?\DateTime
  126. {
  127. return $this->archivedAt;
  128. }
  129. /**
  130. * @param \DateTime $archivedAt
  131. */
  132. public function setArchivedAt(\DateTime $archivedAt): void
  133. {
  134. $this->archivedAt = $archivedAt;
  135. }
  136. }