Notification add Date

This commit is contained in:
Glax 2024-12-16 20:03:45 +01:00
parent 1044821147
commit 62876498d0

View File

@ -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;
}