src/Entity/TeacherSurveyResponse.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TeacherSurveyResponseRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7. * @ORM\Entity(repositoryClass=TeacherSurveyResponseRepository::class)
  8. */
  9. class TeacherSurveyResponse
  10. {
  11. /**
  12. * @ORM\Id
  13. * @ORM\GeneratedValue
  14. * @ORM\Column(type="integer")
  15. * @Groups({"TeacherSurveyList"})
  16. */
  17. private $id;
  18. /**
  19. * @ORM\ManyToOne(targetEntity=Child::class, inversedBy="teacherSurveyResponses")
  20. */
  21. private $child;
  22. /**
  23. * @ORM\ManyToOne(targetEntity=Discipline::class, inversedBy="teacherSurveyResponses")
  24. * @Groups({"TeacherSurveyList"})
  25. */
  26. private $discipline;
  27. /**
  28. * @ORM\ManyToOne(targetEntity=Teacher::class, inversedBy="teacherSurveyResponses")
  29. * @Groups({"TeacherSurveyList"})
  30. */
  31. private $teacher;
  32. /**
  33. * @ORM\Column(type="text", nullable=true)
  34. * @Groups({"TeacherSurveyList"})
  35. */
  36. private $comment;
  37. /**
  38. * @ORM\Column(type="datetime", nullable=true)
  39. */
  40. private $dateFor;
  41. /**
  42. * @ORM\Column(type="datetime", nullable=true)
  43. */
  44. private $dateFrom;
  45. /**
  46. * @ORM\Column(type="datetime", nullable=true)
  47. */
  48. private $dateTo;
  49. /**
  50. * @ORM\Column(type="datetime", nullable=true)
  51. * @Groups({"TeacherSurveyList"})
  52. */
  53. private $createdAt;
  54. /**
  55. * @ORM\Column(type="boolean", nullable=true)
  56. */
  57. private $lastLesson = false;
  58. public function __construct()
  59. {
  60. $this->createdAt = new \DateTime();
  61. }
  62. public function getId(): ?int
  63. {
  64. return $this->id;
  65. }
  66. public function getChild(): ?Child
  67. {
  68. return $this->child;
  69. }
  70. public function setChild(?Child $child): self
  71. {
  72. $this->child = $child;
  73. return $this;
  74. }
  75. public function getDiscipline(): ?Discipline
  76. {
  77. return $this->discipline;
  78. }
  79. public function setDiscipline(?Discipline $discipline): self
  80. {
  81. $this->discipline = $discipline;
  82. return $this;
  83. }
  84. public function getTeacher(): ?Teacher
  85. {
  86. return $this->teacher;
  87. }
  88. public function setTeacher(?Teacher $teacher): self
  89. {
  90. $this->teacher = $teacher;
  91. return $this;
  92. }
  93. public function getComment(): ?string
  94. {
  95. return $this->comment;
  96. }
  97. public function setComment(?string $comment): self
  98. {
  99. $this->comment = $comment;
  100. return $this;
  101. }
  102. public function getDateFor(): ?\DateTimeInterface
  103. {
  104. return $this->dateFor;
  105. }
  106. public function setDateFor(?\DateTimeInterface $dateFor): self
  107. {
  108. $this->dateFor = $dateFor;
  109. return $this;
  110. }
  111. public function getDateFrom(): ?\DateTimeInterface
  112. {
  113. return $this->dateFrom;
  114. }
  115. public function setDateFrom(?\DateTimeInterface $dateFrom): self
  116. {
  117. $this->dateFrom = $dateFrom;
  118. return $this;
  119. }
  120. public function getDateTo(): ?\DateTimeInterface
  121. {
  122. return $this->dateTo;
  123. }
  124. public function setDateTo(?\DateTimeInterface $dateTo): self
  125. {
  126. $this->dateTo = $dateTo;
  127. return $this;
  128. }
  129. public function getCreatedAt(): ?\DateTimeInterface
  130. {
  131. return $this->createdAt;
  132. }
  133. public function setCreatedAt(?\DateTimeInterface $createdAt): self
  134. {
  135. $this->createdAt = $createdAt;
  136. return $this;
  137. }
  138. public function isLastLesson(): bool
  139. {
  140. return $this->lastLesson;
  141. }
  142. public function setLastLesson(bool $lastLesson): void
  143. {
  144. $this->lastLesson = $lastLesson;
  145. }
  146. }