package com.jeesharp.business.modules.tool.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 图片处理请求 DTO
 */
@Data
@Schema(description = "图片处理请求参数")
public class ImageProcessDTO {

    @Schema(description = "输出宽度 (px)", example = "694")
    @NotNull(message = "输出宽度不能为空")
    @Min(value = 1, message = "输出宽度最小为1")
    @Max(value = 4096, message = "输出宽度最大为4096")
    private Integer width;

    @Schema(description = "输出高度 (px)", example = "400")
    @NotNull(message = "输出高度不能为空")
    @Min(value = 1, message = "输出高度最小为1")
    @Max(value = 4096, message = "输出高度最大为4096")
    private Integer height;

    @Schema(description = "输出格式 (jpeg/png/webp/gif)", example = "jpeg")
    @NotBlank(message = "输出格式不能为空")
    private String format;

    @Schema(description = "质量百分比 (1-100)", example = "80")
    @NotNull(message = "质量百分比不能为空")
    @Min(value = 1, message = "质量百分比最小为1")
    @Max(value = 100, message = "质量百分比最大为100")
    private Integer quality;

    @Schema(description = "文件大小限制 (KB)，0表示不限制", example = "600")
    @Min(value = 0, message = "文件大小限制不能为负数")
    private Integer maxFileSizeKB;

    @Schema(description = "存储桶名称", example = "images/tool")
    private String bucket;
}
