<?php
namespace App\Entity;
use App\Repository\NotifRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=NotifRepository::class)
*/
class Notif
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="notifs")
* @ORM\JoinColumn(nullable=false)
*/
private $recepient;
/**
* @ORM\Column(type="text")
*/
private $body;
/**
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $read_at;
public function getId(): ?int
{
return $this->id;
}
public function getRecepient(): ?User
{
return $this->recepient;
}
public function setRecepient(?User $recepient): self
{
$this->recepient = $recepient;
return $this;
}
public function getBody(): ?string
{
return $this->body;
}
public function setBody(string $body): self
{
$this->body = $body;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getReadAt(): ?\DateTimeInterface
{
return $this->read_at;
}
public function setReadAt(?\DateTimeInterface $read_at): self
{
$this->read_at = $read_at;
return $this;
}
}