-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathNote.cs
54 lines (38 loc) · 1.17 KB
/
Note.cs
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
43
44
45
46
47
48
49
50
51
52
53
54
using System;
namespace NGitLab.Mock;
public abstract class Note : GitLabObject
{
protected Note()
{
CreatedAt = DateTimeOffset.UtcNow;
UpdatedAt = DateTimeOffset.UtcNow;
}
public long Id { get; set; }
public string ThreadId { get; set; }
public string Body { get; set; }
public UserRef Author { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset UpdatedAt { get; set; }
public bool System { get; set; }
public abstract long NoticableId { get; }
public abstract long NoticableIid { get; }
public abstract string NoteableType { get; }
public bool Resolvable { get; set; }
public bool Resolved { get; set; }
public bool Confidential { get; set; }
public Models.Note ToClientEvent()
{
return new Models.Note
{
Id = Id,
Body = Body,
CreatedAt = CreatedAt.UtcDateTime,
Author = Author?.ToUserClient(),
Resolvable = Resolvable,
System = System,
Resolved = Resolved,
UpdatedAt = UpdatedAt.UtcDateTime,
Confidential = Confidential,
};
}
}