Tranga/API/Schema/Notification.cs
2024-12-16 18:02:14 +01:00

17 lines
483 B
C#

using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace API.Schema;
[PrimaryKey("AltTitleId")]
public class Notification(string title, string message = "", byte urgency = 2)
{
[MaxLength(64)]
public string NotificationId { get; init; } = TokenGen.CreateToken("Notification", 64);
public byte Urgency { get; init; } = urgency;
public string Title { get; init; } = title;
public string Message { get; init; } = message;
}