package com.inspect.base.core.annotation;

import com.inspect.base.core.utils.poi.ExcelHandlerAdapter;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
public @interface Excel {
   int sort() default Integer.MAX_VALUE;

   String name() default "";

   String dateFormat() default "";

   String readConverterExp() default "";

   String separator() default ",";

   int scale() default -1;

   int roundingMode() default 6;

   Excel.ColumnType cellType() default Excel.ColumnType.STRING;

   double height() default 14.0D;

   double width() default 16.0D;

   String suffix() default "";

   String defaultValue() default "";

   String prompt() default "";

   String[] combo() default {};

   boolean isExport() default true;

   String targetAttr() default "";

   boolean isStatistics() default false;

   Excel.Align align() default Excel.Align.AUTO;

   Class<?> handler() default ExcelHandlerAdapter.class;

   String[] args() default {};

   Excel.Type type() default Excel.Type.ALL;

   public static enum ColumnType {
      NUMERIC(0),
      STRING(1),
      IMAGE(2);

      private final int value;

      private ColumnType(int value) {
         this.value = value;
      }

      public int value() {
         return this.value;
      }
   }

   public static enum Type {
      ALL(0),
      EXPORT(1),
      IMPORT(2);

      private final int value;

      private Type(int value) {
         this.value = value;
      }

      public int value() {
         return this.value;
      }
   }

   public static enum Align {
      AUTO(0),
      LEFT(1),
      CENTER(2),
      RIGHT(3);

      private final int value;

      private Align(int value) {
         this.value = value;
      }

      public int value() {
         return this.value;
      }
   }
}
