package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 考核指标表奖罚类型枚举
 */
@Getter
@AllArgsConstructor
public enum BasePerformanceIndicatorRewardPunishmentTypeTypeEnum {

    PUNISHMENT("PUNISHMENT", "惩罚"),
    REWARD("REWARD", "奖励"),
    OTHER("OTHER", "其他");

    private final String code;
    private final String desc;

    public static BasePerformanceIndicatorRewardPunishmentTypeTypeEnum getByCode(String code) {
        for (BasePerformanceIndicatorRewardPunishmentTypeTypeEnum itemEnum : values()) {
            if (itemEnum.getCode().equals(code)) {
                return itemEnum;
            }
        }
        return null;
    }

}
