diff options
Diffstat (limited to 'BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs')
-rw-r--r-- | BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs | 24 |
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!;
+ }
+}
|