package ink.wgink.service.user.pojo.vos;

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

/**
 * @ClassName: UserVO
 * @Description: 用户视图对象
 * @Author: WangGeng
 * @Date: 2019/3/3 9:49 PM
 * @Version: 1.0
 **/
@ApiModel
public class UserVO {

    @ApiModelProperty(name = "userUsername", value = "用户名")
    @CheckEmptyAnnotation(name = "用户名")
    private String userUsername;
    @ApiModelProperty(name = "userPassword", value = "密码")
    private String userPassword;
    @ApiModelProperty(name = "userName", value = "昵称")
    @CheckEmptyAnnotation(name = "昵称")
    private String userName;
    @ApiModelProperty(name = "userType", value = "用户类型，1：系统用户，2：普通该用户")
    @CheckNumberAnnotation(name = "用户类型", types = {"1", "2"})
    private Integer userType;
    @ApiModelProperty(name = "userState", value = "用户状态，0：正常，1：冻结，2：锁定")
    @CheckNumberAnnotation(name = "用户状态", types = {"0", "1", "2"})
    private Integer userState;
    @ApiModelProperty(name = "userPhone", value = "用户电话")
    private String userPhone;
    @ApiModelProperty(name = "userEmail", value = "用户邮件")
    private String userEmail;
    @ApiModelProperty(name = "userExpiredDate", value = "过期时间")
    private String userExpiredDate;
    @ApiModelProperty(name = "userAvatar", value = "用户头像ID")
    private String userAvatar;
    @ApiModelProperty(name = "remarks", value = "备注")
    private String remarks;

    public String getUserUsername() {
        return userUsername == null ? "" : userUsername.trim();
    }

    public void setUserUsername(String userUsername) {
        this.userUsername = userUsername;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public String getUserName() {
        return userName == null ? "" : userName.trim();
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getUserState() {
        return userState;
    }

    public void setUserState(Integer userState) {
        this.userState = userState;
    }

    public String getUserPhone() {
        return userPhone == null ? "" : userPhone.trim();
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserEmail() {
        return userEmail == null ? "" : userEmail.trim();
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserExpiredDate() {
        return userExpiredDate == null ? "" : userExpiredDate;
    }

    public void setUserExpiredDate(String userExpiredDate) {
        this.userExpiredDate = userExpiredDate;
    }

    public String getUserAvatar() {
        return userAvatar == null ? "" : userAvatar.trim();
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public String getRemarks() {
        return remarks == null ? "" : remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"userUsername\":\"")
                .append(userUsername).append('\"');
        sb.append(",\"userPassword\":\"")
                .append(userPassword).append('\"');
        sb.append(",\"userName\":\"")
                .append(userName).append('\"');
        sb.append(",\"userType\":")
                .append(userType);
        sb.append(",\"userState\":")
                .append(userState);
        sb.append(",\"userPhone\":\"")
                .append(userPhone).append('\"');
        sb.append(",\"userEmail\":\"")
                .append(userEmail).append('\"');
        sb.append(",\"userExpiredDate\":\"")
                .append(userExpiredDate).append('\"');
        sb.append(",\"userAvatar\":\"")
                .append(userAvatar).append('\"');
        sb.append(",\"remarks\":\"")
                .append(remarks).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
