package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 检查任务单状态枚举
 */
@Getter
@AllArgsConstructor
public enum CheckTaskStatusEnum {

    PENDING_EXECUTION("PENDING_EXECUTION", "未开始"),
    COMPLETED("COMPLETED", "已结束"),
    IN_PROGRESS("IN_PROGRESS", "进行中");

    private final String code;
    private final String desc;

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

}
