mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-21 08:09:49 -05:00
27 lines
655 B
C#
27 lines
655 B
C#
using NStandard;
|
|
|
|
namespace ColorControl.UI;
|
|
|
|
public class NotificationDto
|
|
{
|
|
public long Id { get; }
|
|
public string Message { get; }
|
|
public string Level { get; } = Constants.Info;
|
|
public DateTime? ScheduledAt { get; set; }
|
|
public string? InternalUrl { get; set; }
|
|
public DateTime? ShownAt { get; set; }
|
|
|
|
public NotificationDto(string message, string level = Constants.Info)
|
|
{
|
|
Message = message;
|
|
Level = level;
|
|
Id = Random.Shared.NextInt64();
|
|
}
|
|
|
|
public string Category => Level switch
|
|
{
|
|
Constants.Danger => "Error",
|
|
_ => Level[0].ToUpper() + Level.Substring(1)
|
|
};
|
|
}
|