package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 检查结果枚举
 */
@Getter
@AllArgsConstructor
public enum CheckResultEnum {

    PASS("PASS", "通过"),
    FAIL("FAIL", "失败");

    private final String code;
    private final String desc;

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

}
