From 0a0a61b60544a135a61394953bb5bb9dbbfeb241 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 2 Feb 2021 18:59:41 +0800 Subject: ... --- BackEnd/Timeline/Models/Http/UserController.cs | 76 -------------------------- 1 file changed, 76 deletions(-) delete mode 100644 BackEnd/Timeline/Models/Http/UserController.cs (limited to 'BackEnd/Timeline/Models/Http/UserController.cs') diff --git a/BackEnd/Timeline/Models/Http/UserController.cs b/BackEnd/Timeline/Models/Http/UserController.cs deleted file mode 100644 index 1b4d09ec..00000000 --- a/BackEnd/Timeline/Models/Http/UserController.cs +++ /dev/null @@ -1,76 +0,0 @@ -using AutoMapper; -using System.ComponentModel.DataAnnotations; -using Timeline.Controllers; -using Timeline.Models.Validation; -using Timeline.Services; - -namespace Timeline.Models.Http -{ - /// - /// Request model for . - /// - public class HttpUserPatchRequest - { - /// - /// New username. Null if not change. Need to be administrator. - /// - [Username] - public string? Username { get; set; } - - /// - /// New password. Null if not change. Need to be administrator. - /// - [MinLength(1)] - public string? Password { get; set; } - - /// - /// New nickname. Null if not change. Need to be administrator to change other's. - /// - [Nickname] - public string? Nickname { get; set; } - } - - /// - /// Request model for . - /// - public class HttpCreateUserRequest - { - /// - /// Username of the new user. - /// - [Required, Username] - public string Username { get; set; } = default!; - - /// - /// Password of the new user. - /// - [Required, MinLength(1)] - public string Password { get; set; } = default!; - } - - /// - /// Request model for . - /// - public class HttpChangePasswordRequest - { - /// - /// Old password. - /// - [Required(AllowEmptyStrings = false)] - public string OldPassword { get; set; } = default!; - - /// - /// New password. - /// - [Required(AllowEmptyStrings = false)] - public string NewPassword { get; set; } = default!; - } - - public class HttpUserControllerModelAutoMapperProfile : Profile - { - public HttpUserControllerModelAutoMapperProfile() - { - CreateMap(); - } - } -} -- cgit v1.2.3