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

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 = {ReportDatasourceTypeInEnumValidator.class}
)
public @interface ReportDatasourceTypeInEnum {
    String message() default "数据源类型[type]错误，请检查是否jdbc/spring/api";

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

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