<?php
namespace App\Entity;
use App\Repository\NotificationsSeenRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=NotificationsSeenRepository::class)
*/
class NotificationsSeen
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Notifications::class, inversedBy="notificationsSeens", cascade={"persist"})
* @ORM\JoinColumn(onDelete="CASCADE")
* @ORM\JoinColumn(nullable=false)
*/
private $notifications;
/**
* @ORM\ManyToOne(targetEntity=User::class, cascade={"persist"})
* @ORM\JoinColumn(onDelete="CASCADE")
* @ORM\JoinColumn(nullable=false)
*/
private $user;
/**
* @ORM\Column(type="datetime")
*/
private $seen_at;
public function getId(): ?int
{
return $this->id;
}
public function getNotifications(): ?Notifications
{
return $this->notifications;
}
public function setNotifications(?Notifications $notifications): self
{
$this->notifications = $notifications;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getSeenAt(): ?\DateTimeInterface
{
return $this->seen_at;
}
public function setSeenAt(\DateTimeInterface $seen_at): self
{
$this->seen_at = $seen_at;
return $this;
}
}