<?php
namespace App\Entity;
use App\Repository\ParticipantConversationRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=ParticipantConversationRepository::class)
*/
class ParticipantConversation
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups("message")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Conversation::class, inversedBy="participants")
*/
private $conversation;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="participants")
* @Groups("message")
*/
private $user;
public function getId(): ?int
{
return $this->id;
}
public function getConversation(): ?Conversation
{
return $this->conversation;
}
public function setConversation(?Conversation $conversation): self
{
$this->conversation = $conversation;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
}