From 62876498d0ab57ffb499af40ab7973add74ef5a8 Mon Sep 17 00:00:00 2001 From: Glax Date: Mon, 16 Dec 2024 20:03:45 +0100 Subject: [PATCH] Notification add Date --- API/Schema/Notification.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API/Schema/Notification.cs b/API/Schema/Notification.cs index a5de123..13a1e30 100644 --- a/API/Schema/Notification.cs +++ b/API/Schema/Notification.cs @@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore; namespace API.Schema; [PrimaryKey("NotificationId")] -public class Notification(string title, string message = "", byte urgency = 2) +public class Notification(string title, string message = "", byte urgency = 2, DateTime? date = null) { [MaxLength(64)] public string NotificationId { get; init; } = TokenGen.CreateToken("Notification", 64); @@ -14,4 +14,6 @@ public class Notification(string title, string message = "", byte urgency = 2) public string Title { get; init; } = title; public string Message { get; init; } = message; + + public DateTime? Date { get; init; } = date ?? DateTime.UtcNow; } \ No newline at end of file