package com.dsk.system.domain.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用户对象导入VO
 *
 * @author Lion Li
 */

@Data
@NoArgsConstructor
// @Accessors(chain = true) // 导入不允许使用 会找不到set方法
public class SysUserImportVo implements Serializable {

    //如需修改以下字段,需同步修改
    private static final long serialVersionUID = 1L;

    /**
     * 所属组织
     */
    @Excel(name = "所属组织（必填）")
    private String deptName;

    /**
     * 用户昵称
     */
    @Excel(name = "用户名称（必填）")
    private String nickName;

    /**
     * 手机号码
     */
    @Excel(name = "手机号码（必填）")
    private String phonenumber;

    /**
     * 用户角色
     */
    @Excel(name = "用户角色")
    private String roleName;

    /**
     * 失败原因
     * 该字段无需同步到模板中
     */
    @Excel(name = "失败原因")
    private String failReason;

    public SysUserImportVo(String deptName, String nickName, String phonenumber, String roleName) {
        this.deptName = deptName.replace(" ", "");
        this.nickName = nickName.replace(" ", "");
        this.phonenumber = phonenumber.replace(" ", "");
        this.roleName = roleName.replace(" ", "");
    }
}
