package com.ai.da.common.enums;

import java.util.stream.Stream;

/**
 * @author yanglei
 * @description collection 一级类型枚举 Moodboard Printboard  Sketchboard MarketingSketch
 * @create 2022-10-3 17:33
 **/
public enum CollectionLevel1TypeEnum {
    /**
     * 情绪版
     */
    MOOD_BOARD("Moodboard"),
    /**
     * 印花版
     */
    PRINT_BOARD("Printboard"),
    /**
     * 手稿
     */
    SKETCH_BOARD("Sketchboard"),
    /**
     * 颜色板(js识别暂时存后端 不绑定collection)
     */
    COLOR_BOARD("Colorboard"),
    /**
     * 市场
     */
    MARKETING_SKETCH("MarketingSketch"),

    MODEL("Models");

    private String realName;

    CollectionLevel1TypeEnum(String realName) {
        this.realName = realName;
    }

    public String getRealName() {
        return realName;
    }

    public static CollectionLevel1TypeEnum uploadOf(String realName) {
        return Stream.of(CollectionLevel1TypeEnum.values())
                .filter(v -> v.getRealName().equals(realName)).findFirst().orElse(null);
    }
}
