src/Entity/Core/Textbook/Textbook.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core\Textbook;
  3. use App\Entity\Core\Classroom\ClassroomType;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Table('textbook')]
  8. #[ORM\Entity(repositoryClass: TextbookRepository::class)]
  9. class Textbook
  10. {
  11. /**
  12. * @var int
  13. */
  14. #[ORM\Column(name: 'id', type: 'integer')]
  15. #[ORM\Id]
  16. #[ORM\GeneratedValue(strategy: 'AUTO')]
  17. private int $id;
  18. /**
  19. * @var string
  20. */
  21. #[ORM\Column(name: 'name', type: 'string', length: 255)]
  22. private string $name;
  23. /**
  24. * @var string
  25. */
  26. #[ORM\Column(name: 'display_name', type: 'string', length: 255)]
  27. private string $displayName='';
  28. /**
  29. * @var ClassroomType
  30. */
  31. #[ORM\JoinTable(name: 'relation_textbook_classroom_type')]
  32. #[ORM\ManyToMany(targetEntity: ClassroomType::class)]
  33. private $classroomTypes;
  34. /**
  35. * @var int
  36. */
  37. #[ORM\Column(name: 'order', type: 'integer', nullable: true)]
  38. private int $order;
  39. /**
  40. * @var string
  41. */
  42. #[ORM\Column(name: 'front_page_title', type: 'string', options: ['default' => ''])]
  43. private string $frontPageTitle;
  44. /**
  45. * @var string
  46. */
  47. #[ORM\Column(name: 'front_page_subtitle', type: 'string', options: ['default' => ''])]
  48. private string $frontPageSubtitle;
  49. /**
  50. * @var string
  51. */
  52. #[ORM\Column(name: 'front_page_authors', type: 'string', options: ['default' => ''])]
  53. private string $frontPageAuthors;
  54. /**
  55. * @var string
  56. */
  57. #[ORM\Column(name: 'front_page_message_teacher', type: 'string', options: ['default' => ''])]
  58. private string $frontPageMessageTeacher;
  59. /**
  60. * @var string
  61. */
  62. #[ORM\Column(name: 'front_page_message_student', type: 'string', options: ['default' => ''])]
  63. private string $frontPageMessageStudent;
  64. /**
  65. * @var string
  66. */
  67. #[ORM\Column(name: 'front_page_image', type: 'string', options: ['default' => ''])]
  68. private string $frontPageImage;
  69. /**
  70. * @var string
  71. */
  72. #[ORM\Column(name: 'front_page_color', type: 'string', options: ['default' => '#FFFFFF'])]
  73. private string $frontPageColor;
  74. private function __construct()
  75. {
  76. $this->classroomTypes = new ArrayCollection();
  77. }
  78. public function getDisplayName(): string
  79. {
  80. return $this->displayName;
  81. }
  82. public function getClassroomTypes(): Collection
  83. {
  84. return $this->classroomTypes;
  85. }
  86. public function getOrder(): int
  87. {
  88. return $this->order;
  89. }
  90. public function getName(): string
  91. {
  92. return $this->name;
  93. }
  94. public function getFrontPageTitle(): string
  95. {
  96. return $this->frontPageTitle;
  97. }
  98. public function getFrontPageSubtitle(): string
  99. {
  100. return $this->frontPageSubtitle;
  101. }
  102. public function getFrontPageAuthors(): string
  103. {
  104. return $this->frontPageAuthors;
  105. }
  106. public function getFrontPageImage(): string
  107. {
  108. return $this->frontPageImage;
  109. }
  110. public function getFrontPageColor(): string
  111. {
  112. return $this->frontPageColor;
  113. }
  114. public function getFrontPageMessageTeacher(): string
  115. {
  116. return $this->frontPageMessageTeacher;
  117. }
  118. public function getFrontPageMessageStudent(): string
  119. {
  120. return $this->frontPageMessageStudent;
  121. }
  122. }