blob: 4eb02928134b88929ad3b05efea612c15858c73a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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!;
[Nickname]
public string? Nickname { get; set; }
}
}
|