From 53450bd514eec97d58eb18b8a01feab36475826b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 6 Jul 2013 17:23:32 -0400 Subject: added a notifications service --- MediaBrowser.Model/Notifications/Notification.cs | 33 ++++++++++++++++++++++ .../Notifications/NotificationLevel.cs | 10 +++++++ .../Notifications/NotificationQuery.cs | 15 ++++++++++ .../Notifications/NotificationResult.cs | 9 ++++++ .../Notifications/NotificationsSummary.cs | 9 ++++++ 5 files changed, 76 insertions(+) create mode 100644 MediaBrowser.Model/Notifications/Notification.cs create mode 100644 MediaBrowser.Model/Notifications/NotificationLevel.cs create mode 100644 MediaBrowser.Model/Notifications/NotificationQuery.cs create mode 100644 MediaBrowser.Model/Notifications/NotificationResult.cs create mode 100644 MediaBrowser.Model/Notifications/NotificationsSummary.cs (limited to 'MediaBrowser.Model/Notifications') diff --git a/MediaBrowser.Model/Notifications/Notification.cs b/MediaBrowser.Model/Notifications/Notification.cs new file mode 100644 index 000000000..14f55b6e1 --- /dev/null +++ b/MediaBrowser.Model/Notifications/Notification.cs @@ -0,0 +1,33 @@ +using System; + +namespace MediaBrowser.Model.Notifications +{ + public class Notification + { + public Guid Id { get; set; } + + public Guid UserId { get; set; } + + 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; } + + public string Category { get; set; } + + public string RelatedId { get; set; } + + public NotificationLevel Level { get; set; } + + public Notification() + { + Id = Guid.NewGuid(); + Date = DateTime.UtcNow; + } + } +} diff --git a/MediaBrowser.Model/Notifications/NotificationLevel.cs b/MediaBrowser.Model/Notifications/NotificationLevel.cs new file mode 100644 index 000000000..24946e071 --- /dev/null +++ b/MediaBrowser.Model/Notifications/NotificationLevel.cs @@ -0,0 +1,10 @@ + +namespace MediaBrowser.Model.Notifications +{ + public enum NotificationLevel + { + Normal, + Warning, + Error + } +} diff --git a/MediaBrowser.Model/Notifications/NotificationQuery.cs b/MediaBrowser.Model/Notifications/NotificationQuery.cs new file mode 100644 index 000000000..39a7326a6 --- /dev/null +++ b/MediaBrowser.Model/Notifications/NotificationQuery.cs @@ -0,0 +1,15 @@ +using System; + +namespace MediaBrowser.Model.Notifications +{ + public class NotificationQuery + { + public Guid? UserId { get; set; } + + public bool? IsRead { get; set; } + + public int? StartIndex { get; set; } + + public int? Limit { get; set; } + } +} diff --git a/MediaBrowser.Model/Notifications/NotificationResult.cs b/MediaBrowser.Model/Notifications/NotificationResult.cs new file mode 100644 index 000000000..a98fe4edb --- /dev/null +++ b/MediaBrowser.Model/Notifications/NotificationResult.cs @@ -0,0 +1,9 @@ + +namespace MediaBrowser.Model.Notifications +{ + public class NotificationResult + { + public Notification[] Notifications { get; set; } + public int TotalRecordCount { get; set; } + } +} diff --git a/MediaBrowser.Model/Notifications/NotificationsSummary.cs b/MediaBrowser.Model/Notifications/NotificationsSummary.cs new file mode 100644 index 000000000..87dd51a5f --- /dev/null +++ b/MediaBrowser.Model/Notifications/NotificationsSummary.cs @@ -0,0 +1,9 @@ + +namespace MediaBrowser.Model.Notifications +{ + public class NotificationsSummary + { + public int UnreadCount { get; set; } + public NotificationLevel MaxUnreadNotificationLevel { get; set; } + } +} -- cgit v1.2.3