package nckd.jxccl.base.common.enums.psms;

import java.util.HashMap;
import java.util.Map;


/**
* 职位序列-枚举
* @author W.Y.C
* @date 2025/9/12 14:31
* @version 1.0
*/
public enum JobSeqEnum {

    /** 技术序列 */
    TECHNICALS("01", "技术序列"),
    /** 职能序列 */
    FUNCTIONAL("02", "职能序列"),
    /** 技能序列 */
    SKILL("03", "技能序列"),
    /** 管理序列 */
    MANAGE("04", "管理序列");

    private static final Map<String, JobSeqEnum> CODE_MAP = new HashMap<>();

    static {
        for (JobSeqEnum value : JobSeqEnum.values()) {
            CODE_MAP.put(value.code, value);
        }
    }

    private final String code;
    private final String name;

    JobSeqEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * 根据编码获取枚举
      * @param code
     * @return: nckd.jxccl.base.common.enums.JobSeqEnum
     * @author W.Y.C
     * @date: 2025/09/12 14:33
     */
    public static JobSeqEnum getByCode(String code) {
        if (code == null) {
            return null;
        }
        return CODE_MAP.get(code);
    }


    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
