src/Entity/Notification.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NotificationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=NotificationRepository::class)
  7.  */
  8. class Notification
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="notifications")
  18.      */
  19.     private $user;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=Conversation::class, inversedBy="notifications")
  22.      */
  23.     private $conversation;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=GroupSession::class, inversedBy="notifications")
  26.      */
  27.     private $groupSession;
  28.     /**
  29.      * @ORM\Column(type="boolean", nullable=true)
  30.      */
  31.     private $isRead;
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      */
  35.     private $type;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity=ForumTopic::class, inversedBy="notifications")
  38.      */
  39.     private $topic;
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity=Forum::class, inversedBy="notifications")
  42.      */
  43.     private $forum;
  44.     /**
  45.      * @ORM\ManyToOne(targetEntity=Document::class, inversedBy="notifications")
  46.      * @ORM\JoinColumn(name="documentId", nullable=true, referencedColumnName="idDocument")
  47.      */
  48.     private $documentId;
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getUser(): ?User
  54.     {
  55.         return $this->user;
  56.     }
  57.     public function setUser(?User $user): self
  58.     {
  59.         $this->user $user;
  60.         return $this;
  61.     }
  62.     public function getConversation(): ?Conversation
  63.     {
  64.         return $this->conversation;
  65.     }
  66.     public function setConversation(?Conversation $conversation): self
  67.     {
  68.         $this->conversation $conversation;
  69.         return $this;
  70.     }
  71.     public function getGroupSession(): ?GroupSession
  72.     {
  73.         return $this->groupSession;
  74.     }
  75.     public function setGroupSession(?GroupSession $groupSession): self
  76.     {
  77.         $this->groupSession $groupSession;
  78.         return $this;
  79.     }
  80.     public function getIsRead(): ?bool
  81.     {
  82.         return $this->isRead;
  83.     }
  84.     public function setIsRead(?bool $isRead): self
  85.     {
  86.         $this->isRead $isRead;
  87.         return $this;
  88.     }
  89.     public function getType(): ?string
  90.     {
  91.         return $this->type;
  92.     }
  93.     public function setType(?string $type): self
  94.     {
  95.         $this->type $type;
  96.         return $this;
  97.     }
  98.     public function getTopic(): ?ForumTopic
  99.     {
  100.         return $this->topic;
  101.     }
  102.     public function setTopic(?ForumTopic $topic): self
  103.     {
  104.         $this->topic $topic;
  105.         return $this;
  106.     }
  107.     public function getForum(): ?Forum
  108.     {
  109.         return $this->forum;
  110.     }
  111.     public function setForum(?Forum $forum): self
  112.     {
  113.         $this->forum $forum;
  114.         return $this;
  115.     }
  116.     public function getDocumentId(): ?Document
  117.     {
  118.         return $this->documentId;
  119.     }
  120.     public function setDocument(?Document $documentId): self
  121.     {
  122.         $this->documentId $documentId;
  123.         return $this;
  124.     }
  125. }