package cn.axzo.workflow.common.constraint;

import javax.validation.Constraint;
import javax.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 wangli
 * @since 2024/4/22 15:17
 */

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = AttachmentConstraintValidator.class)
@Documented
public @interface AttachmentValidator {

    String message() default "附件校验不通过";

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

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

    AttachmentTypeValidator[] types();
}
