src/Entity/PushSubscription.php line 12

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