<?php
namespace App\Entity;
use App\Repository\CommentaireEvenementRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
#[ORM\Entity(repositoryClass: CommentaireEvenementRepository::class)]
class CommentaireEvenement
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'commentaires')]
private ?Evenement $evenement = null;
#[ORM\ManyToOne(inversedBy: 'commentaires')]
private ?User $user = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $commentaire = null;
#[Gedmo\Timestampable(on: 'create')]
#[ORM\Column(type: 'datetime')]
private $date;
public function getId(): ?int
{
return $this->id;
}
public function getEvenement(): ?Evenement
{
return $this->evenement;
}
public function setEvenement(?Evenement $evenement): self
{
$this->evenement = $evenement;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(string $commentaire): self
{
$this->commentaire = $commentaire;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
}