jellyfin/MediaBrowser.Model/Notifications/Notification.cs

97 lines
2.2 KiB
C#
Raw Normal View History

2014-04-27 21:30:12 +02:00
using MediaBrowser.Model.Configuration;
using System;
2014-04-25 22:15:50 +02:00
using System.Collections.Generic;
2013-07-06 23:23:32 +02:00
namespace MediaBrowser.Model.Notifications
{
public class Notification
{
2014-04-25 22:15:50 +02:00
public string Id { get; set; }
2013-07-06 23:23:32 +02:00
2014-04-25 22:15:50 +02:00
public string UserId { get; set; }
2013-07-06 23:23:32 +02: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-27 05:42:05 +02:00
2013-07-06 23:23:32 +02:00
public NotificationLevel Level { get; set; }
public Notification()
{
2014-04-25 22:15:50 +02: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-27 05:42:05 +02: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-27 19:54:43 +02:00
public SendToUserType? SendToUserMode { get; set; }
2014-04-27 21:30:12 +02:00
public List<string> ExcludeUserIds { get; set; }
2014-04-25 22:15:50 +02:00
public NotificationRequest()
{
UserIds = new List<string>();
2013-07-06 23:23:32 +02:00
Date = DateTime.UtcNow;
2014-04-27 05:42:05 +02:00
Variables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
2014-04-27 21:30:12 +02:00
ExcludeUserIds = new List<string>();
2013-07-06 23:23:32 +02:00
}
}
2014-04-27 05:42:05 +02: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; }
2014-04-30 17:07:02 +02:00
public string DefaultDescription { get; set; }
2014-04-27 05:42:05 +02:00
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 23:23:32 +02:00
}