package com.hz.pm.api.projectlib.model.enumeration;

import java.util.Objects;

import org.apache.commons.lang3.StringUtils;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 综合业务领域枚举
 *
 * @return
 * @author CMM
 * @since 2023/03/16 16:27
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum BizDomainEnum {
    /**
     * 项目类型
     */
    PARTY_GOV_ORG_OVERALL(1, "党政机关整体智治"),
    DIG_GOV(2, "数字政府"),
    DIG_ECO(3, "数字经济"),
    DIG_SOC(4, "数字社会"),
    DIG_LAW(5, "数字法治"),
    ALL_INTEL_PUB_DATA_PLAT(6, "一体化智能化公共数据平台"),
    DIG_CUL(7, "数字文化"),
    GRA_WISE(8, "基层智治");


    private Integer code;
    private String desc;

    public static String getDescByCode(Integer code) {
        if (Objects.isNull(code)) {
            return StringUtils.EMPTY;
        }
        for (BizDomainEnum t : BizDomainEnum.values()) {
            if (code.equals(t.getCode())) {
                return t.desc;
            }
        }
        return StringUtils.EMPTY;
    }
}
