package ink.wgink.register.base.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: RegisterVO
 * @Description: 注册
 * @Author: WangGeng
 * @Date: 2020/6/2 10:56 下午
 * @Version: 1.0
 **/
@ApiModel
public class RegisterDefaultVO {

    @ApiModelProperty(name = "username", value = "用户名")
    @CheckEmptyAnnotation(name = "用户名", verifyType = "username")
    private String username;
    @ApiModelProperty(name = "password", value = "密码")
    @CheckEmptyAnnotation(name = "密码")
    private String password;
    @ApiModelProperty(name = "passwordSame", value = "相同密码")
    @CheckEmptyAnnotation(name = "passwordSame")
    private String passwordSame;

    public String getUsername() {
        return username == null ? "" : username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password == null ? "" : password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPasswordSame() {
        return passwordSame == null ? "" : passwordSame;
    }

    public void setPasswordSame(String passwordSame) {
        this.passwordSame = passwordSame;
    }

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