aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-03-06 23:04:13 +0800
committerGitHub <noreply@github.com>2021-03-06 23:04:13 +0800
commitffdbd6e8a69678462ec08ca894b9f8d7b3fc1516 (patch)
tree246541d65473634839d5536b1111f7b742f54dab /BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs
parent51d0e48890069d81e383aef01e31da0a6d990e7a (diff)
parent890fef4f276ec44312eb936583adbbf47d7cfe9d (diff)
downloadtimeline-ffdbd6e8a69678462ec08ca894b9f8d7b3fc1516.tar.gz
timeline-ffdbd6e8a69678462ec08ca894b9f8d7b3fc1516.tar.bz2
timeline-ffdbd6e8a69678462ec08ca894b9f8d7b3fc1516.zip
Merge pull request #347 from crupest/markdown
Markdown post auto translate data url.
Diffstat (limited to 'BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs')
-rw-r--r--BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs b/BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs
new file mode 100644
index 00000000..c8cc004b
--- /dev/null
+++ b/BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs
@@ -0,0 +1,24 @@
+using System.ComponentModel.DataAnnotations;
+using Timeline.Controllers;
+using Timeline.Models.Validation;
+
+namespace Timeline.Models.Http
+{
+ /// <summary>
+ /// Request model for <see cref="UserController.Post(HttpUserPostRequest)"/>.
+ /// </summary>
+ public class HttpUserPostRequest
+ {
+ /// <summary>
+ /// Username of the new user.
+ /// </summary>
+ [Required, Username]
+ public string Username { get; set; } = default!;
+
+ /// <summary>
+ /// Password of the new user.
+ /// </summary>
+ [Required, MinLength(1)]
+ public string Password { get; set; } = default!;
+ }
+}