package com.engine.recruit.enums;

/**
 * @author:dxfeng
 * @createTime: 2023/09/27
 * @version: 1.0
 */
public enum ApplicantOperateEnum {

    /**
     * 应聘者相关操作类型
     */
    ELIMINATE("eliminate", "淘汰"),
    REFERRAL("referral", "转推其他职位"),
    TRANSFER("transfer", "转移阶段"),
    ASSIGN("assign", "分配职位"),
    ARCHIVE("archive", "归档人才库"),
    ;

    ApplicantOperateEnum(String operateType, String operateDesc) {
        this.operateType = operateType;
        this.operateDesc = operateDesc;
    }

    private String operateType;
    private String operateDesc;

    public String getOperateType() {
        return operateType;
    }

    public void setOperateType(String operateType) {
        this.operateType = operateType;
    }

    public String getOperateDesc() {
        return operateDesc;
    }

    public void setOperateDesc(String operateDesc) {
        this.operateDesc = operateDesc;
    }

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