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

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

/**
 * 员工年度贡献综合评价积分-项目
 * @author W.Y.C
 * @date 2025/10/14 10:35
 * @version 1.0
 */
public enum ScoreIteMrankEnum {
    /**一等奖*/
    FIRST_PRIZE("01-1", "一等奖"),
    /**二等奖*/
    SECOND_PRIZE("01-2", "二等奖"),
    /**三等奖*/
    THIRD_PRIZE("01-3", "三等奖"),
    /**第一名*/
    FIRST_PLACE("02-1", "第一名"),
    /**第二名*/
    SECOND_PLACE("02-2", "第二名"),
    /**第三名*/
    THIRD_PLACE("02-3", "第三名");



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

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

    private final String code;
    private final String name;

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

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



    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

}
