package com.ai.da.common.enums;

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

/**
 * @author yanglei
 * @description collection 二级类型 Outwear Dress Blouse Skirt Trousers(只争对Sketchboard)
 * @create 2022-10-3 17:33
 **/
public enum CollectionLevel2TypeEnum {
    /**
     * 外套
     */
    OUTWEAR("Outwear"),
    /**
     * 裙子
     */
    DRESS("Dress"),
    /**
     * 衬衫
     */
    BLOUSE("Blouse"),
    /**
     * 短裙
     */
    SKIRT("Skirt"),
    /**
     * 裤子
     */
    TROUSERS("Trousers"),
    /**
     * 男装上装
     */
    TOPS("Tops"),
    /**
     * 男装下装
     */
    BOTTOMS("Bottoms"),
    /**
     * 印花-logo
     */
    LOGO("Logo"),
    /**
     * 印花-slogan
     */
    SLOGAN("Slogan"),
    /**
     * 印花-图案
     */
    Pattern("Pattern");

    private String realName;

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

    public String getRealName() {
        return realName;
    }

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

    public static List<String> printType() {
        return Arrays.asList(LOGO.getRealName(), SLOGAN.getRealName(), Pattern.getRealName());
    }
    public static CollectionLevel2TypeEnum ofWithLoweCase(String realName) {
        return Stream.of(CollectionLevel2TypeEnum.values()).filter(v -> v.getRealName().toLowerCase().equals(realName)).findFirst().orElse(null);
    }
}
