From 253b06dfaa091d986a8714c081fd1e01679f538a Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 10 Feb 2021 02:03:06 +0800 Subject: ... --- .../Models/Http/HttpTimelinePostCreateRequest.cs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'BackEnd/Timeline/Models/Http/HttpTimelinePostCreateRequest.cs') diff --git a/BackEnd/Timeline/Models/Http/HttpTimelinePostCreateRequest.cs b/BackEnd/Timeline/Models/Http/HttpTimelinePostCreateRequest.cs index b25adf36..20d1a25b 100644 --- a/BackEnd/Timeline/Models/Http/HttpTimelinePostCreateRequest.cs +++ b/BackEnd/Timeline/Models/Http/HttpTimelinePostCreateRequest.cs @@ -1,16 +1,34 @@ using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Timeline.Models.Validation; namespace Timeline.Models.Http { + public class HttpTimelinePostCreateRequestData + { + /// + /// Kind of the data. + /// + [Required] + [TimelinePostDataKind] + public string Kind { get; set; } = default!; + + /// + /// The true data. If kind is text or markdown, this is a string. If kind is image, this is base64 of data. + /// + [Required] + public string Data { get; set; } = default!; + } + public class HttpTimelinePostCreateRequest { /// - /// Content of the new post. + /// Data list of the new content. /// [Required] - public HttpTimelinePostCreateRequestContent Content { get; set; } = default!; + [MinLength(1)] + public List DataList { get; set; } = default!; /// /// Time of the post. If not set, current time will be used. -- cgit v1.2.3