From 5eaacedda31da86116f25158bd07e5ad8954e7b2 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 10 Mar 2020 19:37:58 +0800 Subject: ... --- Timeline/Models/Timeline.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'Timeline/Models/Timeline.cs') diff --git a/Timeline/Models/Timeline.cs b/Timeline/Models/Timeline.cs index 6d4c924d..803a5c5c 100644 --- a/Timeline/Models/Timeline.cs +++ b/Timeline/Models/Timeline.cs @@ -48,11 +48,22 @@ namespace Timeline.Models public class TimelinePost { + public TimelinePost(long id, ITimelinePostContent content, DateTime time, User author, DateTime lastUpdated, string timelineName) + { + Id = id; + Content = content; + Time = time; + Author = author; + LastUpdated = lastUpdated; + TimelineName = timelineName; + } + public long Id { get; set; } - public ITimelinePostContent Content { get; set; } = default!; + public ITimelinePostContent Content { get; set; } public DateTime Time { get; set; } - public User Author { get; set; } = default!; - public DateTime LastUpdated { get; set; } = default!; + public User Author { get; set; } + public DateTime LastUpdated { get; set; } + public string TimelineName { get; set; } } #pragma warning disable CA1724 // Type names should not match namespaces -- cgit v1.2.3