package com.njcn.gather.device.pojo.enums;

import lombok.Getter;

/**
 * @author caozehui
 * @data 2024-12-12
 */
@Getter
public enum DevReportStateEnum {
    NOT_GENERATED("未生成", 0),
    GENERATED("已生成", 1),
    GENERATED_UPLOADED("已生成且已上传", 3),
    UNCHECKED("未检", 2);

    private final Integer value;
    private final String msg;

    DevReportStateEnum(String msg, Integer value) {
        this.msg = msg;
        this.value = value;
    }

    public static String getMsgByValue(Integer value) {
        for (CheckStateEnum state : CheckStateEnum.values()) {
            if (state.getValue().equals(value)) {
                return state.getMsg();
            }
        }
        return null;
    }
}
