From 6edc70c00bca22e13ade23472d48d7b940f92eef Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sat, 17 Aug 2019 19:56:42 +0800 Subject: Add change username. --- Timeline/Models/Http/User.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Timeline/Models') diff --git a/Timeline/Models/Http/User.cs b/Timeline/Models/Http/User.cs index d45543fb..4308a19c 100644 --- a/Timeline/Models/Http/User.cs +++ b/Timeline/Models/Http/User.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations; +using Timeline.Models.Validation; namespace Timeline.Models.Http { @@ -16,6 +17,15 @@ namespace Timeline.Models.Http public bool? Administrator { get; set; } } + public class ChangeUsernameRequest + { + [Required] + public string OldUsername { get; set; } + + [Required, ValidateWith(typeof(UsernameValidator))] + public string NewUsername { get; set; } + } + public class ChangePasswordRequest { [Required] -- cgit v1.2.3