Merge branch 'dev_add_auth_1029' into 'master'
Dev add auth 1029 See merge request ql/apismnagaer_backend!8
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace Apimanager_backend.Dtos
|
||||
{
|
||||
public class AdminUpdateUserDto
|
||||
{
|
||||
public string Password { get; set; }
|
||||
public decimal Balance { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,16 @@
|
||||
namespace Apimanager_backend.Dtos
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Apimanager_backend.Dtos
|
||||
{
|
||||
public class CreateUserDto
|
||||
{
|
||||
[Required(ErrorMessage = "用户名必填")]
|
||||
[MaxLength(20,ErrorMessage = "用户名最大长度20字符")]
|
||||
public string Username { get; set; }
|
||||
[Required(ErrorMessage = "密码必填")]
|
||||
public string Password { get; set; }
|
||||
[EmailAddress(ErrorMessage = "邮箱格式错误")]
|
||||
public string Email { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ namespace Apimanager_backend.Dtos
|
||||
{
|
||||
public class RefreshResponseDto
|
||||
{
|
||||
[Required(ErrorMessage = "用户ID必填!")]
|
||||
public int UserId { get; set; }
|
||||
public string? Token { get; set; }
|
||||
[Required(ErrorMessage = "RefreshToken is required")]
|
||||
[Required(ErrorMessage = "刷新令牌必填!")]
|
||||
public string RefreshToken { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Apimanager_backend.Dtos
|
||||
{
|
||||
public class RegisterRequestDto
|
||||
{
|
||||
[Required(ErrorMessage = "用户名必填!")]
|
||||
[MaxLength(20,ErrorMessage = "用户名最长20字符!")]
|
||||
public string Username { get; set; }
|
||||
[Required(ErrorMessage = "密码必填!")]
|
||||
public string Password { get; set; }
|
||||
[Required(ErrorMessage = "邮箱必填!")]
|
||||
public string Email { get; set; }
|
||||
[Required(ErrorMessage = "验证码必填!")]
|
||||
public string VerificationCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Apimanager_backend.Dtos
|
||||
{
|
||||
public class ResetPasswordDto
|
||||
{
|
||||
public string Email { get; set; }
|
||||
public string NewPassword { get; set; }
|
||||
public string Code { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
namespace Apimanager_backend.Dtos
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Apimanager_backend.Dtos
|
||||
{
|
||||
public class UpdateUserDto
|
||||
{
|
||||
public string? password { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user