package com.engine.recruit.enums;

/**
 * @author:dxfeng
 * @createTime: 2023/09/27
 * @version: 1.0
 */
public enum ApplicationStatusEnum {
    /**
     * 应聘状态
     */
    DISTRIBUTION("待分配", "0"),
    CANDIDATE("候选中", "1"),
    ARCHIVED("已归档", "2"),
    OBSOLETE("已淘汰", "3");

    ApplicationStatusEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public static ApplicationStatusEnum getStatus(String value) {
        for (ApplicationStatusEnum item : ApplicationStatusEnum.values()) {
            if (item.value.equalsIgnoreCase(value)) {
                return item;
            }
        }
        throw new RuntimeException("不支持的应聘状态");
    }

    private String name;
    private String value;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
