package ink.wgink.pojo.vos;

import ink.wgink.annotation.CheckEmptyAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: AppChangePasswordVO
 * @Description: App修改密码
 * @Author: WangGeng
 * @Date: 2019-08-15 18:41
 * @Version: 1.0
 **/
@ApiModel
public class UpdatePasswordVO {

    @ApiModelProperty(name = "oldPassword", value = "旧密码")
    @CheckEmptyAnnotation(name = "旧密码")
    private String oldPassword;
    @ApiModelProperty(name = "newPassword", value = "新密码")
    @CheckEmptyAnnotation(name = "新密码")
    private String newPassword;

    public String getOldPassword() {
        return oldPassword == null ? "" : oldPassword.trim();
    }

    public void setOldPassword(String oldPassword) {
        this.oldPassword = oldPassword;
    }

    public String getNewPassword() {
        return newPassword == null ? "" : newPassword.trim();
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"oldPassword\":")
                .append("\"").append(oldPassword).append("\"");
        sb.append(",\"newPassword\":")
                .append("\"").append(newPassword).append("\"");
        sb.append('}');
        return sb.toString();
    }
}
