src/Entity/UserNotifications.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\UserNotificationsRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use JMS\Serializer\Annotation\Groups;
  8. #[ORM\HasLifecycleCallbacks()]
  9. #[ORM\Entity(repositoryClassUserNotificationsRepository::class)]
  10. class UserNotifications
  11. {
  12.     use Timestampable;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     #[Groups(["getUserNotification"])]
  17.     private ?int $id null;
  18.     #[ORM\Column(length255)]
  19.     #[Groups(["getUserNotification"])]
  20.     private ?string $title null;
  21.     #[ORM\Column(typeTypes::TEXT)]
  22.     #[Groups(["getUserNotification"])]
  23.     private ?string $content null;
  24.     #[ORM\ManyToOne(inversedBy'userNotifications')]
  25.     #[Groups(["getUserNotification"])]
  26.     private ?User $user null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     #[Groups(["getUserNotification"])]
  29.     private ?string $expoPushToken null;
  30.     #[ORM\Column(length255)]
  31.     #[Groups(["getUserNotification"])]
  32.     private ?string $type null;
  33.     #[ORM\Column(nullabletrue)]
  34.     #[Groups(["getUserNotification"])]
  35.     private ?int $dataId null;
  36.     #[ORM\Column(nullabletrue)]
  37.     private ?bool $isRed null;
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getTitle(): ?string
  43.     {
  44.         return $this->title;
  45.     }
  46.     public function setTitle(string $title): static
  47.     {
  48.         $this->title $title;
  49.         return $this;
  50.     }
  51.     public function getContent(): ?string
  52.     {
  53.         return $this->content;
  54.     }
  55.     public function setContent(string $content): static
  56.     {
  57.         $this->content $content;
  58.         return $this;
  59.     }
  60.     public function getUser(): ?User
  61.     {
  62.         return $this->user;
  63.     }
  64.     public function setUser(?User $user): static
  65.     {
  66.         $this->user $user;
  67.         return $this;
  68.     }
  69.     public function getExpoPushToken(): ?string
  70.     {
  71.         return $this->expoPushToken;
  72.     }
  73.     public function setExpoPushToken(?string $expoPushToken): static
  74.     {
  75.         $this->expoPushToken $expoPushToken;
  76.         return $this;
  77.     }
  78.     public function getType(): ?string
  79.     {
  80.         return $this->type;
  81.     }
  82.     public function setType(string $type): static
  83.     {
  84.         $this->type $type;
  85.         return $this;
  86.     }
  87.     public function getDataId(): ?int
  88.     {
  89.         return $this->dataId;
  90.     }
  91.     public function setDataId(?int $dataId): static
  92.     {
  93.         $this->dataId $dataId;
  94.         return $this;
  95.     }
  96.     public function isIsRed(): ?bool
  97.     {
  98.         return $this->isRed;
  99.     }
  100.     public function setIsRed(?bool $isRed): static
  101.     {
  102.         $this->isRed $isRed;
  103.         return $this;
  104.     }
  105. }