package com.ruoyi.cai.enums.user;

import lombok.Getter;

@Getter
public enum UserErrorLogType {
    SCREEN_SHOT(1,"截屏"),
    SCREEN_RECORDING(2,"录屏"),
            ;

    private final Integer code;
    private final String name;

    UserErrorLogType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static UserErrorLogType getByCode(Integer type) {
        UserErrorLogType[] values = values();
        for (UserErrorLogType value : values) {
            if(value.getCode().equals(type)){
                return value;
            }
        }
        return null;
    }
}
