jellyfin/MediaBrowser.Model/Notifications/Notification.cs

88 lines
2.0 KiB
C#
Raw Normal View History

2013-07-06 14:23:32 -07:00
using System;
2014-04-25 13:15:50 -07:00
using System.Collections.Generic;
2013-07-06 14:23:32 -07:00
namespace MediaBrowser.Model.Notifications
{
public class Notification
{
2014-04-25 13:15:50 -07:00
public string Id { get; set; }
2013-07-06 14:23:32 -07:00
2014-04-25 13:15:50 -07:00
public string UserId { get; set; }
2013-07-06 14:23:32 -07:00
public DateTime Date { get; set; }
public bool IsRead { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Url { get; set; }
2014-04-26 20:42:05 -07:00
2013-07-06 14:23:32 -07:00
public NotificationLevel Level { get; set; }
public Notification()
{
2014-04-25 13:15:50 -07:00
Date = DateTime.UtcNow;
}
}
public class NotificationRequest
{
public string Name { get; set; }
public string Description { get; set; }
public string Url { get; set; }
public NotificationLevel Level { get; set; }
public List<string> UserIds { get; set; }
public DateTime Date { get; set; }
2014-04-26 20:42:05 -07:00
/// <summary>
/// The corresponding type name used in configuration. Not for display.
/// </summary>
public string NotificationType { get; set; }
public Dictionary<string, string> Variables { get; set; }
2014-04-25 13:15:50 -07:00
public NotificationRequest()
{
UserIds = new List<string>();
2013-07-06 14:23:32 -07:00
Date = DateTime.UtcNow;
2014-04-26 20:42:05 -07:00
Variables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
2013-07-06 14:23:32 -07:00
}
}
2014-04-26 20:42:05 -07:00
public class NotificationTypeInfo
{
public string Type { get; set; }
public string Name { get; set; }
public bool Enabled { get; set; }
public string Category { get; set; }
public bool IsBasedOnUserEvent { get; set; }
public string DefaultTitle { get; set; }
public List<string> Variables { get; set; }
public NotificationTypeInfo()
{
Variables = new List<string>();
}
}
public class NotificationServiceInfo
{
public string Name { get; set; }
public string Id { get; set; }
}
2013-07-06 14:23:32 -07:00
}