package com.codvision.auth.entity.excel;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.codvision.auth.support.excel.EducationDynamicSelect;
import com.codvision.auth.support.excel.NationDynamicSelect;
import com.codvision.auth.support.excel.NationalityDynamicSelect;
import com.codvision.base.annotation.ExcelSelected;
import com.codvision.base.entity.ExcelErrorRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author KX
 * @date 2023/5/17 10:33
 */
@Data
@ColumnWidth(30)
@ContentRowHeight(16)
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
public class PersonExcel extends ExcelErrorRecord {

    @ExcelProperty("姓名")
    @ApiModelProperty("姓名")
    private String name;

    @ExcelProperty("曾用名")
    @ApiModelProperty("曾用名")
    private String usedName;

    @ExcelProperty("所属组织")
    @ApiModelProperty("所属组织")
    private String orgPath;

    @ExcelSelected(source = {"未知的性别", "男性", "女性", "未说明的性别"})
    @ExcelProperty("性别")
    @ApiModelProperty("性别-字典(PERSON_SEX)")
    private String sex;

    @ExcelProperty("年龄")
    @ApiModelProperty("年龄")
    private String age;

    @ExcelProperty("联系电话")
    @ApiModelProperty("联系电话")
    private String phone;

    @ExcelSelected(source = {"身份证", "居住证", "签证", "护照", "军人证", "港澳通行证"})
    @ExcelProperty("证件类型")
    @ApiModelProperty("证件类型-字典(ID_TYPE)")
    private String idType;

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

    @ExcelSelected(source = {"户籍人口", "流动人口", "境外人口", "其他人口"})
    @ExcelProperty("人口类型")
    @ApiModelProperty("人口类型-字典(PERSON_TYPE)")
    private String personType;


    @ExcelSelected(sourceClass = NationDynamicSelect.class)
    @ExcelProperty("民族")
    @ApiModelProperty("民族-字典(NATION)")
    private String nation;

    @ExcelSelected(sourceClass = EducationDynamicSelect.class)
    @ExcelProperty("文化程度")
    @ApiModelProperty("文化程度-字典(EDUCATION)")
    private String education;

    @ExcelSelected(source = {"社区矫正人员", "吸毒人员", "严重精神障碍患者", "刑释人员", "重点关爱青少年人员", "残疾人员", "60岁以上老人", "救助对象"})
    @ExcelProperty("人员标签")
    @ApiModelProperty("人员标签(,逗号隔开)")
    private String personTags;

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

    @ExcelSelected(sourceClass = NationalityDynamicSelect.class)
    @ExcelProperty("国籍")
    @ApiModelProperty("国籍-字典(NATIONALITY)")
    private String nationality;

    @ExcelProperty("出生日期")
    @ApiModelProperty("出生日期")
    private String birthday;

    @ExcelSelected(source = {"未婚", "已婚", "初婚", "再婚", "复婚", "丧偶", "离婚", "未说明的婚姻状况"})
    @ExcelProperty("婚姻状况")
    @ApiModelProperty("婚姻状况-字典(MARITAL_STATUS)")
    private String maritalStatus;

    @ExcelSelected(source = {"中共党员", "中共预备党员", "共青团员", "民主党派", "群众", "其他"})
    @ExcelProperty("政治面貌")
    @ApiModelProperty("政治面貌-字典(POLITIC_FACE)")
    private String politicFace;

    @ExcelSelected(source = {"未服兵役", "退出现役", "士兵预备役", "军官预备役", "服现役", "其他"})
    @ExcelProperty("兵役状况")
    @ApiModelProperty("兵役状况-字典(MILITARY_STATUS)")
    private String militaryStatus;

    @ExcelSelected(source = {"无宗教信仰", "佛教", "喇嘛教", "道教", "天主教", "基督教", "东正教", "伊斯兰教", "其他"})
    @ExcelProperty("宗教信仰")
    @ApiModelProperty("宗教信仰-字典(RELIGIOUS)")
    private String religious;

    @ExcelProperty("现住地详址")
    @ApiModelProperty("现住地详址")
    private String inhabitedAddress;

    @ExcelProperty("户籍地详址")
    @ApiModelProperty("户籍地详址")
    private String residenceAddress;

    @ExcelProperty("备注")
    @ApiModelProperty("备注")
    private String remark;

}
