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: ForgetPasswordVO
 * @Description: 忘记密码
 * @Author: WangGeng
 * @Date: 2019-08-15 18:41
 * @Version: 1.0
 **/
@ApiModel
public class UpdatePhonePasswordVO {

    @ApiModelProperty(name = "phone", value = "手机号")
    @CheckEmptyAnnotation(name = "手机号")
    private String phone;
    @ApiModelProperty(name = "verificationCode", value = "验证码")
    @CheckEmptyAnnotation(name = "验证码")
    private String verificationCode;
    @ApiModelProperty(name = "newPassword", value = "新密码")
    @CheckEmptyAnnotation(name = "新密码")
    private String newPassword;

    public String getPhone() {
        return phone == null ? "" : phone.trim();
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getVerificationCode() {
        return verificationCode == null ? "" : verificationCode.trim();
    }

    public void setVerificationCode(String verificationCode) {
        this.verificationCode = verificationCode;
    }

    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("\"verificationCode\":\"")
                .append(verificationCode).append('\"');
        sb.append(",\"newPassword\":\"")
                .append(newPassword).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
