mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-18 09:17:52 +02:00
Fix annotations
This commit is contained in:
@ -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("") { }
|
||||
|
Reference in New Issue
Block a user