Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 4b03d2a7

Přidáno uživatelem Vojtěch Bartička před asi 2 roky(ů)

More comments in backend

Zobrazit rozdíly:

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
17 17
        public EState State { get; set; }
18 18
        public EDocumentType Type { get; set; }
19 19
        public string Note { get; set; }
20
        /// <summary>
21
        /// List of tags essentially
22
        /// </summary>
20 23
        public List<TagInstanceInfo> TagInstances { get; set; } = new();
24
        /// <summary>
25
        /// CSS for rendering
26
        /// </summary>
21 27
        public List<TagInstanceCSSInfo> CSSInfo { get; set; } = new();
22 28
    }
23 29
}
Backend/Models/Annotations/AnnotationListInfo.cs
9 9
{
10 10
    public class AnnotationListInfo
11 11
    {
12
        /// <summary>
13
        /// What document
14
        /// </summary>
12 15
        public string DocumentName { get; set; }
16
        /// <summary>
17
        /// In what state
18
        /// </summary>
13 19
        public EState State { get; set; }
20
        /// <summary>
21
        /// The annotation
22
        /// </summary>
14 23
        public Guid AnnotationId { get; set; }
15 24
    }
16 25
}
Backend/Models/Annotations/AnnotationsAddRequest.cs
8 8

  
9 9
public class AnnotationsAddRequest
10 10
{
11
    /// <summary>
12
    /// List of users to assigned the documents
13
    /// </summary>
11 14
    public List<Guid> UserIdList { get; set; }
15
    /// <summary>
16
    /// List of documents to assign the users
17
    /// </summary>
12 18
    public List<Guid> DocumentIdList { get; set; }
13 19
}
14 20

  
Backend/Models/Documents/DocumentAddInfo.cs
9 9

  
10 10
# nullable disable
11 11
/**
12
 * If the file is plaintext, we except it to be a single document
12
 * If the file is plaintext, we except it to be a single document base64 encoded
13 13
 * If the file is base64, we expect it to be a ZIP file with plaintext documents in its root
14 14
 */
15 15
public class DocumentAddInfo
16 16
{
17 17
    public string Name { get; set; }
18

  
19
    /// <summary>
20
    /// The backend relies on this being correct
21
    /// </summary>
18 22
    public EAddDocumentFormat Format { get; set; } = EAddDocumentFormat.TEXTFILE;
23

  
19 24
    public string Content { get; set; }
20 25
}
Backend/Models/Tags/TagInstanceInfo.cs
10 10
{
11 11
    public class TagInstanceInfo
12 12
    {
13
        /** For database */
13
        /// <summary>
14
        /// unique ID
15
        /// </summary>
14 16
        public Guid OccurenceId { get; set; }
15 17
        public string TagName { get; set; }
18

  
19
        /// <summary>
20
        /// ID of the Tag in database
21
        /// </summary>
16 22
        public Guid TagId { get; set; }
17 23
        public string TagCategoryName { get; set; }
24

  
25
        /// <summary>
26
        /// ID of the category in database
27
        /// </summary>
18 28
        public Guid TagCategoryId { get; set; }
19 29
        public string? SubTagName { get; set; }
30

  
31
        /// <summary>
32
        /// ID of the subtag in database
33
        /// </summary>
20 34
        public Guid? SubTagId { get; set; }
21 35

  
36
        /// <summary>
37
        /// Instance of the tag (multipart tags share the same instance)
38
        /// </summary>
22 39
        public Guid Instance { get; set; }
23 40
        public int Position { get; set; }
24 41
        public int Length { get; set; }
......
28 45
        public ETagSentiment? Sentiment { get; set; }
29 46
        public string SelectedText { get; set; }
30 47

  
48
        /// <summary>
49
        /// Optional list of users who have agreed on this tag - only when the annotation is final
50
        /// </summary>
31 51
        public List<UserInfo>? Users { get; set; }
52
        /// <summary>
53
        /// Optional information about the tag being resolved - only when the annotation is final
54
        /// </summary>
32 55
        public bool? IsFinal { get; set; }
33 56
    }
34 57
}
Backend/Models/Users/DocumentUserInfo.cs
9 9
{
10 10
    public class DocumentUserInfo
11 11
    {
12
        /// <summary>
13
        /// User Id
14
        /// </summary>
12 15
        public Guid Id { get; set; }
13 16
        public string Username { get; set; }
14 17
        public string Name { get; set; }
15 18
        public string Surname { get; set; }
19

  
20
        /// <summary>
21
        /// State of the annotation
22
        /// </summary>
16 23
        public EState State { get; set; }
24
        /// <summary>
25
        /// Id of the annotation
26
        /// </summary>
17 27
        public Guid AnnotationId { get; set; }
18 28
    }
19 29
}

Také k dispozici: Unified diff