package com.ai.da.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import java.util.List;

@Data
@ApiModel("design single 印花详情")
public class DesignSinglePrint {

    @ApiModelProperty("印花url")
    private String path;

    @ApiModelProperty("印花minIO路径")
    private String minIOPath;

    @ApiModelProperty("印花位置")
    private List<Double> location;

    @ApiModelProperty("印花大小")
    @Range(max = 1, message = "印花缩放值需用大于等于0小于等于1的数表示")
    private Double scale;

    @Range(min = -360, max = 360, message = "印花旋转角度范围为-360° ~ 360°")
    @ApiModelProperty("印花角度")
    private Double angle;

    @Min(value = 1)
    @ApiModelProperty("印花优先级")
    private Integer priority;

    public DesignSinglePrint() {
    }

    public DesignSinglePrint(String path, Double scale) {
        this.path = path;
        this.scale = scale;
    }

    public DesignSinglePrint(String path, String minIOPath, List<Double> location, Double scale, Double angle, Integer priority) {
        this.path = path;
        this.minIOPath = minIOPath;
        this.location = location;
        this.scale = scale;
        this.angle = angle;
        this.priority = priority;
    }
}
