package cn.lihongjie.coal.validator;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import jakarta.validation.*;
import jakarta.validation.constraints.*;

import java.lang.annotation.*;
import java.lang.annotation.Documented;

@NotNull
@Target({ TYPE, ANNOTATION_TYPE, TYPE_USE })
@Require(field = "code")
@Retention(RUNTIME)
@Constraint(validatedBy = { })
@Documented
@ReportAsSingleViolation
public @interface RequireCode {

    String message() default "{require.code}";

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

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