package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.system.convert.excel.LocalDateConvert;
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDate;

/**
 * 用户 Excel 导入 VO
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
public class UserImportExcelVO {

    private String username;

    @ExcelProperty("员工编号")
    private String userNumber;

    @ExcelProperty("用户名称")
    private String nickname;

    @ExcelProperty("手机号码")
    private String mobile;

    @ExcelProperty(value = "用户性别", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.USER_SEX)
    private Integer sex;

    @ExcelProperty(value = "证件类型",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.PAPERS_TYPE)
    private String idType;

    @ExcelProperty("证件号码")
    private String idNumber;

    @ExcelProperty("部门")
    private String deptName;

    @ExcelProperty("角色")
    private String roleName;

    @ExcelProperty("用户邮箱")
    private String email;

    @ExcelProperty(value = "出生日期")
    private LocalDate birthday;

    @ExcelProperty(value = "民族",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.NATION_ARR)
    private String nation;

    @ExcelProperty("籍贯")
    private String nativePlace;

    @ExcelProperty("居住地址")
    private String residentialAddress;

    @ExcelProperty(value = "政治面貌",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.POLITICAL_ARR)
    private String isPartyMember;

    @ExcelProperty(value = "婚姻情况",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.MARITAL_STATUS_ARR)
    private String maritalStatus;

    @ExcelProperty(value = "最高学历",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.EDUCATION_BACKGROUND)
    private String highestDegree;

    @ExcelProperty("毕业院校")
    private String graduateSchool;

    @ExcelProperty("专业")
    private String major;

    @ExcelProperty("毕业年份")
    private String graduationYear;

    @ExcelProperty(value = "账号状态", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.COMMON_STATUS)
    private Integer status;

}
