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