package com.engine.recruit.enums;

/**
 * @author:dxfeng
 * @createTime: 2023/09/28
 * @version: 1.0
 */
public enum CurrentApplicationStageEnum {

    /**
     * 当前操作阶段
     */
    SCREENING("初筛", "0"),
    WRITTEN("笔试", "1"),
    INTERVIEW("面试", "2"),
    EVALUATION("测评", "3"),
    SALARY("薪酬谈判", "4"),
    BACK("背调", "5"),
    offer("offer", "6"),
    EMPLOYMENT("待入职", "8"),
    ENTRY("入职", "9 ");

    CurrentApplicationStageEnum(String stageName, String stageValue) {
        this.stageName = stageName;
        this.stageValue = stageValue;
    }

    private String stageName;
    private String stageValue;

    public String getStageName() {
        return stageName;
    }

    public void setStageName(String stageName) {
        this.stageName = stageName;
    }

    public String getStageValue() {
        return stageValue;
    }

    public void setStageValue(String stageValue) {
        this.stageValue = stageValue;
    }

    public static CurrentApplicationStageEnum getOperateType(String operateType) {
        for (CurrentApplicationStageEnum item : CurrentApplicationStageEnum.values()) {
            if (item.stageValue.equalsIgnoreCase(operateType)) {
                return item;
            }
        }
        throw new RuntimeException("不支持的操作类型");
    }
}
