src/Entity/TeacherComment.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TeacherCommentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7. * @ORM\Entity(repositoryClass=TeacherCommentRepository::class)
  8. */
  9. class TeacherComment
  10. {
  11. /**
  12. * @ORM\Id
  13. * @ORM\GeneratedValue
  14. * @ORM\Column(type="integer")
  15. * @Groups({"TeacherCommentList"})
  16. */
  17. private $id;
  18. /**
  19. * @ORM\ManyToOne(targetEntity=Teacher::class, inversedBy="teacherComments")
  20. * @Groups({"TeacherSurveyList"})
  21. */
  22. private $teacher;
  23. /**
  24. * @ORM\ManyToOne(targetEntity=Child::class, inversedBy="teacherComments")
  25. */
  26. private $child;
  27. /**
  28. * @ORM\Column(type="datetime", nullable=true)
  29. * @Groups({"TeacherSurveyList"})
  30. */
  31. private $dateAdd;
  32. /**
  33. * @ORM\Column(type="text", nullable=true)
  34. * @Groups({"TeacherCommentList"})
  35. */
  36. private $comment;
  37. public function __construct()
  38. {
  39. $this->dateAdd = new \DateTime();
  40. }
  41. public function getId(): ?int
  42. {
  43. return $this->id;
  44. }
  45. public function getTeacher(): ?Teacher
  46. {
  47. return $this->teacher;
  48. }
  49. public function setTeacher(?Teacher $teacher): self
  50. {
  51. $this->teacher = $teacher;
  52. return $this;
  53. }
  54. public function getChild(): ?Child
  55. {
  56. return $this->child;
  57. }
  58. public function setChild(?Child $child): self
  59. {
  60. $this->child = $child;
  61. return $this;
  62. }
  63. public function getDateAdd(): ?\DateTimeInterface
  64. {
  65. return $this->dateAdd;
  66. }
  67. public function setDateAdd(?\DateTimeInterface $dateAdd): self
  68. {
  69. $this->dateAdd = $dateAdd;
  70. return $this;
  71. }
  72. public function getComment(): ?string
  73. {
  74. return $this->comment;
  75. }
  76. public function setComment(?string $comment): self
  77. {
  78. $this->comment = $comment;
  79. return $this;
  80. }
  81. }