package com.kcim.common.enums;

import java.util.Objects;

/**
 * 权限枚举
 */
public enum NoticeTemplateEnum {
    CHECK_PLAN("CHECK_PLAN", "查核计划提醒"),
    IMPROVE_START("IMPROVE_START", "改善通知提醒"),
    IMPROVE_REPLY("IMPROVE_REPLY", "改善回复提交"),
    IMPROVE_ASSIGN("IMPROVE_ASSIGN", "改善任务指派"),
    APPLY_REASSIGN("APPLY_REASSIGN", "申请更换改善人"),
    DISAPPROVAL("DISAPPROVAL", "不认可提醒"),
    REJECT_REASSIGN("REJECT_REASSIGN", "驳回申请更换改善人"),
    RESEND("RESEND", "重新发送改善通知"),
    APPROVED_PLAN("APPROVED_PLAN", "通过改善计划"),
    REJECT("REJECT", "驳回计划方案"),
    SUBMIT_PLAN("SUBMIT_PLAN", "提交改善计划"),
    SUBMIT_PDCA("SUBMIT_PDCA", "提交改善方案"),
    APPROVED_PDCA("APPROVED_PDCA", "通过改善方案"),
    IMPROVE_FINISHED("IMPROVE_FINISHED", "改善结案"),
    ALL_RESTART("ALL_RESTART", "改善重新开始")

    ;

    private String key;

    private String value;

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

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

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