package com.keystar.plane.inspection.enums;

import lombok.Getter;

public enum ResultEnum {

    COVERED("covered", "遮挡"),

    DIODEFAULT("diodeFault", "二极管故障");



    @Getter
    private final String code;

    @Getter
    private final String name;

    ResultEnum(String code, String name){
        this.code=code;
        this.name=name;
    }


    /**
     *  根据code获取图片异常的名字
     **/
    public static NestStatusEnum getNameByCode(String code){
        for (NestStatusEnum statusEnum : NestStatusEnum.values()){
            if (statusEnum.getCode().equals(code)){
                return statusEnum;
            }
        }
        return null;
    }
}
