aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Http/TimelineController.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-04 21:39:03 +0800
committerGitHub <noreply@github.com>2021-02-04 21:39:03 +0800
commit76d8616a6ba18f2bf86c46d865a9426e5accf55f (patch)
treeae0a8eb5f5a2d35114247f44a35e35e20aa2dee7 /BackEnd/Timeline/Models/Http/TimelineController.cs
parent85247119bb82189baf100cd369e2f5993ee9d296 (diff)
parentc09ec62c64fe2d7cd09f7a2d9989ad96b43606a3 (diff)
downloadtimeline-76d8616a6ba18f2bf86c46d865a9426e5accf55f.tar.gz
timeline-76d8616a6ba18f2bf86c46d865a9426e5accf55f.tar.bz2
timeline-76d8616a6ba18f2bf86c46d865a9426e5accf55f.zip
Merge pull request #244 from crupest/color
Backend: Color
Diffstat (limited to 'BackEnd/Timeline/Models/Http/TimelineController.cs')
-rw-r--r--BackEnd/Timeline/Models/Http/TimelineController.cs90
1 files changed, 0 insertions, 90 deletions
diff --git a/BackEnd/Timeline/Models/Http/TimelineController.cs b/BackEnd/Timeline/Models/Http/TimelineController.cs
deleted file mode 100644
index 79be1826..00000000
--- a/BackEnd/Timeline/Models/Http/TimelineController.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-using AutoMapper;
-using System;
-using System.ComponentModel.DataAnnotations;
-using Timeline.Models.Validation;
-using Timeline.Services;
-
-namespace Timeline.Models.Http
-{
- /// <summary>
- /// Content of post create request.
- /// </summary>
- public class HttpTimelinePostCreateRequestContent
- {
- /// <summary>
- /// Type of post content.
- /// </summary>
- [Required]
- 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 base64 of image data.
- /// </summary>
- public string? Data { get; set; }
- }
-
- public class HttpTimelinePostCreateRequest
- {
- /// <summary>
- /// Content of the new post.
- /// </summary>
- [Required]
- public HttpTimelinePostCreateRequestContent Content { get; set; } = default!;
-
- /// <summary>
- /// Time of the post. If not set, current time will be used.
- /// </summary>
- public DateTime? Time { get; set; }
- }
-
- /// <summary>
- /// Create timeline request model.
- /// </summary>
- public class HttpTimelineCreateRequest
- {
- /// <summary>
- /// Name of the new timeline. Must be a valid name.
- /// </summary>
- [Required]
- [TimelineName]
- public string Name { get; set; } = default!;
- }
-
- /// <summary>
- /// Patch timeline request model.
- /// </summary>
- public class HttpTimelinePatchRequest
- {
- /// <summary>
- /// New name. Null for not change.
- /// </summary>
- [TimelineName]
- public string? Name { get; set; }
-
- /// <summary>
- /// New title. Null for not change.
- /// </summary>
- public string? Title { get; set; }
-
- /// <summary>
- /// New description. Null for not change.
- /// </summary>
- public string? Description { get; set; }
-
- /// <summary>
- /// New visibility. Null for not change.
- /// </summary>
- public TimelineVisibility? Visibility { get; set; }
- }
-
- public class HttpTimelineControllerAutoMapperProfile : Profile
- {
- public HttpTimelineControllerAutoMapperProfile()
- {
- CreateMap<HttpTimelinePatchRequest, TimelineChangePropertyParams>();
- }
- }
-}