<?phpnamespace App\Entity;use App\Repository\MessageRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=MessageRepository::class) */class Message{ /** * @ORM\ManyToOne(targetEntity="\App\Entity\AppUser") */ private $user; /** * @ORM\ManyToOne(targetEntity="\App\Entity\Conversation") */ private $conversation; /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="text", nullable=true) */ private $contenu; /** * @ORM\Column(type="datetime", nullable=true) */ private $laDate; public function __construct() { $this->laDate = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getContenu(): ?string { return $this->contenu; } public function setContenu(?string $contenu): self { $this->contenu = $contenu; return $this; } public function getLaDate(): ?\DateTimeInterface { return $this->laDate; } public function setLaDate(?\DateTimeInterface $laDate): self { $this->laDate = $laDate; return $this; } public function getUser(): ?AppUser { return $this->user; } public function setUser(?AppUser $user): self { $this->user = $user; return $this; } public function getConversation(): ?Conversation { return $this->conversation; } public function setConversation(?Conversation $conversation): self { $this->conversation = $conversation; return $this; }}