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/HttpTimeline.cs | 89 ++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 BackEnd/Timeline/Models/Http/HttpTimeline.cs (limited to 'BackEnd/Timeline/Models/Http/HttpTimeline.cs') diff --git a/BackEnd/Timeline/Models/Http/HttpTimeline.cs b/BackEnd/Timeline/Models/Http/HttpTimeline.cs new file mode 100644 index 00000000..87ebf0bb --- /dev/null +++ b/BackEnd/Timeline/Models/Http/HttpTimeline.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; + +namespace Timeline.Models.Http +{ + /// + /// 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, string? color, 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; + Color = color; + 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 + /// + /// Color of timeline. + /// + public string? Color { get; set; } + /// + /// 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 + } +} -- cgit v1.2.3