package cn.iocoder.yudao.module.mes.controller.admin.ticketmanagement.enums;

import lombok.Getter;

@Getter
public enum InspectionResultEnum {
    OK(1, "OK"),
    NG(2, "NG");

    private final Integer code;
    private final String label;

    InspectionResultEnum(Integer code, String label) {
        this.code = code;
        this.label = label;
    }

    public static String getLabelByCode(Integer code) {
        for (InspectionResultEnum value : values()) {
            if (value.code.equals(code)) {
                return value.getLabel();
            }
        }
        return String.valueOf(code);
    }


}