<?phpnamespace App\Entity;use App\Repository\UserNotificationEntryRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=UserNotificationEntryRepository::class) */class UserNotificationEntry{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userNotificationEntries") * @ORM\JoinColumn(nullable=false) */ private $user; /** * @ORM\ManyToOne(targetEntity=BlogPostNotification::class) * @ORM\JoinColumn(nullable=false, onDelete="CASCADE") */ private $notification; /** * @ORM\Column(type="boolean") */ private $isRead; /** * @ORM\Column(type="datetime_immutable") */ private $createdAt; /** * @ORM\Column(type="datetime_immutable") */ private $updatedAt; public function __construct() { $this->isRead = false; $this->createdAt = new \DateTimeImmutable(); $this->updatedAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getNotification(): ?BlogPostNotification { return $this->notification; } public function setNotification(?BlogPostNotification $notification): self { $this->notification = $notification; return $this; } public function isIsRead(): ?bool { return $this->isRead; } public function setIsRead(bool $isRead): self { $this->isRead = $isRead; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updatedAt; } public function setUpdatedAt(\DateTimeImmutable $updatedAt): self { $this->updatedAt = $updatedAt; return $this; }}