package org.wcs.constant.enums.database;

import lombok.Getter;

/**
 * 电子标签任务点亮模式枚举类
 */
@Getter
public enum EtagTaskLightModelEnum {

    IMMEDIATELY(1, "立即点亮"),
    WAITING(2, "等待点亮");

    private final Integer code;
    private final String message;

    EtagTaskLightModelEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 校验是否是正确的枚举值
     * @param code 枚举值
     * @return 是否是正确的枚举值
     */
    public static  boolean isValid(Integer code) {
        for (EtagTaskLightModelEnum value : EtagTaskLightModelEnum.values()) {
            if (value.code.equals(code)) {
                return true;
            }
        }
        return false;
    }
}
