aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/Http/TimelineController.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-02-03 17:50:17 +0800
committercrupest <crupest@outlook.com>2020-02-03 17:50:17 +0800
commit4b2569368073bbd556bbe71bd51807de91f814cb (patch)
tree9f9747d30d15abf8389527039db542c961135b1f /Timeline/Models/Http/TimelineController.cs
parent10985f0a26010988d26777d5a6d985b4fbc0a776 (diff)
downloadtimeline-4b2569368073bbd556bbe71bd51807de91f814cb.tar.gz
timeline-4b2569368073bbd556bbe71bd51807de91f814cb.tar.bz2
timeline-4b2569368073bbd556bbe71bd51807de91f814cb.zip
Add TimelineController.
Diffstat (limited to 'Timeline/Models/Http/TimelineController.cs')
-rw-r--r--Timeline/Models/Http/TimelineController.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Timeline/Models/Http/TimelineController.cs b/Timeline/Models/Http/TimelineController.cs
index f9a4d3e5..6d461bb9 100644
--- a/Timeline/Models/Http/TimelineController.cs
+++ b/Timeline/Models/Http/TimelineController.cs
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations;
+using Timeline.Models.Validation;
namespace Timeline.Models.Http
{
@@ -11,6 +12,13 @@ namespace Timeline.Models.Http
public DateTime? Time { get; set; }
}
+ public class TimelineCreateRequest
+ {
+ [Required]
+ [TimelineName]
+ public string Name { get; set; } = default!;
+ }
+
public class TimelinePatchRequest
{
public string? Description { get; set; }