using System; using System.Text.Json.Serialization; namespace AsbCloudApp.Data; /// /// DTO уведомления /// public class NotificationDto : IId { /// /// Id уведомления /// public int Id { get; set; } /// /// Id получателя уведомления /// public int IdUser { get; set; } /// /// Id категории уведомления /// public int IdNotificationCategory { get; set; } /// /// Заголовок уведомления /// public string Title { get; set; } = null!; /// /// Сообщение уведомления /// public string Message { get; set; } = null!; /// /// Время жизни уведомления /// public TimeSpan TimeToLife { get; set; } /// /// Дата отправки уведомления /// public DateTime? SentDate { get; set; } /// /// Состояния уведомления /// public NotificationState NotificationState { get; set; } /// /// Способ доставки уведомления /// public NotificationTransport NotificationTransport { get; set; } /// /// DTO категории уведомления /// public NotificationCategoryDto NotificationCategory { get; set; } = null!; } /// /// Состояние уведомления /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum NotificationState { /// /// Зарегистрировано /// Registered = 1, /// /// Отправлено /// Sent = 2, /// /// Прочитано /// Read = 3, } /// /// Способ отправки уведомления /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum NotificationTransport { /// /// SignalR /// SignalR = 1 }