src/Entity/NotificationsSeen.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NotificationsSeenRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=NotificationsSeenRepository::class)
  7.  */
  8. class NotificationsSeen
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Notifications::class, inversedBy="notificationsSeens", cascade={"persist"})
  18.      * @ORM\JoinColumn(onDelete="CASCADE")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $notifications;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=User::class, cascade={"persist"})
  24.      * @ORM\JoinColumn(onDelete="CASCADE")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $user;
  28.     /**
  29.      * @ORM\Column(type="datetime")
  30.      */
  31.     private $seen_at;
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getNotifications(): ?Notifications
  37.     {
  38.         return $this->notifications;
  39.     }
  40.     public function setNotifications(?Notifications $notifications): self
  41.     {
  42.         $this->notifications $notifications;
  43.         return $this;
  44.     }
  45.     public function getUser(): ?User
  46.     {
  47.         return $this->user;
  48.     }
  49.     public function setUser(?User $user): self
  50.     {
  51.         $this->user $user;
  52.         return $this;
  53.     }
  54.     public function getSeenAt(): ?\DateTimeInterface
  55.     {
  56.         return $this->seen_at;
  57.     }
  58.     public function setSeenAt(\DateTimeInterface $seen_at): self
  59.     {
  60.         $this->seen_at $seen_at;
  61.         return $this;
  62.     }
  63. }