src/Entity/Core/Textbook/TextbookSessionRead.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core\Textbook;
  3. use App\Entity\User\User;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Table(name: 'textbook_session_read')]
  7. #[ORM\Entity(repositoryClass: TextbookSessionReadRepository::class)]
  8. class TextbookSessionRead
  9. {
  10. /**
  11. * @var int
  12. */
  13. #[ORM\Id]
  14. #[ORM\Column(name: 'id', type: 'integer')]
  15. #[ORM\GeneratedValue(strategy: 'AUTO')]
  16. private $id;
  17. /**
  18. * @var User
  19. */
  20. #[ORM\JoinColumn(name: 'student', nullable: false)]
  21. #[ORM\ManyToOne(targetEntity: User::class)]
  22. private $student;
  23. /**
  24. * @var TextbookSession
  25. */
  26. #[ORM\JoinColumn(name: 'textbook_session', nullable: false)]
  27. #[ORM\ManyToOne(targetEntity: TextbookSession::class)]
  28. private $textbookSession;
  29. /**
  30. * @var TextbookSubTopic
  31. */
  32. #[ORM\JoinColumn(name: 'textbook_sub_topic', nullable: false)]
  33. #[ORM\ManyToOne(targetEntity: TextbookSubTopic::class)]
  34. private $textbookSubTopic;
  35. /**
  36. * @var bool
  37. */
  38. #[ORM\Column(name: 'is_valid', type: 'boolean', nullable: true, options: ['default' => true])]
  39. private $isValid = true;
  40. /**
  41. * @var DateTime
  42. */
  43. #[ORM\Column(name: 'archived_at', type: 'datetime', nullable: true)]
  44. private $archivedAt;
  45. public function getId(): int
  46. {
  47. return $this->id;
  48. }
  49. public function setId(int $id): void
  50. {
  51. $this->id = $id;
  52. }
  53. public function getStudent(): User
  54. {
  55. return $this->student;
  56. }
  57. public function setStudent(User $student): void
  58. {
  59. $this->student = $student;
  60. }
  61. public function getTextbookSession(): TextbookSession
  62. {
  63. return $this->textbookSession;
  64. }
  65. public function setTextbookSession(TextbookSession $textbookSession): void
  66. {
  67. $this->textbookSession = $textbookSession;
  68. }
  69. public function getTextbookSubTopic(): TextbookSubTopic
  70. {
  71. return $this->textbookSubTopic;
  72. }
  73. public function setTextbookSubTopic(TextbookSubTopic $textbookSubTopic): void
  74. {
  75. $this->textbookSubTopic = $textbookSubTopic;
  76. }
  77. public function isValid(): bool
  78. {
  79. return $this->isValid;
  80. }
  81. public function setIsValid(bool $isValid): void
  82. {
  83. $this->isValid = $isValid;
  84. }
  85. public function getArchivedAt(): ?DateTime
  86. {
  87. return $this->archivedAt;
  88. }
  89. public function setArchivedAt(DateTime $archivedAt): void
  90. {
  91. $this->archivedAt = $archivedAt;
  92. }
  93. }