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.io.Serializable;
import java.util.List;

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

    @ApiModelProperty("single -> true,overall -> false")
    private Boolean ifSingle;

    @ApiModelProperty("印花的类型 Slogan || Logo || Pattern")
    private String level2Type;

    @ApiModelProperty("印花是用户上传的还是从library中选的 collection/library/Generate")
    private String designType;

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

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

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

    @ApiModelProperty("印花大小")
    @Range(max = 1, message = "印花缩放值需用大于等于0小于等于1的数表示")
    private List<Float> 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, List<Float> scale) {
        this.path = path;
        this.scale = scale;
    }

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