package com.smppw.common.pojo.enums;

import java.util.Arrays;

public enum CombinationType {

    MANUALLY_CREATE(1,"手动创建"),AUTO_CREATE(2,"智能创建");

    private final int code;

    private final String desc;

    CombinationType(int type, String desc) {
        this.code= type;
        this.desc=desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static CombinationType getCombinationByCode(int code){
        return Arrays.stream(CombinationType.values()).filter(p->p.code == code).findFirst().orElse(null);
    }
}
