From f1c70edd559c72dcb47ff647f3f03ba5ae9a56cc Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 21 Aug 2020 23:44:53 +0800 Subject: ... --- Timeline/Models/Http/TimelineController.cs | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'Timeline/Models/Http/TimelineController.cs') diff --git a/Timeline/Models/Http/TimelineController.cs b/Timeline/Models/Http/TimelineController.cs index 3e2e6b58..aad361ee 100644 --- a/Timeline/Models/Http/TimelineController.cs +++ b/Timeline/Models/Http/TimelineController.cs @@ -4,33 +4,66 @@ using Timeline.Models.Validation; namespace Timeline.Models.Http { + /// + /// Content of post create request. + /// public class TimelinePostCreateRequestContent { + /// + /// Type of post content. + /// [Required] 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 base64 of image data. + /// public string? Data { get; set; } } public class TimelinePostCreateRequest { + /// + /// Content of the new post. + /// [Required] public TimelinePostCreateRequestContent Content { get; set; } = default!; + /// + /// Time of the post. If not set, current time will be used. + /// public DateTime? Time { get; set; } } + /// + /// Create timeline request model. + /// public class TimelineCreateRequest { + /// + /// Name of the new timeline. Must be a valid name. + /// [Required] [TimelineName] public string Name { get; set; } = default!; } + /// + /// Patch timeline request model. + /// public class TimelinePatchRequest { + /// + /// New description. Null for not change. + /// public string? Description { get; set; } + /// + /// New visibility. Null for not change. + /// public TimelineVisibility? Visibility { get; set; } } } -- cgit v1.2.3