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

import lombok.Getter;

/**
 * @author caozehui
 * @data 2024-12-12
 */
@Getter
public enum CheckResultEnum {
    NOT_ACCORD("不符合", 0),
    ACCORD("符合", 1),
    UNCHECKED("未检", 2);

    private final Integer value;
    private final String msg;

    CheckResultEnum(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;
    }
}
