package com.ai.da.common.enums;

import lombok.Getter;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author: yanglei
 * @description: 当前的需要design的Print图片类型 计算用
 * @create: 2022-11-19 17:33
 **/
@Getter
public enum CurrentDesignPrintPictureTypeEnum {
    /**
     * 空白
     */
    NO(1, "空白"),
    /**
     * PIN
     */
    PIN(2, "PIN"),
    /**
     * noPIN
     */
    NO_PIN(3, "noPIN");

    private Integer code;
    private String desc;

    CurrentDesignPrintPictureTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static List<CurrentDesignPrintPictureTypeEnum> ofList(List<Integer> codes) {
        return Stream.of(CurrentDesignPrintPictureTypeEnum.values()).filter(v -> codes.contains(v.code)).collect(Collectors.toList());
    }
}
