Add NotificationUrgency.cs

This commit is contained in:
2024-12-16 20:14:28 +01:00
parent 99ddb06d6d
commit e6f8853b49
3 changed files with 11 additions and 3 deletions

View File

@ -4,12 +4,12 @@ using Microsoft.EntityFrameworkCore;
namespace API.Schema;
[PrimaryKey("NotificationId")]
public class Notification(string title, string message = "", byte urgency = 2, DateTime? date = null)
public class Notification(string title, string message = "", NotificationUrgency urgency = NotificationUrgency.Normal, DateTime? date = null)
{
[MaxLength(64)]
public string NotificationId { get; init; } = TokenGen.CreateToken("Notification", 64);
public byte Urgency { get; init; } = urgency;
public NotificationUrgency Urgency { get; init; } = urgency;
public string Title { get; init; } = title;

View File

@ -0,0 +1,8 @@
namespace API.Schema;
public enum NotificationUrgency : byte
{
Low = 1,
Normal = 3,
High = 5
}