package com.ai.da.common.enums;

import java.util.stream.Stream;

/**
 * @author yanglei
 * @description single模式下的类别选择参数枚举 有outwear,dress,blouse,skirt,trousers
 * @create 2022-10-3 17:33
 **/
public enum SwitchCategoryEnum {
    /**
     * 外套
     */
    OUTWEAR("Outwear"),
    /**
     * 连衣裙
     */
    DRESS("Dress"),
    /**
     * 衬衫
     */
    BLOUSE("Blouse"),
    /**
     * 短裙
     */
    SKIRT("Skirt"),
    /**
     * 裤子
     */
    TROUSERS("Trousers"),
    TOPS("Tops"),
    BOTTOMS("Bottoms"),
    ;

    private String realName;

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

    public String getRealName() {
        return realName;
    }

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