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

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

/**
 * @author shisl
 * @package cn.hanghui.outapi.platform.tenant.entity.enums
 * @class HhFaceSystemConfigEnum
 * @date 2024/7/1 下午2:26
 * @description 系统配置
 */
@Getter
@AllArgsConstructor
public enum HhFaceSystemConfigEnum {

    M_PASSWORD("M_PASSWORD", "设备管理员密码"),
    VOLUME("VOLUME", "语音音量(1~100)"),
    HIDE_NAVIGATION_BAR("HIDE_NAVIGATION_BAR", "隐藏底部导航栏"),
    FORBID_PULL_DOWN("FORBID_PULL_DOWN", "禁止下拉通知栏"),
    AUTO_LAUNCH("AUTO_LAUNCH", "应用是否自启动"),
    SCHEDULED_RESTART("SCHEDULED_RESTART","是否开启定时重启"),
    HOME_PAGE_URL("HOME_PAGE_URL", "首页图片配置"),
    TRANSITION_PAGE_URL("TRANSITION_PAGE_URL", "过渡页图片配置"),
    SCAN_FACE_FAILED_PAGE_URL("SCAN_FACE_FAILED_PAGE_URL", "刷脸失败结果页图片配置");

    private String code;
    private String desc;

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

}
