package com.backendsys.entity.validator;

import jakarta.validation.Constraint;
import org.springframework.messaging.handler.annotation.Payload;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Constraint(validatedBy = MultipartFileSizeValidator.class)
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface FileSizeLimit {
    String message() default "File size must be less than {maxSize} bytes";
    long maxSize();
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}