1
|
using Models.Enums;
|
2
|
using System;
|
3
|
using System.Collections.Generic;
|
4
|
using System.ComponentModel.DataAnnotations;
|
5
|
using System.ComponentModel.DataAnnotations.Schema;
|
6
|
using System.Linq;
|
7
|
using System.Text;
|
8
|
using System.Threading.Tasks;
|
9
|
|
10
|
namespace Core.Entities
|
11
|
{
|
12
|
public class Annotation : BaseEntity
|
13
|
{
|
14
|
/// <summary>
|
15
|
/// Document that the annotation refers to
|
16
|
/// </summary>
|
17
|
public Document Document { get; set; }
|
18
|
|
19
|
/// <summary>
|
20
|
/// User the annotation is assigned to
|
21
|
/// </summary>
|
22
|
public User User { get; set; }
|
23
|
|
24
|
/// <summary>
|
25
|
/// The user that assigned the annotation
|
26
|
/// </summary>
|
27
|
public User UserAssigned { get; set; }
|
28
|
|
29
|
/// <summary>
|
30
|
/// The date the annotation was assigned
|
31
|
/// </summary>
|
32
|
public DateTime DateAssigned { get; set; }
|
33
|
|
34
|
/// <summary>
|
35
|
/// The state of the annotation
|
36
|
/// </summary>
|
37
|
public EState State { get; set; }
|
38
|
|
39
|
/// <summary>
|
40
|
/// The date the annotation was last modified
|
41
|
/// </summary>
|
42
|
public DateTime DateLastChanged { get; set; }
|
43
|
|
44
|
/// <summary>
|
45
|
/// Annotation note
|
46
|
/// </summary>
|
47
|
public string Note { get; set; } = "";
|
48
|
|
49
|
//Cached information START
|
50
|
public string CachedDocumentHTML { get; set; } = "";
|
51
|
public string CachedStartPositions { get; set; } = "";
|
52
|
public string CachedLengths { get; set; } = "";
|
53
|
public string CachedClosingPositions { get; set; } = "";
|
54
|
public string CachedClosingLengths { get; set; } = "";
|
55
|
public string CachedCSS { get; set; } = "";
|
56
|
//Cached information END
|
57
|
|
58
|
/// <summary>
|
59
|
/// ID of the last modified tag
|
60
|
/// </summary>
|
61
|
public Guid? LastModifiedTagId { get; set; }
|
62
|
|
63
|
/// <summary>
|
64
|
/// The modification that is done
|
65
|
/// </summary>
|
66
|
public EModified ModifiedType { get; set; } = EModified.NONE;
|
67
|
|
68
|
/// <summary>
|
69
|
/// Unused
|
70
|
/// </summary>
|
71
|
public ICollection<Class> Classes { get; set; } = new List<Class>();
|
72
|
|
73
|
/// <summary>
|
74
|
/// So that EF creates a join table as 1 final annotation to N annotations
|
75
|
/// </summary>
|
76
|
|
77
|
public ICollection<FinalAnnotation> FinalAnnotations { get; set; } = new List<FinalAnnotation>();
|
78
|
}
|
79
|
}
|