package com.hz.pm.api.performance.enumration;

import java.util.Objects;

import org.apache.commons.lang3.StringUtils;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * RectifyAuditEnum
 * @return
 * @author CMM
 * @since 2023/07/26 16:44
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum RectifyAuditEnum {
    /**
     * 评价类型
     */
    APPROVED(1, "通过"),
    NOT_APPROVED(2, "不通过");

    private Integer code;
    private String desc;

    public static String getDesc(Integer code) {
        if (Objects.isNull(code)) {
            return StringUtils.EMPTY;
        }
        for (RectifyAuditEnum t : RectifyAuditEnum.values()) {
            if (code.equals(t.getCode())) {
                return t.desc;
            }
        }
        return StringUtils.EMPTY;
    }
}
