maven
9 天以前 38225792c525a5657a376678a9c4ef58375f213e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.ruoyi.common.utils.excel;
 
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
 
/**
 * @author sunnyzyq
 * @date 2021/12/17
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExcelImport {
 
    /** 字段名称 */
    String value();
 
    /** 导出映射,格式如:0-未知;1-男;2-女 */
    String kv() default "";
 
    /** 是否为必填字段(默认为非必填) */
    boolean required() default false;
 
    /** 最大长度(默认255) */
    int maxLength() default 255;
 
    /** 导入唯一性验证(多个字段则取联合验证) */
    boolean unique() default false;
 
}