package com.dji.sample.manage.model.enums;

/**
 * @author hqjiang
 * @version 1.0
 * @date 2024/6/25
 */
public enum LogOprTypeEnum {

    BIND(1, "绑定"),

    UNBIND(2, "解绑"),

    DEL(3, "删除设备");

    private int val;

    private String desc;

    LogOprTypeEnum(int val, String desc) {
        this.val = val;
        this.desc = desc;
    }

    public int getVal() {
        return this.val;
    }

    public String getDesc() {
        return this.desc;
    }

    public static LogOprTypeEnum find(int val) {
        if (val == BIND.val) {
            return BIND;
        }
        if (val == UNBIND.val) {
            return UNBIND;
        }
        if (val == DEL.val) {
            return DEL;
        }
        return null;
    }
}
