package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 检查模块人员明细类型枚举
 */
@Getter
@AllArgsConstructor
public enum CheckUserTypeEnum {

    CHECK_DOCUMENT("CHECK_DOCUMENT", "检查单检查人"),
    INSPECT_RECORD("INSPECT_RECORD", "检查记录责任人"),
    INSPECT_RECORDS_INSPECTION_ITEM_DETAILS("INSPECT_RECORDS_INSPECTION_ITEM_DETAILS", "检查记录检查项明细"),
    PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS("PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS", "问题整改检查项明细");

    private final String code;
    private final String info;

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