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.PropertyDynamicSelect;
import com.codvision.base.annotation.ExcelSelected;
import com.codvision.base.entity.ExcelErrorRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author hxl
 */
@Data
@ColumnWidth(30)
@ContentRowHeight(16)
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
public class OrgExcel extends ExcelErrorRecord {

    @ExcelProperty(value = "组织名称")
    private String name;

    @ExcelProperty(value = "父级组织路径")
    private String parentOrgName;

    @ExcelProperty(value = "属性")
    @ExcelSelected(sourceClass = PropertyDynamicSelect.class)
    @ApiModelProperty(value = "属性名称")
    private String orgPropertyName;

    @ExcelSelected(source = {"行政区划", "部门"})
    @ExcelProperty(value = "组织类型")
    @ApiModelProperty("组织类型")
    private String type;

    @ExcelProperty(value = "行政区划编码")
    @ApiModelProperty("行政区划编码")
    private String districtCode;
}
