forked from RiisDev/ScriptBloxAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotificationObject.cs
More file actions
42 lines (33 loc) · 1.16 KB
/
NotificationObject.cs
File metadata and controls
42 lines (33 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using ScriptBloxAPI.Backend_Functions;
namespace ScriptBloxAPI.DataTypes
{
public class NotificationObject
{
public string Id { get; }
public DateTime CreatedAt { get; }
public NotificationType Type { get; }
public bool IsRead { get; }
public ScriptObject ScriptObjectSender { get; }
public UserObject UserObjectSender { get; }
public enum NotificationType
{
CommentLiked,
CommentDisliked,
ScriptLiked,
ScriptDisliked,
CommentAddedToScript,
Followed
}
public NotificationObject(string id, DateTime createdAt, NotificationType notificationType, bool isRead, UserObject userSender = null, ScriptObject scriptSender = null)
{
if (userSender == null && scriptSender == null) throw new ScriptBloxException("Must provide either a UserObject or ScriptObject");
Id = id;
CreatedAt = createdAt;
Type = notificationType;
IsRead = isRead;
UserObjectSender = userSender;
ScriptObjectSender = scriptSender;
}
}
}