package com.gree.mall.manager.enums.material;

import lombok.Getter;

@Getter
public enum PartsObjectTypeEnum {
    NOT_RETURN("无件返回"),
    NEW_REFUND("新件退库"),
    OLD_REFUND("退旧件"),
    ;

    private final String desc;

    PartsObjectTypeEnum(String desc) {
        this.desc = desc;
    }

    public static PartsObjectTypeEnum findDescByKey(String desc) {
        final PartsObjectTypeEnum[] enums = PartsObjectTypeEnum.values();
        for (PartsObjectTypeEnum typeEnum : enums) {
            if (typeEnum.getDesc().equals(desc)) {
                return typeEnum;
            }
        }
        return null;
    }
}
