src/Entity/PushSubscription.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PushSubscriptionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=PushSubscriptionRepository::class)
  7. */
  8. class PushSubscription
  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="pushSubscriptions")
  18. * @ORM\JoinColumn(nullable=false)
  19. */
  20. private $user;
  21. /**
  22. * @ORM\Column(type="text")
  23. */
  24. private $endpoint;
  25. /**
  26. * @ORM\Column(type="text")
  27. */
  28. private $p256dh;
  29. /**
  30. * @ORM\Column(type="text")
  31. */
  32. private $auth;
  33. /**
  34. * @ORM\Column(type="string", length=255)
  35. */
  36. private $content_encoding;
  37. /**
  38. * @ORM\Column(type="datetime")
  39. */
  40. private $created_at;
  41. /**
  42. * @ORM\Column(type="datetime", nullable=true)
  43. */
  44. private $last_used_at;
  45. public function getId(): ?int
  46. {
  47. return $this->id;
  48. }
  49. public function getUser(): ?User
  50. {
  51. return $this->user;
  52. }
  53. public function setUser(?User $user): self
  54. {
  55. $this->user = $user;
  56. return $this;
  57. }
  58. public function getEndpoint(): ?string
  59. {
  60. return $this->endpoint;
  61. }
  62. public function setEndpoint(string $endpoint): self
  63. {
  64. $this->endpoint = $endpoint;
  65. return $this;
  66. }
  67. public function getP256dh(): ?string
  68. {
  69. return $this->p256dh;
  70. }
  71. public function setP256dh(string $p256dh): self
  72. {
  73. $this->p256dh = $p256dh;
  74. return $this;
  75. }
  76. public function getAuth(): ?string
  77. {
  78. return $this->auth;
  79. }
  80. public function setAuth(string $auth): self
  81. {
  82. $this->auth = $auth;
  83. return $this;
  84. }
  85. public function getContentEncoding(): ?string
  86. {
  87. return $this->content_encoding;
  88. }
  89. public function setContentEncoding(string $content_encoding): self
  90. {
  91. $this->content_encoding = $content_encoding;
  92. return $this;
  93. }
  94. public function getCreatedAt(): ?\DateTimeInterface
  95. {
  96. return $this->created_at;
  97. }
  98. public function setCreatedAt(\DateTimeInterface $created_at): self
  99. {
  100. $this->created_at = $created_at;
  101. return $this;
  102. }
  103. public function getLastUsedAt(): ?\DateTimeInterface
  104. {
  105. return $this->last_used_at;
  106. }
  107. public function setLastUsedAt(?\DateTimeInterface $last_used_at): self
  108. {
  109. $this->last_used_at = $last_used_at;
  110. return $this;
  111. }
  112. }