package com.ai.da.common.enums;

import java.util.stream.Stream;

/**
 * @author yanglei
 * @description Top枚举  基于CollectionLevel1TypeEnum 是Sketchboard的二级类型分类
 * @create 2022-10-3 17:33
 **/
public enum LibraryTopTypeEnum {
    /**
     * TOP 包括 Outwear Dress  Blouse
     */
    TOP("Top"),
    /**
     * 包括 Skirt Trousers
     */
    BOTTOM("Bottom"),
    /**
     * Print
     */
    PRINT("Print");

    private String realName;

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

    public String getRealName() {
        return realName;
    }

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

}
