<?phpnamespace App\Entity;use App\Repository\GroupSessionMessageRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;/** * @ORM\Entity(repositoryClass=GroupSessionMessageRepository::class) */class GroupSessionMessage{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") * @Groups("post-group-session") */ private $id; /** * @ORM\ManyToOne(targetEntity=User::class, inversedBy="groupSessionMessages") * @Groups("post-group-session") */ private $user; /** * @ORM\ManyToOne(targetEntity=GroupSession::class, inversedBy="groupSessionMessages") * @Groups("post-group-session") */ private $groupSession; /** * @ORM\Column(type="text", nullable=true) * @Groups("post-group-session") */ private $content; /** * @ORM\Column(type="datetime", nullable=true) * @Groups("post-group-session") */ private $createdAt; public function __construct() { $this->createdAt = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getGroupSession(): ?GroupSession { return $this->groupSession; } public function setGroupSession(?GroupSession $groupSession): self { $this->groupSession = $groupSession; return $this; } public function getContent(): ?string { return $this->content; } public function setContent(?string $content): self { $this->content = $content; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(?\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; }}