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

import lombok.Getter;

/**
 * @author caozehui
 * @data 2024-12-14
 */
@Getter
public enum TimeCheckResultEnum {
    NOT_QUALIFY(0, "不合格"),
    QUALIFY(1, "合格"),
    UNKNOWN(2, "/");

    private final Integer value;
    private final String msg;

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

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