package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 考核指标表事/病假类型枚举
 */
@Getter
@AllArgsConstructor
public enum BasePerformanceIndicatorLeaveTypeEnum {

    PERSONAL_LEAVE("PERSONAL_LEAVE", "事假"),
    SICK_LEAVE("SICK_LEAVE", "病假"),
    PERSONAL_SICK_LEAVE("PERSONAL_SICK_LEAVE", "事/病假");

    private final String code;
    private final String desc;

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

}
