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

import cn.hanghui.outapi.platform.common.utils.Preconditions;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum HhFaceThirdConfigEnum {

    USE_LINKAGE("USE_LINKAGE","是否启用核验接口"),
    AUTH_VERIFIED_FACEIN("AUTH_VERIFIED_FACEIN","启用匿名入库接口"),
    TENANT_SWITCH("TENANT_SWITCH","启用商户平台接口"),
    SPECIAL_CODE_SWITCH("SPECIAL_CODE_SWITCH","启用三要素获取特殊码接口"),
            ;

    private String code;
    private String desc;

    public static HhFaceThirdConfigEnum findByCode(String code) {
        if (Preconditions.isBlank(code)) {
            return null;
        }
        for (HhFaceThirdConfigEnum enumObject : values()) {
            if (enumObject.code.equals(code)) {
                return enumObject;
            }
        }
        return null;
    }

    }
