package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 问题整改单状态枚举
 */
@Getter
@AllArgsConstructor
public enum CheckCorrectionStatusEnum {

    PENDING_RECTIFICATION("PENDING_RECTIFICATION", "待整改"),
    UNDER_RECTIFICATION("UNDER_RECTIFICATION", "整改中"),
    RECTIFIED("RECTIFIED", "已整改");

    private final String code;
    private final String desc;

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

}
