src/Entity/Notification.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NotificationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=NotificationRepository::class)
  7.  */
  8. class Notification
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="notifications")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $user;
  21.     /**
  22.      * @ORM\Column(type="string", length=512)
  23.      */
  24.     private $title;
  25.     /**
  26.      * @ORM\Column(type="datetime")
  27.      */
  28.     private $date;
  29.     /**
  30.      * @ORM\Column(type="boolean")
  31.      */
  32.     private $viewed;
  33.     /**
  34.      * @ORM\Column(type="json", nullable=true)
  35.      */
  36.     private $message = [];
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getUser(): ?User
  42.     {
  43.         return $this->user;
  44.     }
  45.     public function setUser(?User $user): self
  46.     {
  47.         $this->user $user;
  48.         return $this;
  49.     }
  50.     public function getTitle(): ?string
  51.     {
  52.         return $this->title;
  53.     }
  54.     public function setTitle(string $title): self
  55.     {
  56.         $this->title $title;
  57.         return $this;
  58.     }
  59.     public function getDate(): ?\DateTimeInterface
  60.     {
  61.         return $this->date;
  62.     }
  63.     public function setDate(\DateTimeInterface $date): self
  64.     {
  65.         $this->date $date;
  66.         return $this;
  67.     }
  68.     public function getViewed(): ?bool
  69.     {
  70.         return $this->viewed;
  71.     }
  72.     public function setViewed(bool $viewed): self
  73.     {
  74.         $this->viewed $viewed;
  75.         return $this;
  76.     }
  77.     public function getMessage(): ?array
  78.     {
  79.         return $this->message;
  80.     }
  81.     public function setMessage(?array $message): self
  82.     {
  83.         $this->message $message;
  84.         return $this;
  85.     }
  86. }