From 05ccb4d8f1bbe3fb64e117136b4a89bcfb0b0b33 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 27 Oct 2020 19:21:35 +0800 Subject: Split front and back end. --- Timeline/Models/Http/TimelineController.cs | 93 ------------------------------ 1 file changed, 93 deletions(-) delete mode 100644 Timeline/Models/Http/TimelineController.cs (limited to 'Timeline/Models/Http/TimelineController.cs') diff --git a/Timeline/Models/Http/TimelineController.cs b/Timeline/Models/Http/TimelineController.cs deleted file mode 100644 index 7bd141ed..00000000 --- a/Timeline/Models/Http/TimelineController.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -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 title. Null for not change. - /// - public string? Title { get; set; } - - /// - /// New description. Null for not change. - /// - public string? Description { get; set; } - - /// - /// New visibility. Null for not change. - /// - public TimelineVisibility? Visibility { get; set; } - } - - /// - /// Change timeline name request model. - /// - public class TimelineChangeNameRequest - { - /// - /// Old name of timeline. - /// - [Required] - [TimelineName] - public string OldName { get; set; } = default!; - /// - /// New name of timeline. - /// - [Required] - [TimelineName] - public string NewName { get; set; } = default!; - } -} -- cgit v1.2.3