<?phpnamespace App\Entity;use App\Repository\TeacherCommentRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;/** * @ORM\Entity(repositoryClass=TeacherCommentRepository::class) */class TeacherComment{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") * @Groups({"TeacherCommentList"}) */ private $id; /** * @ORM\ManyToOne(targetEntity=Teacher::class, inversedBy="teacherComments") * @Groups({"TeacherSurveyList"}) */ private $teacher; /** * @ORM\ManyToOne(targetEntity=Child::class, inversedBy="teacherComments") */ private $child; /** * @ORM\Column(type="datetime", nullable=true) * @Groups({"TeacherSurveyList"}) */ private $dateAdd; /** * @ORM\Column(type="text", nullable=true) * @Groups({"TeacherCommentList"}) */ private $comment; public function __construct() { $this->dateAdd = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getTeacher(): ?Teacher { return $this->teacher; } public function setTeacher(?Teacher $teacher): self { $this->teacher = $teacher; return $this; } public function getChild(): ?Child { return $this->child; } public function setChild(?Child $child): self { $this->child = $child; return $this; } public function getDateAdd(): ?\DateTimeInterface { return $this->dateAdd; } public function setDateAdd(?\DateTimeInterface $dateAdd): self { $this->dateAdd = $dateAdd; return $this; } public function getComment(): ?string { return $this->comment; } public function setComment(?string $comment): self { $this->comment = $comment; return $this; }}