package com.kcim.common.enums;

import java.util.Objects;

/**
 * 消息枚举
 */
public enum NoticeBusinessEnum {
    CHECK_PLAN(1, "查核计划"),
    IMPROVE_TASK(2, "改善任务"),
    SITUATION_DETAIL(3, "情境详情"),
    ;

    private Integer key;

    private String value;

    NoticeBusinessEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public Integer getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getByCode(Integer key) {
        for (NoticeBusinessEnum jobUserTypeEnum : NoticeBusinessEnum.values()) {
            if (Objects.equals(key, jobUserTypeEnum.key)) {
                return jobUserTypeEnum.value;
            }
        }
        return null;
    }
}
