From 27719fa2a00e041cdb957182812508464d19a9d7 Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sun, 3 Nov 2019 16:51:10 +0800 Subject: WIP: Design the timeline service interface. --- Timeline/Models/Timeline.cs | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Timeline/Models/Timeline.cs (limited to 'Timeline/Models/Timeline.cs') diff --git a/Timeline/Models/Timeline.cs b/Timeline/Models/Timeline.cs new file mode 100644 index 00000000..26012878 --- /dev/null +++ b/Timeline/Models/Timeline.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Timeline.Entities; + +namespace Timeline.Models +{ + public class TimelinePostInfo + { + public long Id { get; set; } + + public string? Content { get; set; } + + public DateTime Time { get; set; } + + /// + /// The username of the author. + /// + public string Author { get; set; } = default!; + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "This is a DTO class.")] + public class BaseTimelineInfo + { + public string? Description { get; set; } + + /// + /// The username of the owner. + /// + public string Owner { get; set; } = default!; + + public TimelineVisibility Visibility { get; set; } + + public List Members { get; set; } = default!; + } + + public class TimelineInfo : BaseTimelineInfo + { + public string Name { get; set; } = default!; + } +} -- cgit v1.2.3