aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Http/HttpTimelinePost.cs
blob: 5e06982161eefb81699ccdfb851ddefc059afc83 (plain)
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
58
59
60
61
62
63
64
65
66
using System;
using System.Collections.Generic;

namespace Timeline.Models.Http
{

    /// <summary>
    /// Info of a post.
    /// </summary>
    public class HttpTimelinePost
    {
        public HttpTimelinePost() { }

        public HttpTimelinePost(long id, List<HttpTimelinePostDataDigest> dataList, bool deleted, DateTime time, HttpUser? author, string? color, DateTime lastUpdated, string timelineName, bool editable)
        {
            Id = id;
            DataList = dataList;
            Deleted = deleted;
            Time = time;
            Author = author;
            Color = color;
            LastUpdated = lastUpdated;
            TimelineName = timelineName;
            Editable = editable;
        }

        /// <summary>
        /// Post id.
        /// </summary>
        public long Id { get; set; }
        /// <summary>
        /// The data list.
        /// </summary>
#pragma warning disable CA2227
        public List<HttpTimelinePostDataDigest> DataList { get; set; } = default!;
#pragma warning restore CA2227
        /// <summary>
        /// True if post is deleted.
        /// </summary>
        public bool Deleted { get; set; }
        /// <summary>
        /// Post time.
        /// </summary>
        public DateTime Time { get; set; }
        /// <summary>
        /// The author. May be null if the user has been deleted.
        /// </summary>
        public HttpUser? Author { get; set; } = default!;
        /// <summary>
        /// The color.
        /// </summary>
        public string? Color { get; set; }
        /// <summary>
        /// Last updated time.
        /// </summary>
        public DateTime LastUpdated { get; set; } = default!;
        /// <summary>
        /// Timeline name.
        /// </summary>
        public string TimelineName { get; set; } = default!;
        /// <summary>
        /// True if you can edit this post.
        /// </summary>
        public bool Editable { get; set; }
    }
}