package com.dsk.system.domain.vo;

import com.alibaba.excel.annotation.ExcelProperty;
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;

    /**
     * 所属部门
     */
    @ExcelProperty(value = "*所属部门")
    private String deptName;

    /**
     * 用户昵称
     */
    @ExcelProperty(value = "*用户昵称")
    private String nickName;

    /**
     * 手机号码
     */
    @ExcelProperty(value = "*手机号码")
    private String phonenumber;

    /**
     * 用户角色
     */
    @ExcelProperty(value = "*用户角色")
    private String roleName;

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

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