src/Entity/NotificationReceiver.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NotificationReceiverRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=NotificationReceiverRepository::class)
  7. */
  8. class NotificationReceiver
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\ManyToOne(targetEntity=Notification::class, inversedBy="notificationReceivers")
  18. */
  19. private $notification;
  20. /**
  21. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="notificationReceivers")
  22. */
  23. private $receiver;
  24. /**
  25. * @ORM\Column(type="datetime", nullable=true)
  26. */
  27. private $readAt;
  28. /**
  29. * @ORM\Column(type="array", nullable=true)
  30. */
  31. private $topics = [];
  32. /**
  33. * @ORM\Column(type="datetime", nullable=true)
  34. */
  35. private $createdAt;
  36. /**
  37. * @ORM\Column(type="boolean", nullable=true)
  38. */
  39. private $isRead = false;
  40. public function getId(): ?int
  41. {
  42. return $this->id;
  43. }
  44. public function getNotification(): ?Notification
  45. {
  46. return $this->notification;
  47. }
  48. public function setNotification(?Notification $notification): self
  49. {
  50. $this->notification = $notification;
  51. return $this;
  52. }
  53. public function getReceiver(): ?User
  54. {
  55. return $this->receiver;
  56. }
  57. public function setReceiver(?User $receiver): self
  58. {
  59. $this->receiver = $receiver;
  60. return $this;
  61. }
  62. public function getReadAt(): ?\DateTimeInterface
  63. {
  64. return $this->readAt;
  65. }
  66. public function setReadAt(?\DateTimeInterface $readAt): self
  67. {
  68. $this->readAt = $readAt;
  69. return $this;
  70. }
  71. public function getTopics(): ?array
  72. {
  73. return $this->topics;
  74. }
  75. public function setTopics(?array $topics): self
  76. {
  77. $this->topics = $topics;
  78. return $this;
  79. }
  80. public function getCreatedAt(): ?\DateTimeInterface
  81. {
  82. return $this->createdAt;
  83. }
  84. public function setCreatedAt(?\DateTimeInterface $createdAt): self
  85. {
  86. $this->createdAt = $createdAt;
  87. return $this;
  88. }
  89. public function isIsRead(): ?bool
  90. {
  91. return $this->isRead;
  92. }
  93. public function setIsRead(?bool $isRead): self
  94. {
  95. $this->isRead = $isRead;
  96. return $this;
  97. }
  98. }