<?php
namespace App\Entity;
use App\Repository\ParticipantRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ParticipantRepository::class)]
class Participant
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'participations')]
private $user;
#[ORM\Column(type: 'datetime', nullable: true)]
private $messageReadedAt;
#[ORM\ManyToOne(targetEntity: Conversation::class, inversedBy: 'participants')]
private $conversation;
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 getMessageReadedAt(): ?\DateTimeInterface
{
return $this->messageReadedAt;
}
public function setMessageReadedAt(?\DateTimeInterface $messageReadedAt): self
{
$this->messageReadedAt = $messageReadedAt;
return $this;
}
public function getConversation(): ?Conversation
{
return $this->conversation;
}
public function setConversation(?Conversation $conversation): self
{
$this->conversation = $conversation;
return $this;
}
}