aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/Http/TimelineCommon.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-01-30 20:26:52 +0800
committercrupest <crupest@outlook.com>2020-01-30 20:26:52 +0800
commit52acf41e331ddbd66befed4692c804b754ba7d5c (patch)
tree538ceea06640f501d2a950cac813c10561036e4d /Timeline/Models/Http/TimelineCommon.cs
parentabde51b167f17301c25e32ae247e7909c0dc9367 (diff)
downloadtimeline-52acf41e331ddbd66befed4692c804b754ba7d5c.tar.gz
timeline-52acf41e331ddbd66befed4692c804b754ba7d5c.tar.bz2
timeline-52acf41e331ddbd66befed4692c804b754ba7d5c.zip
...
Diffstat (limited to 'Timeline/Models/Http/TimelineCommon.cs')
-rw-r--r--Timeline/Models/Http/TimelineCommon.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/Timeline/Models/Http/TimelineCommon.cs b/Timeline/Models/Http/TimelineCommon.cs
new file mode 100644
index 00000000..febb8186
--- /dev/null
+++ b/Timeline/Models/Http/TimelineCommon.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+
+namespace Timeline.Models.Http
+{
+ public enum TimelineVisibility
+ {
+ /// <summary>
+ /// All people including those without accounts.
+ /// </summary>
+ Public,
+ /// <summary>
+ /// Only people signed in.
+ /// </summary>
+ Register,
+ /// <summary>
+ /// Only member.
+ /// </summary>
+ Private
+ }
+
+ public class TimelinePostInfo
+ {
+ public long Id { get; set; }
+ public string Content { get; set; } = default!;
+ public DateTime Time { get; set; }
+ public UserInfo Author { get; set; } = default!;
+ public DateTime LastUpdated { 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; } = default!;
+ public UserInfo Owner { get; set; } = default!;
+ public TimelineVisibility Visibility { get; set; }
+ public List<UserInfo> Members { get; set; } = default!;
+ }
+
+ public class TimelineInfo : BaseTimelineInfo
+ {
+ public string Name { get; set; } = default!;
+ }
+}