src/Entity/Notification.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\NotificationRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ApiResource]
  7. #[ORM\Entity(repositoryClassNotificationRepository::class)]
  8. class Notification
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private ?string $title null;
  16.     #[ORM\Column(type'text')]
  17.     private ?string $message null;
  18.     #[ORM\Column(type'datetime'nullabletrue)]
  19.     private ?\DateTimeInterface $createdAt null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $pushNotificationToken null;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getTitle(): ?string
  27.     {
  28.         return $this->title;
  29.     }
  30.     public function setTitle(?string $title): self
  31.     {
  32.         $this->title $title;
  33.         return $this;
  34.     }
  35.     public function getMessage(): ?string
  36.     {
  37.         return $this->message;
  38.     }
  39.     public function setMessage(string $message): self
  40.     {
  41.         $this->message $message;
  42.         return $this;
  43.     }
  44.     public function getCreatedAt(): ?\DateTimeInterface
  45.     {
  46.         return $this->createdAt;
  47.     }
  48.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  49.     {
  50.         $this->createdAt $createdAt;
  51.         return $this;
  52.     }
  53.     public function getPushNotificationToken(): ?string
  54.     {
  55.         return $this->pushNotificationToken;
  56.     }
  57.     public function setPushNotificationToken(?string $pushNotificationToken): self
  58.     {
  59.         $this->pushNotificationToken $pushNotificationToken;
  60.         return $this;
  61.     }
  62. }