1 |
cd91f841
|
Vojtěch Bartička
|
using Models.Enums;
|
2 |
caa28567
|
Vojtěch Bartička
|
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 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
15 |
|
|
/// Document that the annotation refers to
|
16 |
|
|
/// </summary>
|
17 |
caa28567
|
Vojtěch Bartička
|
public Document Document { get; set; }
|
18 |
|
|
|
19 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
20 |
|
|
/// User the annotation is assigned to
|
21 |
|
|
/// </summary>
|
22 |
caa28567
|
Vojtěch Bartička
|
public User User { get; set; }
|
23 |
|
|
|
24 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
25 |
|
|
/// The user that assigned the annotation
|
26 |
|
|
/// </summary>
|
27 |
caa28567
|
Vojtěch Bartička
|
public User UserAssigned { get; set; }
|
28 |
|
|
|
29 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
30 |
|
|
/// The date the annotation was assigned
|
31 |
|
|
/// </summary>
|
32 |
caa28567
|
Vojtěch Bartička
|
public DateTime DateAssigned { get; set; }
|
33 |
a35cb648
|
Vojtěch Bartička
|
|
34 |
|
|
/// <summary>
|
35 |
|
|
/// The state of the annotation
|
36 |
|
|
/// </summary>
|
37 |
caa28567
|
Vojtěch Bartička
|
public EState State { get; set; }
|
38 |
a35cb648
|
Vojtěch Bartička
|
|
39 |
|
|
/// <summary>
|
40 |
|
|
/// The date the annotation was last modified
|
41 |
|
|
/// </summary>
|
42 |
caa28567
|
Vojtěch Bartička
|
public DateTime DateLastChanged { get; set; }
|
43 |
a35cb648
|
Vojtěch Bartička
|
|
44 |
|
|
/// <summary>
|
45 |
|
|
/// Annotation note
|
46 |
|
|
/// </summary>
|
47 |
6e91a560
|
Vojtěch Bartička
|
public string Note { get; set; } = "";
|
48 |
caa28567
|
Vojtěch Bartička
|
|
49 |
a35cb648
|
Vojtěch Bartička
|
//Cached information START
|
50 |
553486ad
|
Vojtěch Bartička
|
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 |
4e12f0cc
|
Vojtěch Bartička
|
public string CachedCSS { get; set; } = "";
|
56 |
a35cb648
|
Vojtěch Bartička
|
//Cached information END
|
57 |
553486ad
|
Vojtěch Bartička
|
|
58 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
59 |
|
|
/// ID of the last modified tag
|
60 |
|
|
/// </summary>
|
61 |
553486ad
|
Vojtěch Bartička
|
public Guid? LastModifiedTagId { get; set; }
|
62 |
a35cb648
|
Vojtěch Bartička
|
|
63 |
|
|
/// <summary>
|
64 |
|
|
/// The modification that is done
|
65 |
|
|
/// </summary>
|
66 |
553486ad
|
Vojtěch Bartička
|
public EModified ModifiedType { get; set; } = EModified.NONE;
|
67 |
|
|
|
68 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
69 |
|
|
/// Unused
|
70 |
|
|
/// </summary>
|
71 |
caa28567
|
Vojtěch Bartička
|
public ICollection<Class> Classes { get; set; } = new List<Class>();
|
72 |
8c9ce202
|
Vojtěch Bartička
|
|
73 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
74 |
|
|
/// So that EF creates a join table as 1 final annotation to N annotations
|
75 |
|
|
/// </summary>
|
76 |
|
|
|
77 |
8c9ce202
|
Vojtěch Bartička
|
public ICollection<FinalAnnotation> FinalAnnotations { get; set; } = new List<FinalAnnotation>();
|
78 |
caa28567
|
Vojtěch Bartička
|
}
|
79 |
|
|
}
|