From 0a0a61b60544a135a61394953bb5bb9dbbfeb241 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 2 Feb 2021 18:59:41 +0800 Subject: ... --- BackEnd/Timeline/Models/Http/HttpTimelinePost.cs | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 BackEnd/Timeline/Models/Http/HttpTimelinePost.cs (limited to 'BackEnd/Timeline/Models/Http/HttpTimelinePost.cs') diff --git a/BackEnd/Timeline/Models/Http/HttpTimelinePost.cs b/BackEnd/Timeline/Models/Http/HttpTimelinePost.cs new file mode 100644 index 00000000..a563bea0 --- /dev/null +++ b/BackEnd/Timeline/Models/Http/HttpTimelinePost.cs @@ -0,0 +1,47 @@ +using System; + +namespace Timeline.Models.Http +{ + /// + /// Info of a post. + /// + public class HttpTimelinePost + { + public HttpTimelinePost() { } + + public HttpTimelinePost(long id, HttpTimelinePostContent? content, bool deleted, DateTime time, HttpUser? author, DateTime lastUpdated) + { + Id = id; + Content = content; + Deleted = deleted; + Time = time; + Author = author; + LastUpdated = lastUpdated; + } + + /// + /// Post id. + /// + public long Id { get; set; } + /// + /// Content of the post. May be null if post is deleted. + /// + public HttpTimelinePostContent? Content { get; set; } + /// + /// True if post is deleted. + /// + public bool Deleted { get; set; } + /// + /// Post time. + /// + public DateTime Time { get; set; } + /// + /// The author. May be null if the user has been deleted. + /// + public HttpUser? Author { get; set; } = default!; + /// + /// Last updated time. + /// + public DateTime LastUpdated { get; set; } = default!; + } +} -- cgit v1.2.3