Kavita/API/DTOs/Account/ResetPasswordDto.cs
2025-05-04 07:14:44 -07:00

23 lines
641 B
C#

using System.ComponentModel.DataAnnotations;
namespace API.DTOs.Account;
public sealed record ResetPasswordDto
{
/// <summary>
/// The Username of the User
/// </summary>
[Required]
public string UserName { get; init; } = default!;
/// <summary>
/// The new password
/// </summary>
[Required]
[StringLength(256, MinimumLength = 6)]
public string Password { get; init; } = default!;
/// <summary>
/// The old, existing password. If an admin is performing the change, this is not required. Otherwise, it is.
/// </summary>
public string OldPassword { get; init; } = default!;
}