package com.ruoyi.info.collection.enums;


/**
 * 录用状态枚举
 *
 * @author ruoyi
 */
public enum AdmitStatus {

    /** 录用 */
    ADMITTED("录用", "已录用该候选人"),

    /** 未录用 */
    NOT_ADMITTED("未录用", "未录用该候选人"),

    /** 放弃 */
    WITHDRAWN("放弃", "候选人放弃");

    private final String code;
    private final String desc;

    AdmitStatus(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    /**
     * 根据编码获取描述
     */
    public static String getDescByCode(String code) {
        for (AdmitStatus status : values()) {
            if (status.getCode().equals(code)) {
                return status.getDesc();
            }
        }
        return null;
    }
}
