package cn.estsh.i3plus.pojo.aps.annotation;

import cn.estsh.i3plus.pojo.aps.validator.MainKeyValidator;

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

/**
 * @Description : 主键校验注解
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2019-11-29
 * @Modify:
 **/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy={MainKeyValidator.class})
public @interface MainKey {
    String message() default "主键重复";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
