-
Notifications
You must be signed in to change notification settings - Fork 1
/
ArchivedObjectVersion.cs
57 lines (38 loc) · 1.24 KB
/
ArchivedObjectVersion.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
55
56
57
using System;
using System.Xml.Linq;
using VocaDb.Model.Domain.Security;
using VocaDb.Model.Domain.Users;
namespace VocaDb.Model.Domain {
public abstract class ArchivedObjectVersion {
private string notes;
protected ArchivedObjectVersion() {
Created = DateTime.Now;
}
protected ArchivedObjectVersion(XDocument data, AgentLoginData author, int version, EntryStatus status, string notes)
: this() {
ParamIs.NotNull(() => data);
ParamIs.NotNull(() => author);
Data = data;
AgentName = author.Name;
Author = author.User;
Notes = notes;
Status = status;
Version = version;
}
public virtual string AgentName { get; protected set; }
public virtual User Author { get; protected set; }
public virtual DateTime Created { get; protected set; }
public virtual XDocument Data { get; protected set; }
public abstract IEntryDiff DiffBase { get; }
public virtual int Id { get; protected set; }
public virtual string Notes {
get { return notes; }
protected set {
ParamIs.NotNull(() => value);
notes = value;
}
}
public virtual EntryStatus Status { get; protected set; }
public virtual int Version { get; protected set; }
}
}