From 21cf6a046b3e279c0694594f40e33daaa4d863f7 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 2 Feb 2021 18:59:41 +0800 Subject: ... --- BackEnd/Timeline/Models/Http/Timeline.cs | 183 ------------------------------- 1 file changed, 183 deletions(-) delete mode 100644 BackEnd/Timeline/Models/Http/Timeline.cs (limited to 'BackEnd/Timeline/Models/Http/Timeline.cs') diff --git a/BackEnd/Timeline/Models/Http/Timeline.cs b/BackEnd/Timeline/Models/Http/Timeline.cs deleted file mode 100644 index 5e5889f6..00000000 --- a/BackEnd/Timeline/Models/Http/Timeline.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Timeline.Models.Http -{ - /// - /// Info of post content. - /// - public class HttpTimelinePostContent - { - public HttpTimelinePostContent() { } - - public HttpTimelinePostContent(string type, string? text, string? url, string? eTag) - { - Type = type; - Text = text; - Url = url; - ETag = eTag; - } - - /// - /// Type of the post content. - /// - public string Type { get; set; } = default!; - /// - /// If post is of text type. This is the text. - /// - public string? Text { get; set; } - /// - /// If post is of image type. This is the image url. - /// - public string? Url { get; set; } - /// - /// If post has data (currently it means it's a image post), this is the data etag. - /// - public string? ETag { get; set; } - } - - /// - /// 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!; - } - - /// - /// Info of a timeline. - /// - public class HttpTimeline - { - public HttpTimeline() { } - - public HttpTimeline(string uniqueId, string title, string name, DateTime nameLastModifed, string description, HttpUser owner, TimelineVisibility visibility, List members, DateTime createTime, DateTime lastModified, bool isHighlight, bool isBookmark, HttpTimelineLinks links) - { - UniqueId = uniqueId; - Title = title; - Name = name; - NameLastModifed = nameLastModifed; - Description = description; - Owner = owner; - Visibility = visibility; - Members = members; - CreateTime = createTime; - LastModified = lastModified; - IsHighlight = isHighlight; - IsBookmark = isBookmark; - _links = links; - } - - /// - /// Unique id. - /// - public string UniqueId { get; set; } = default!; - /// - /// Title. - /// - public string Title { get; set; } = default!; - /// - /// Name of timeline. - /// - public string Name { get; set; } = default!; - /// - /// Last modified time of timeline name. - /// - public DateTime NameLastModifed { get; set; } = default!; - /// - /// Timeline description. - /// - public string Description { get; set; } = default!; - /// - /// Owner of the timeline. - /// - public HttpUser Owner { get; set; } = default!; - /// - /// Visibility of the timeline. - /// - public TimelineVisibility Visibility { get; set; } -#pragma warning disable CA2227 // Collection properties should be read only - /// - /// Members of timeline. - /// - public List Members { get; set; } = default!; -#pragma warning restore CA2227 // Collection properties should be read only - /// - /// Create time of timeline. - /// - public DateTime CreateTime { get; set; } = default!; - /// - /// Last modified time of timeline. - /// - public DateTime LastModified { get; set; } = default!; - - public bool IsHighlight { get; set; } - - public bool IsBookmark { get; set; } - -#pragma warning disable CA1707 // Identifiers should not contain underscores - /// - /// Related links. - /// - public HttpTimelineLinks _links { get; set; } = default!; -#pragma warning restore CA1707 // Identifiers should not contain underscores - } - - /// - /// Related links for timeline. - /// - public class HttpTimelineLinks - { - public HttpTimelineLinks() { } - - public HttpTimelineLinks(string self, string posts) - { - Self = self; - Posts = posts; - } - - /// - /// Self. - /// - public string Self { get; set; } = default!; - /// - /// Posts url. - /// - public string Posts { get; set; } = default!; - } -} -- cgit v1.2.3