src/Entity/Chat/ChatNotification.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Chat;
  3. use App\Entity\Account\User;
  4. use App\Repository\Chat\ChatNotificationRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use DrosalysWeb\ObjectExtensions\Timestamp\Model\TimestampInterface;
  7. use DrosalysWeb\ObjectExtensions\Timestamp\Model\TimestampTrait;
  8. use Symfony\Component\Serializer\Annotation as Serial;
  9. #[ORM\Entity(repositoryClassChatNotificationRepository::class)]
  10. class ChatNotification implements TimestampInterface
  11. {
  12.     use TimestampTrait;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column(type'integer')]
  16.     #[Serial\Groups(['ChatNotification'])]
  17.     private ?int $id null;
  18.     #[ORM\Column(type'integer')]
  19.     #[Serial\Groups(['ChatNotification'])]
  20.     private ?int $type null;
  21.     #[ORM\Column(type'datetime')]
  22.     #[Serial\Groups(['ChatNotification'])]
  23.     protected $createdAt;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     #[Serial\Groups(['ChatNotification'])]
  26.     private ?string $link null;
  27.     #[ORM\Column(type'text')]
  28.     #[Serial\Groups(['ChatNotification'])]
  29.     private ?string $content null;
  30.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'chatNotifications')]
  31.     #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  32.     #[Serial\Groups(['ChatNotification'])]
  33.     private ?User $user null;
  34.     #[ORM\Column(type'boolean')]
  35.     #[Serial\Groups(['ChatNotification'])]
  36.     private ?bool $hasBeenSeen null;
  37.     #[ORM\ManyToOne(targetEntityMessage::class, inversedBy'chatNotifications')]
  38.     #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  39.     #[Serial\Groups(['ChatNotification'])]
  40.     private ?Message $message null;
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getType(): ?int
  46.     {
  47.         return $this->type;
  48.     }
  49.     public function setType(int $type): self
  50.     {
  51.         $this->type $type;
  52.         return $this;
  53.     }
  54.     public function getLink(): ?string
  55.     {
  56.         return $this->link;
  57.     }
  58.     public function setLink(string $link): self
  59.     {
  60.         $this->link $link;
  61.         return $this;
  62.     }
  63.     public function getContent(): ?string
  64.     {
  65.         return $this->content;
  66.     }
  67.     public function setContent(string $content): self
  68.     {
  69.         $this->content $content;
  70.         return $this;
  71.     }
  72.     public function getUser(): ?User
  73.     {
  74.         return $this->user;
  75.     }
  76.     public function setUser(?User $user): self
  77.     {
  78.         $this->user $user;
  79.         return $this;
  80.     }
  81.     public function getHasBeenSeen(): ?bool
  82.     {
  83.         return $this->hasBeenSeen;
  84.     }
  85.     public function setHasBeenSeen(bool $hasBeenSeen): self
  86.     {
  87.         $this->hasBeenSeen $hasBeenSeen;
  88.         return $this;
  89.     }
  90.     public function getMessage(): ?Message
  91.     {
  92.         return $this->message;
  93.     }
  94.     public function setMessage(?Message $message): self
  95.     {
  96.         $this->message $message;
  97.         return $this;
  98.     }
  99. }