diff options
Diffstat (limited to 'Timeline/Entities/Http')
-rw-r--r-- | Timeline/Entities/Http/User.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Timeline/Entities/Http/User.cs b/Timeline/Entities/Http/User.cs index 24952ac7..d42ca088 100644 --- a/Timeline/Entities/Http/User.cs +++ b/Timeline/Entities/Http/User.cs @@ -23,4 +23,21 @@ public static ReturnCodeMessageResponse Deleted { get; } = new ReturnCodeMessageResponse(DeletedCode, "A existing user is deleted."); public static ReturnCodeMessageResponse NotExists { get; } = new ReturnCodeMessageResponse(NotExistsCode, "User with given name does not exists."); } + + public class ChangePasswordRequest + { + public string OldPassword { get; set; } + public string NewPassword { get; set; } + } + + public static class ChangePasswordResponse + { + public const int SuccessCode = 0; + public const int BadOldPasswordCode = 1; + public const int NotExistsCode = 2; + + public static ReturnCodeMessageResponse Success { get; } = new ReturnCodeMessageResponse(SuccessCode, "Success to change password."); + public static ReturnCodeMessageResponse BadOldPassword { get; } = new ReturnCodeMessageResponse(BadOldPasswordCode, "Old password is wrong."); + public static ReturnCodeMessageResponse NotExists { get; } = new ReturnCodeMessageResponse(NotExistsCode, "Username does not exists, please update token."); + } } |