Fix annotations

This commit is contained in:
2025-03-13 19:15:55 +01:00
parent d93c8fdb94
commit d7f21550cd
20 changed files with 3757 additions and 52 deletions

View File

@ -6,15 +6,22 @@ namespace API.Schema;
[PrimaryKey("NotificationId")]
public class Notification(string title, string message = "", NotificationUrgency urgency = NotificationUrgency.Normal, DateTime? date = null)
{
[MaxLength(64)]
[StringLength(64)]
[Required]
public string NotificationId { get; init; } = TokenGen.CreateToken("Notification");
[Required]
public NotificationUrgency Urgency { get; init; } = urgency;
[StringLength(128)]
[Required]
public string Title { get; init; } = title;
[StringLength(512)]
[Required]
public string Message { get; init; } = message;
[Required]
public DateTime Date { get; init; } = date ?? DateTime.UtcNow;
public Notification() : this("") { }