package com.cf.imes.module.executor.validation.manage.common;

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;

/**
 * 状态校验注解
 */
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = CommonStatusValidator.class)
@Documented
public @interface ValidCommonStatus {
    String message() default "状态值必须为 0：未使用、1：已使用 ";

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

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