src/Entity/Application/NotificationSeen.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Application;
  3. use App\Repository\Application\NotificationSeenRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table(name="app_notification_seen")
  7. * @ORM\Entity(repositoryClass=NotificationSeenRepository::class)
  8. */
  9. class NotificationSeen
  10. {
  11. /**
  12. * @ORM\Id
  13. * @ORM\GeneratedValue
  14. * @ORM\Column(type="integer")
  15. */
  16. private $id;
  17. /**
  18. * @ORM\ManyToOne(targetEntity=Notification::class, inversedBy="notificationSeens")
  19. * @ORM\JoinColumn(nullable=false)
  20. */
  21. private $notification;
  22. /**
  23. * @ORM\ManyToOne(targetEntity=DeviceToken::class, inversedBy="notificationSeens", cascade={"all"})
  24. * @ORM\JoinColumn(nullable=false)
  25. */
  26. private $token;
  27. /**
  28. * @ORM\Column(type="datetime")
  29. */
  30. private $createts;
  31. public function __construct()
  32. {
  33. $this->setCreatets(new \DateTime());
  34. }
  35. public function getId(): ?int
  36. {
  37. return $this->id;
  38. }
  39. public function getNotification(): ?Notification
  40. {
  41. return $this->notification;
  42. }
  43. public function setNotification(?Notification $notification): self
  44. {
  45. $this->notification = $notification;
  46. return $this;
  47. }
  48. public function getToken(): ?DeviceToken
  49. {
  50. return $this->token;
  51. }
  52. public function setToken(?DeviceToken $token): self
  53. {
  54. $this->token = $token;
  55. return $this;
  56. }
  57. public function getCreatets(): ?\DateTimeInterface
  58. {
  59. return $this->createts;
  60. }
  61. public function setCreatets(\DateTimeInterface $createts): self
  62. {
  63. $this->createts = $createts;
  64. return $this;
  65. }
  66. }