package ink.wgink.service.user.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: UpdateUserUsernameVO
 * @Description: 修改用户名
 * @Author: WangGeng
 * @Date: 2020/5/21 10:04 下午
 * @Version: 1.0
 **/
@ApiModel
public class UpdateUsernameVO {

    @ApiModelProperty(name = "username", value = "用户名")
    @CheckEmptyAnnotation(name = "用户名", regex = "username")
    private String username;
    @ApiModelProperty(name = "updateReason", value = "修改原因")
    @CheckEmptyAnnotation(name = "修改原因")
    private String updateReason;

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

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

    public String getUpdateReason() {
        return updateReason == null ? "" : updateReason.trim();
    }

    public void setUpdateReason(String updateReason) {
        this.updateReason = updateReason;
    }

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