This commit is contained in:
2024-12-16 17:58:25 +01:00
parent b9eecd3afd
commit 3ee3a07565
2 changed files with 3 additions and 10 deletions

View File

@ -4,21 +4,14 @@ using Microsoft.EntityFrameworkCore;
namespace API.Schema;
[PrimaryKey("AltTitleId")]
public class Notification(string title, string message = "", Notification.NotificationUrgency notificationUrgency = Notification.NotificationUrgency.Normal)
public class Notification(string title, string message = "", byte urgency = 2)
{
[MaxLength(64)]
public string NotificationId { get; init; } = TokenGen.CreateToken("Notification", 64);
public NotificationUrgency Urgency { get; init; } = notificationUrgency;
public byte Urgency { get; init; } = urgency;
public string Title { get; init; } = title;
public string Message { get; init; } = message;
public enum NotificationUrgency : byte
{
Low = 0,
Normal = 1,
High = 3
}
}