package cn.hanghui.outapi.platform.tenant.entity.enums;

import cn.hanghui.outapi.platform.common.utils.Preconditions;
import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.beans.Transient;

/**
 * @author shisl
 * @package cn.hanghui.outapi.platform.tenant.entity.enums
 * @class InterfaceTypeEnum
 * @date 2024/1/17 下午1:36
 * @description
 */
@Getter
@AllArgsConstructor
public enum InterfaceTypeEnum {

    RISK(0, "自然人⻛险评分查询接口"),
    RECURRENT_POPULATION(1, "流动人口自主申报"),
    QUERY_USER_INFO(2, "公安网用户信息查询");

    public static InterfaceTypeEnum findByCode(Integer code) {
        if (Preconditions.isBlank(code)) {
            return null;
        }
        for (InterfaceTypeEnum enumObject : values()) {
            if (enumObject.code == code.intValue()) {
                return enumObject;
            }
        }
        return null;
    }

    private Integer code;
    private String desc;


}
