src/CoreBundle/Entity/TextbookSessionFlag.php line 13

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("textbook_session_flag")
  7. * @ORM\Entity
  8. */
  9. class TextbookSessionFlag
  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 TextbookElement
  35. *
  36. * @ORM\ManyToOne(targetEntity="CoreBundle\Entity\TextbookElement")
  37. * @ORM\JoinColumn(name="textbook_element", nullable=false)
  38. */
  39. private $textbookElement;
  40. /**
  41. * @var string
  42. *
  43. * @ORM\Column(type="text", nullable=true)
  44. */
  45. private $message;
  46. public function __construct($student, $textbookSession, $textbookElement, $message)
  47. {
  48. $this->student = $student;
  49. $this->textbookSession = $textbookSession;
  50. $this->textbookElement = $textbookElement;
  51. $this->message = $message;
  52. }
  53. public function getId(): int
  54. {
  55. return $this->id;
  56. }
  57. public function getTextbookElement(): TextbookElement
  58. {
  59. return $this->textbookElement;
  60. }
  61. public function getMessage(): ?string
  62. {
  63. return $this->message;
  64. }
  65. }