package cn.iocoder.yudao.module.bpm.enums;

/**
 * 流程标识枚举
 */
public enum ProcessKeyEnum {

    OA_UNIVERSAL("oa_universal", "通用事项"),
    OA_ENTRY("oa_entry", "入职"),
    OA_CONVERSION("oa_conversion", "转正"),
    OA_RENEW("oa_renew", "续签"),
    OA_TURNOVER("oa_turnover", "离职"),
    OA_LEAVE("oa_leave", "请假"),
    OA_BUSINESS("oa_business", "出差"),
    OA_OUT("oa_out", "公务外出"),
    OA_RECEIVE("oa_receive", "领用"),
    OA_PURCHASE("oa_purchase", "采购"),
    OA_EXPENSE("oa_expense", "报销"),
    OA_STAMP("oa_stamp", "用印"),
    ;

    private final String processKey;
    private final String processName;

    ProcessKeyEnum(String processKey, String processName) {
        this.processKey = processKey;
        this.processName = processName;
    }

    public String getProcessKey() {
        return processKey;
    }

    public String getProcessName() {
        return processName;
    }

    public static String getByProcessKey(String processKey) {
        for (ProcessKeyEnum value : values()) {
            if (value.getProcessKey().equals(processKey)) {
                return value.processName;
            }
        }
        return "";
    }
}
