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 HhFaceFuncConfigEnum {

    IS_OPEN_AGE_LIMIT("IS_OPEN_AGE_LIMIT", "是否开启年龄限制"),
    IS_PUSH_GM("IS_PUSH_GM", "是否推送门磁信号"),
    PUSH_FAILED_RECORD_SWITCH("PUSH_FAILED_RECORD_SWITCH", "是否推送失败记录"),
    ;

    private String code;
    private String desc;

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

}
