<?php
namespace App\Entity\Application;
use App\Repository\Application\NotificationSeenRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="app_notification_seen")
* @ORM\Entity(repositoryClass=NotificationSeenRepository::class)
*/
class NotificationSeen
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Notification::class, inversedBy="notificationSeens")
* @ORM\JoinColumn(nullable=false)
*/
private $notification;
/**
* @ORM\ManyToOne(targetEntity=DeviceToken::class, inversedBy="notificationSeens", cascade={"all"})
* @ORM\JoinColumn(nullable=false)
*/
private $token;
/**
* @ORM\Column(type="datetime")
*/
private $createts;
public function __construct()
{
$this->setCreatets(new \DateTime());
}
public function getId(): ?int
{
return $this->id;
}
public function getNotification(): ?Notification
{
return $this->notification;
}
public function setNotification(?Notification $notification): self
{
$this->notification = $notification;
return $this;
}
public function getToken(): ?DeviceToken
{
return $this->token;
}
public function setToken(?DeviceToken $token): self
{
$this->token = $token;
return $this;
}
public function getCreatets(): ?\DateTimeInterface
{
return $this->createts;
}
public function setCreatets(\DateTimeInterface $createts): self
{
$this->createts = $createts;
return $this;
}
}