package ink.wgink.service.user.excel;

import com.alibaba.excel.annotation.ExcelProperty;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: UserExcel
 * @Description: 用户Excel
 * @Author: WangGeng
 * @Date: 2020/1/6 11:11 下午
 * @Version: 1.0
 **/
public class UserExcel {

    @ExcelProperty(index = 0)
    private String userUsername;
    @ExcelProperty(index = 1)
    private String userName;
    @ExcelProperty(index = 2)
    private String userPhone;
    @ExcelProperty(index = 3)
    private String userEmail;

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

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

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

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

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

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

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

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

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