package com.ai.da.python.vo;

import com.ai.da.common.enums.CollectionLevel2TypeEnum;
import com.ai.da.common.enums.SysFileLevel2TypeEnum;
import lombok.Data;

import java.util.Arrays;
import java.util.List;

@Data
public class DesignPythonItem {
    /**
     * elementId
     */
    private Long elementId;
    /**
     * 生成item实际对应的类型 有:outwear,dress,blouse,skirt,trousers Shoes Hairstyle Earring
     */
    private String type;

    /**
     * 对应的图片的绝对路径
     */
    private String path;

    /**
     * 颜色 存 RGB值 中间空格分隔 比如 "58 58 169"
     */
    private String color;

    private String gradient;

    private String gradientString;

    /**
     * 对应的print图片的绝对路径
     */
    private PrintToPython print;

    /**
     * trims 衣服上的装饰
     */
    private DesignPythonItemElement element;

    /**
     * 对应的icon的绝对路径
     */
    private String icon;

    /**
     * 上游业务id
     */
    private Long businessId;

    /**
     * body 对应路径
     */
    private String body_path;

    /**
     * body 对应路径(后面去掉)
     */
    private String body_mask_path;
    /**
     * python_t_all_info image_id
     */
    private Long imageId;

    /**
     * url在t_sys_file中的id
     */
    private Long image_id;
    /**
     * 图层偏移量（位置）
     */
    private List<Long> offset;
    /**
     * 图层缩放大小
     */
    private Float[] resize_scale;
    /**
     * 图层优先级
     */
    private Integer priority;
    /**
     * 标注过的mask
     */
    private String seg_mask_url;

    public static List<String> OUTWEAR_DRESS_BLOUSE = Arrays.asList(CollectionLevel2TypeEnum.OUTWEAR.getRealName(),
            CollectionLevel2TypeEnum.DRESS.getRealName(), CollectionLevel2TypeEnum.BLOUSE.getRealName());

    public static List<String> DRESS_BLOUSE = Arrays.asList(CollectionLevel2TypeEnum.DRESS.getRealName(),
            CollectionLevel2TypeEnum.BLOUSE.getRealName());

    public static List<String> SKIRT_TROUSERS = Arrays.asList(
            CollectionLevel2TypeEnum.SKIRT.getRealName(), CollectionLevel2TypeEnum.TROUSERS.getRealName());

    public static List<String> OUTWEAR = Arrays.asList(
            "Outwear");

    public static List<String> TOPS = Arrays.asList(
            "Tops");

    public static List<String> BOTTOMS = Arrays.asList(
            "Bottoms");

    public static List<String> OTHERS = Arrays.asList(
            "Others");

    public static List<String> SYS_HAIRSTYLE_SHOES_BODY = Arrays.asList(
            SysFileLevel2TypeEnum.HAIRSTYLE.getRealName(), SysFileLevel2TypeEnum.SHOES.getRealName(),
            SysFileLevel2TypeEnum.EARRINGS.getRealName(), SysFileLevel2TypeEnum.BODY.getRealName());

    public static List<String> SYS_HAIRSTYLE_SHOES = Arrays.asList(
            SysFileLevel2TypeEnum.HAIRSTYLE.getRealName(), SysFileLevel2TypeEnum.SHOES.getRealName(),
            SysFileLevel2TypeEnum.EARRINGS.getRealName());

    public DesignPythonItem() {
    }

    public DesignPythonItem(String type, String bodyPath, Long image_id) {
        this.type = type;
        this.body_path = bodyPath;
        this.image_id = image_id;
    }

    public DesignPythonItem(String type, String path, String color, PrintToPython print, Long businessId,
                            Long image_id, List<Long> offset, Float[] resize_scale, Integer priority, String gradient, String gradientString) {
        this.type = type;
        this.path = path;
        this.color = color;
        this.print = print;
//        this.icon = icon;
        this.businessId = businessId;
        this.image_id = image_id;
        this.offset = offset;
        this.resize_scale = resize_scale;
        this.priority = priority;
        this.gradient = gradient;
        this.gradientString = gradientString;
    }

    public DesignPythonItem(String type, String path, String color, PrintToPython print, Long businessId,
                            Long image_id, List<Long> offset, Float[] resize_scale, Integer priority, String gradient,
                            String gradientString, String seg_mask_url) {
        this.type = type;
        this.path = path;
        this.color = color;
        this.print = print;
//        this.icon = icon;
        this.businessId = businessId;
        this.image_id = image_id;
        this.offset = offset;
        this.resize_scale = resize_scale;
        this.priority = priority;
        this.gradient = gradient;
        this.gradientString = gradientString;
        this.seg_mask_url = seg_mask_url;
    }

    public DesignPythonItem(String type, String path, String color, PrintToPython print, String icon, Long businessId, Long image_id) {
        this.type = type;
        this.path = path;
        this.color = color;
        this.print = print;
        this.icon = icon;
        this.businessId = businessId;
        this.image_id = image_id;
    }
}
