Revize 37259a80
Přidáno uživatelem Vojtěch Bartička před asi 3 roky(ů)
Backend/Core/MapperProfiles/TagProfileEF.cs | ||
---|---|---|
16 | 16 |
CreateMap<TagCategory, TagCategoryInfo>(); |
17 | 17 |
CreateMap<Tag, TagInfo>(); |
18 | 18 |
CreateMap<SubTag, SubTagInfo>(); |
19 |
CreateMap<AnnotationTag, TagInstanceInfo>(); |
|
19 | 20 |
} |
20 | 21 |
} |
21 | 22 |
} |
Backend/Models/Annotations/AnnotationGetRequest.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
|
|
7 |
namespace Models.Annotations |
|
8 |
{ |
|
9 |
public class AnnotationGetRequest |
|
10 |
{ |
|
11 |
public Guid AnnotationId { get; set; } |
|
12 |
} |
|
13 |
} |
Backend/Models/Annotations/AnnotationInfo.cs | ||
---|---|---|
1 |
using Models.Enums; |
|
2 |
using Models.Tags; |
|
3 |
using System; |
|
4 |
using System.Collections.Generic; |
|
5 |
using System.Linq; |
|
6 |
using System.Text; |
|
7 |
using System.Threading.Tasks; |
|
8 |
|
|
9 |
namespace Models.Annotations |
|
10 |
{ |
|
11 |
public class AnnotationInfo |
|
12 |
{ |
|
13 |
public string DocumentText { get; set; } |
|
14 |
public EState State { get; set; } |
|
15 |
public EDocumentType Type { get; set; } |
|
16 |
public string Note { get; set; } |
|
17 |
public List<TagInstanceInfo> TagInstances { get; set; } = new(); |
|
18 |
} |
|
19 |
} |
Backend/Models/Enums/EDocumentType.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
|
|
7 |
namespace Models.Enums |
|
8 |
{ |
|
9 |
public enum EDocumentType |
|
10 |
{ |
|
11 |
HTML, |
|
12 |
TEXT |
|
13 |
} |
|
14 |
} |
Backend/Models/Tags/TagInstanceInfo.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
|
|
7 |
namespace Models.Tags |
|
8 |
{ |
|
9 |
public class TagInstanceInfo |
|
10 |
{ |
|
11 |
public string TagName { get; set; } |
|
12 |
public Guid TagId { get; set; } |
|
13 |
public string TagCategoryName { get; set; } |
|
14 |
public Guid TagCategoryId { get; set; } |
|
15 |
public string? SubTagName { get; set; } |
|
16 |
public Guid? SubTagId { get; set; } |
|
17 |
|
|
18 |
public int Instance { get; set; } |
|
19 |
public int Position { get; set; } |
|
20 |
public int Length { get; set; } |
|
21 |
|
|
22 |
public string Note { get; set; } |
|
23 |
|
|
24 |
} |
|
25 |
} |
Také k dispozici: Unified diff
Added DTOs and mapper profiles for annotation info