package jnpf.model.cultivate.v2.enums;

import lombok.Getter;

/**
 * 带教审批枚举
 *
 * @author yanwenfu
 * @create 2026-03-04
 */
@Getter
public enum ApproveEnum {

    /** 待审核 */
    WAIT(0, "待审核"),

    /** 通过 */
    PASS(1, "通过"),

    /** 不通过 */
    FAIL(2, "不通过"),
    ;

    private final Integer code;
    private final String description;

    ApproveEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    public static ApproveEnum getByCode(Integer code) {
        for (ApproveEnum approveEnum : values()) {
            if (approveEnum.getCode().equals(code)) {
                return approveEnum;
            }
        }
        return null;
    }
}
