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

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core\Textbook;
  3. use App\Entity\User\User;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Table('textbook_session_flag')]
  6. #[ORM\Entity]
  7. class TextbookSessionFlag
  8. {
  9. /**
  10. * @var int
  11. */
  12. #[ORM\Id]
  13. #[ORM\Column(name: 'id', type: 'integer')]
  14. #[ORM\GeneratedValue(strategy: 'AUTO')]
  15. private $id;
  16. /**
  17. * @var User
  18. */
  19. #[ORM\JoinColumn(name: 'student', nullable: false)]
  20. #[ORM\ManyToOne(targetEntity: User::class)]
  21. private $student;
  22. /**
  23. * @var TextbookSession
  24. */
  25. #[ORM\JoinColumn(name: 'textbook_session', nullable: false)]
  26. #[ORM\ManyToOne(targetEntity: TextbookSession::class)]
  27. private $textbookSession;
  28. /**
  29. * @var TextbookElement
  30. */
  31. #[ORM\JoinColumn(name: 'textbook_element', nullable: false)]
  32. #[ORM\ManyToOne(targetEntity: TextbookElement::class)]
  33. private $textbookElement;
  34. /**
  35. * @var string
  36. */
  37. #[ORM\Column(type: 'text', nullable: true)]
  38. private $message;
  39. public function __construct($student, $textbookSession, $textbookElement, $message)
  40. {
  41. $this->student = $student;
  42. $this->textbookSession = $textbookSession;
  43. $this->textbookElement = $textbookElement;
  44. $this->message = $message;
  45. }
  46. public function getId(): int
  47. {
  48. return $this->id;
  49. }
  50. public function getTextbookElement(): TextbookElement
  51. {
  52. return $this->textbookElement;
  53. }
  54. public function getMessage(): ?string
  55. {
  56. return $this->message;
  57. }
  58. }