package com.cf.imes.module.report.validation.template;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 自定义报表模板生成文件类型入参校验注解
 *
 * @author Gqr
 * @since 2024/7/17 9:33
 */
@Target({
        ElementType.METHOD,
        ElementType.FIELD,
        ElementType.ANNOTATION_TYPE,
        ElementType.CONSTRUCTOR,
        ElementType.PARAMETER,
        ElementType.TYPE_USE
})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
        validatedBy = {ReportTemplateProducerTypeInEnumValidator.class}
)
public @interface ReportTemplateProducerTypeInEnum {
    String message() default "类型错误，请检查是否PDF/WORD/EXCEL";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
