diff options
author | crupest <crupest@outlook.com> | 2020-08-21 23:47:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-21 23:47:10 +0800 |
commit | c28848a35b0f31a59f9d02641571495822ad0db8 (patch) | |
tree | 520b56d834185ba5f9f556558a181bb9f4059b29 /Timeline/Models/Http/Timeline.cs | |
parent | 30e96fc5a59a8324ed861e7f7e856c44b4d329ff (diff) | |
parent | 3aa8e1cda4222fc3a9828888ba8fb51d2ba1d6c8 (diff) | |
download | timeline-c28848a35b0f31a59f9d02641571495822ad0db8.tar.gz timeline-c28848a35b0f31a59f9d02641571495822ad0db8.tar.bz2 timeline-c28848a35b0f31a59f9d02641571495822ad0db8.zip |
Merge pull request #149 from crupest/swagger
Swagger/OpenAPI
Diffstat (limited to 'Timeline/Models/Http/Timeline.cs')
-rw-r--r-- | Timeline/Models/Http/Timeline.cs | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/Timeline/Models/Http/Timeline.cs b/Timeline/Models/Http/Timeline.cs index 52e26190..6498fa74 100644 --- a/Timeline/Models/Http/Timeline.cs +++ b/Timeline/Models/Http/Timeline.cs @@ -8,45 +8,120 @@ using Timeline.Controllers; namespace Timeline.Models.Http
{
+ /// <summary>
+ /// Info of post content.
+ /// </summary>
public class TimelinePostContentInfo
{
+ /// <summary>
+ /// Type of the post content.
+ /// </summary>
public string Type { get; set; } = default!;
+ /// <summary>
+ /// If post is of text type. This is the text.
+ /// </summary>
public string? Text { get; set; }
+ /// <summary>
+ /// If post is of image type. This is the image url.
+ /// </summary>
public string? Url { get; set; }
}
+ /// <summary>
+ /// Info of a post.
+ /// </summary>
public class TimelinePostInfo
{
+ /// <summary>
+ /// Post id.
+ /// </summary>
public long Id { get; set; }
+ /// <summary>
+ /// Content of the post. May be null if post is deleted.
+ /// </summary>
public TimelinePostContentInfo? Content { get; set; }
+ /// <summary>
+ /// True if post is deleted.
+ /// </summary>
public bool Deleted { get; set; }
+ /// <summary>
+ /// Post time.
+ /// </summary>
public DateTime Time { get; set; }
+ /// <summary>
+ /// The author. May be null if the user has been deleted.
+ /// </summary>
public UserInfo? Author { get; set; } = default!;
+ /// <summary>
+ /// Last updated time.
+ /// </summary>
public DateTime LastUpdated { get; set; } = default!;
}
+ /// <summary>
+ /// Info of a timeline.
+ /// </summary>
public class TimelineInfo
{
+ /// <summary>
+ /// Unique id.
+ /// </summary>
public string UniqueId { get; set; } = default!;
+ /// <summary>
+ /// Name of timeline.
+ /// </summary>
public string Name { get; set; } = default!;
+ /// <summary>
+ /// Last modified time of timeline name.
+ /// </summary>
public DateTime NameLastModifed { get; set; } = default!;
+ /// <summary>
+ /// Timeline description.
+ /// </summary>
public string Description { get; set; } = default!;
+ /// <summary>
+ /// Owner of the timeline.
+ /// </summary>
public UserInfo Owner { get; set; } = default!;
+ /// <summary>
+ /// Visibility of the timeline.
+ /// </summary>
public TimelineVisibility Visibility { get; set; }
#pragma warning disable CA2227 // Collection properties should be read only
+ /// <summary>
+ /// Members of timeline.
+ /// </summary>
public List<UserInfo> Members { get; set; } = default!;
#pragma warning restore CA2227 // Collection properties should be read only
+ /// <summary>
+ /// Create time of timeline.
+ /// </summary>
public DateTime CreateTime { get; set; } = default!;
+ /// <summary>
+ /// Last modified time of timeline.
+ /// </summary>
public DateTime LastModified { get; set; } = default!;
#pragma warning disable CA1707 // Identifiers should not contain underscores
+ /// <summary>
+ /// Related links.
+ /// </summary>
public TimelineInfoLinks _links { get; set; } = default!;
#pragma warning restore CA1707 // Identifiers should not contain underscores
}
+ /// <summary>
+ /// Related links for timeline.
+ /// </summary>
public class TimelineInfoLinks
{
+ /// <summary>
+ /// Self.
+ /// </summary>
public string Self { get; set; } = default!;
+ /// <summary>
+ /// Posts url.
+ /// </summary>
public string Posts { get; set; } = default!;
}
|