package com.yeejoin.amos.patrol.common.enums;

public enum WorkFlowDefinitionKeyEnum {

    设备设施风险评级("设备设施风险评级", "1", "A"),
    隐患治理流程("隐患治理流程", "2", "B"),
    作业活动风险评级("作业活动风险评级", "3", "C"),
    风险研判评审("风险研判评审", "4", "G");

    private String desc;

    private String key;

    private String processDefinitionKey;

    WorkFlowDefinitionKeyEnum(String desc, String key, String processDefinitionKey) {
        this.desc = desc;
        this.key = key;
        this.processDefinitionKey = processDefinitionKey;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getProcessDefinitionKey() {
        return processDefinitionKey;
    }

    public void setProcessDefinitionKey(String processDefinitionKey) {
        this.processDefinitionKey = processDefinitionKey;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public static WorkFlowDefinitionKeyEnum getByKey(String key) {
        for (WorkFlowDefinitionKeyEnum w : WorkFlowDefinitionKeyEnum.values()) {
            if (key.equals(w.key)) {
                return w;
            }
        }
        return null;
    }
}
