package com.skr.mdm.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum CmdAdminEnum {

    SEND_MSG("sendMsg", "推送通知", 1),
    SEND_FORCE_MSG("forceSendMsg", "推送强制通知", 4),
    RING_BELL("ringBell", "推送铃声", 1),
    LOCK_SCREEN("lockScreen", "锁屏", 1),
    UNLOCK_SCREEN("unlockScreen", "解锁", 2),
    CHANGE_SAFETY_SCOPE("changeSafetyScope", "切换安全域", 3),
    FLOW_CONTROLLER("flowController", "流量阈值", 2),
    TASK_PHOTO("takePhoto", "拍照", 1),
    SCREE_CAPTURE("screenCapture", "截屏", 2),
    ROLL_CALL("rollCall", "点名", 2),
    LOSS_EQ_CLEAR_DATA("lossEqClearData", "设备丢失(擦除设备数据)", 1),
    LOSS_EQ_DATA("lossEqData", "设备丢失(不擦除设备数据)", 2),
    BACK_EQ("backEq", "设备找回", 3),
    RESTORE_FACTORY("restoreFactory", "淘汰设备擦除全部数据", 4),
    SET_LOCATION_TIME("setLocationTimeInterval", "设置回传", 3),
    OPEN_MOBILE_DATA("openMobileData", "开启移动数据", 0),
    ONLY_RESTORE_FACTORY("onlyRestoreFactory", "恢复出厂设置", 0),
    WECHAT_UPLOAD_PERIOD("wechatUploadPeriod", "设置微信QQ回传时间", 5),
    OFFLINE_WARN_PERIOD("offlineWarnPeriod", "设置脱控离线时间", 6),
    SHUTDOWN("shutdown", "关机", 4),
    ;

    private String cmd;
    private String cmdName;
    private Integer cmdValue;

    public static CmdAdminEnum getValue(String value) {
        for (CmdAdminEnum cmdAdminEnum : values()) {
            if (cmdAdminEnum.cmd.equals(value)) {
                return cmdAdminEnum;
            }
        }
        return null;
    }
}
