src/Bundles/Messenger/Entity/WebpushSubscription.php line 12

Open in your IDE?
  1. <?php
  2. namespace Bundles\Messenger\Entity;
  3. use Bundles\Messenger\Repository\WebpushSubscriptionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Entity\User;
  6. /**
  7. * @ORM\Entity(repositoryClass=WebpushSubscriptionRepository::class)
  8. */
  9. class WebpushSubscription
  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="webpushSubscriptions")
  19. * @ORM\JoinColumn(nullable=false)
  20. */
  21. private $User;
  22. /**
  23. * @ORM\Column(type="string", length=255)
  24. */
  25. private $authToken;
  26. /**
  27. * @ORM\Column(type="string", length=100)
  28. */
  29. private $contentEncoding;
  30. /**
  31. * @ORM\Column(type="text")
  32. */
  33. private $endpoint;
  34. /**
  35. * @ORM\Column(type="string", length=255)
  36. */
  37. private $publicKey;
  38. /**
  39. * @ORM\Column(type="boolean", nullable=true)
  40. */
  41. private $active;
  42. /**
  43. * @ORM\Column(type="datetime")
  44. */
  45. private $date;
  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 getAuthToken(): ?string
  60. {
  61. return $this->authToken;
  62. }
  63. public function setAuthToken(string $authToken): self
  64. {
  65. $this->authToken = $authToken;
  66. return $this;
  67. }
  68. public function getContentEncoding(): ?string
  69. {
  70. return $this->contentEncoding;
  71. }
  72. public function setContentEncoding(string $contentEncoding): self
  73. {
  74. $this->contentEncoding = $contentEncoding;
  75. return $this;
  76. }
  77. public function getEndpoint(): ?string
  78. {
  79. return $this->endpoint;
  80. }
  81. public function setEndpoint(string $endpoint): self
  82. {
  83. $this->endpoint = $endpoint;
  84. return $this;
  85. }
  86. public function getPublicKey(): ?string
  87. {
  88. return $this->publicKey;
  89. }
  90. public function setPublicKey(string $publicKey): self
  91. {
  92. $this->publicKey = $publicKey;
  93. return $this;
  94. }
  95. public function isActive(): ?bool
  96. {
  97. return $this->active;
  98. }
  99. public function setActive(?bool $active): self
  100. {
  101. $this->active = $active;
  102. return $this;
  103. }
  104. public function getDate(): ?\DateTimeInterface
  105. {
  106. return $this->date;
  107. }
  108. public function setDate(\DateTimeInterface $date): self
  109. {
  110. $this->date = $date;
  111. return $this;
  112. }
  113. }