package com.cf.imes.module.system.validation.products;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.*;

/**
 * 产品详情购买方式校验注解
 */
@Target({
        ElementType.FIELD,
})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
        validatedBy = {ProductTypeValidator.class}
)
public @interface ProductType {

    String message() default "购买方式不合法：0 时长；1 产量";

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

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