Notification.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using MediaBrowser.Model.Configuration;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace MediaBrowser.Model.Notifications
  5. {
  6. public class Notification
  7. {
  8. public string Id { get; set; }
  9. public string UserId { get; set; }
  10. public DateTime Date { get; set; }
  11. public bool IsRead { get; set; }
  12. public string Name { get; set; }
  13. public string Description { get; set; }
  14. public string Url { get; set; }
  15. public NotificationLevel Level { get; set; }
  16. public Notification()
  17. {
  18. Date = DateTime.UtcNow;
  19. }
  20. }
  21. public class NotificationRequest
  22. {
  23. public string Name { get; set; }
  24. public string Description { get; set; }
  25. public string Url { get; set; }
  26. public NotificationLevel Level { get; set; }
  27. public List<string> UserIds { get; set; }
  28. public DateTime Date { get; set; }
  29. /// <summary>
  30. /// The corresponding type name used in configuration. Not for display.
  31. /// </summary>
  32. public string NotificationType { get; set; }
  33. public Dictionary<string, string> Variables { get; set; }
  34. public SendToUserType? SendToUserMode { get; set; }
  35. public List<string> ExcludeUserIds { get; set; }
  36. public NotificationRequest()
  37. {
  38. UserIds = new List<string>();
  39. Date = DateTime.UtcNow;
  40. Variables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
  41. ExcludeUserIds = new List<string>();
  42. }
  43. }
  44. public class NotificationTypeInfo
  45. {
  46. public string Type { get; set; }
  47. public string Name { get; set; }
  48. public bool Enabled { get; set; }
  49. public string Category { get; set; }
  50. public bool IsBasedOnUserEvent { get; set; }
  51. public string DefaultTitle { get; set; }
  52. public string DefaultDescription { get; set; }
  53. public List<string> Variables { get; set; }
  54. public NotificationTypeInfo()
  55. {
  56. Variables = new List<string>();
  57. }
  58. }
  59. public class NotificationServiceInfo
  60. {
  61. public string Name { get; set; }
  62. public string Id { get; set; }
  63. }
  64. }