<?php
namespace App\Entity;
use App\Repository\NotificationRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=NotificationRepository::class)
*/
class Notification
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="notifications")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity=Conversation::class, inversedBy="notifications")
*/
private $conversation;
/**
* @ORM\ManyToOne(targetEntity=GroupSession::class, inversedBy="notifications")
*/
private $groupSession;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isRead;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $type;
/**
* @ORM\ManyToOne(targetEntity=ForumTopic::class, inversedBy="notifications")
*/
private $topic;
/**
* @ORM\ManyToOne(targetEntity=Forum::class, inversedBy="notifications")
*/
private $forum;
/**
* @ORM\ManyToOne(targetEntity=Document::class, inversedBy="notifications")
* @ORM\JoinColumn(name="documentId", nullable=true, referencedColumnName="idDocument")
*/
private $documentId;
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 getConversation(): ?Conversation
{
return $this->conversation;
}
public function setConversation(?Conversation $conversation): self
{
$this->conversation = $conversation;
return $this;
}
public function getGroupSession(): ?GroupSession
{
return $this->groupSession;
}
public function setGroupSession(?GroupSession $groupSession): self
{
$this->groupSession = $groupSession;
return $this;
}
public function getIsRead(): ?bool
{
return $this->isRead;
}
public function setIsRead(?bool $isRead): self
{
$this->isRead = $isRead;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getTopic(): ?ForumTopic
{
return $this->topic;
}
public function setTopic(?ForumTopic $topic): self
{
$this->topic = $topic;
return $this;
}
public function getForum(): ?Forum
{
return $this->forum;
}
public function setForum(?Forum $forum): self
{
$this->forum = $forum;
return $this;
}
public function getDocumentId(): ?Document
{
return $this->documentId;
}
public function setDocument(?Document $documentId): self
{
$this->documentId = $documentId;
return $this;
}
}