package com.yccrc.kede.enums;

/**
 * 项目类型 1:自主研发 2:委托研发 3:合作研发 4:自主研发(含委托研发)
 *
 * @author zhiqiang.peng
 * @date 2023/8/31
 */
public enum EntProjectTypeEnum {
    AUTONOMY(1, "自主研发"),
    ENTRUST(2, "委托研发"),
    COOPERATION(3, "合作研发"),
    SEMIAUTONOMOUS(4, "自主研发(含委托研发)");

    private Integer code;
    private String desc;

    EntProjectTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    EntProjectTypeEnum() {
    }

    public static String getParse(Integer code) {
        if (code == null) {
            return "";
        }
        for (EntProjectTypeEnum value : EntProjectTypeEnum.values()) {
            if (value.getCode() == code) {
                return value.getDesc();
            }
        }
        return "";
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
