package com.multictrl.modules.business.dto.camera;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 框选变焦参数
 *
 * @author Sdy
 * @since 1.0.0 2026/4/28
 */
@Data
@Schema(name = "框选变焦参数")
public class FrameZoom {

    @DecimalMax(value = "1", message = "目标框左上角点坐标x最大值为1")
    @DecimalMin(value = "0", message = "目标框左上角点坐标x最小值为0")
    @NotNull(message = "目标框左上角点坐标x不能为空")
    @Schema(description = "目标框左上角点坐标x")
    private Float x;

    @DecimalMax(value = "1", message = "目标框左上角点坐标y最大值为1")
    @DecimalMin(value = "0", message = "目标框左上角点坐标y最小值为0")
    @NotNull(message = "目标框左上角点坐标y不能为空")
    @Schema(description = "目标框左上角点坐标y")
    private Float y;

    @DecimalMax(value = "1", message = "目标框宽度最大值为1")
    @DecimalMin(value = "0", message = "目标框宽度最小值为0")
    @NotNull(message = "目标框宽度不能为空")
    @Schema(description = "目标框宽度")
    private Float width;

    @DecimalMax(value = "1", message = "目标框高度最大值为1")
    @DecimalMin(value = "0", message = "目标框高度最小值为0")
    @NotNull(message = "目标框高度不能为空")
    @Schema(description = "目标框高度")
    private Float height;
}
