aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/Timeline.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-11-03 16:51:10 +0800
committer杨宇千 <crupest@outlook.com>2019-11-03 16:51:10 +0800
commit27719fa2a00e041cdb957182812508464d19a9d7 (patch)
tree3e661387665f6592cf10b2cd93da217d7f16e6e5 /Timeline/Models/Timeline.cs
parentcb2d9949ecc1d3c4b10295eb715a9293d493c5e2 (diff)
downloadtimeline-27719fa2a00e041cdb957182812508464d19a9d7.tar.gz
timeline-27719fa2a00e041cdb957182812508464d19a9d7.tar.bz2
timeline-27719fa2a00e041cdb957182812508464d19a9d7.zip
WIP: Design the timeline service interface.
Diffstat (limited to 'Timeline/Models/Timeline.cs')
-rw-r--r--Timeline/Models/Timeline.cs42
1 files changed, 42 insertions, 0 deletions
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; }
+
+ /// <summary>
+ /// The username of the author.
+ /// </summary>
+ 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; }
+
+ /// <summary>
+ /// The username of the owner.
+ /// </summary>
+ public string Owner { get; set; } = default!;
+
+ public TimelineVisibility Visibility { get; set; }
+
+ public List<string> Members { get; set; } = default!;
+ }
+
+ public class TimelineInfo : BaseTimelineInfo
+ {
+ public string Name { get; set; } = default!;
+ }
+}