package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 检查项明细类型枚举
 */
@Getter
@AllArgsConstructor
public enum CheckProjectItemTypeEnum {

    CHECK_RECORDS("CHECK_RECORDS", "检查记录"),
    CHECK_TASK("CHECK_TASK", "检查任务"),
    CHECK_CORRECTION("CHECK_CORRECTION", "问题整改");

    private final String code;
    private final String info;

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