package cn.com.qmth.stmms.common.enums;

public enum LogType {

    QUERY("查询", 1), ADD("新增", 2), UPDATE("更新", 3), DELETE("删除", 4), IMPORT_FILE("导入", 5), EXPORT("导出", 6);

    private String name;

    private int value;

    private LogType(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static LogType findByValue(int value) {
        LogType type = null;
        for (LogType s : LogType.values()) {
            if (s.getValue() == value) {
                type = s;
                break;
            }
        }
        return type;
    }
}
