package com.ltgk.common.enums;

import lombok.Getter;

/**
 * @Author: w1826
 * @Description: 进出港审核状态
 * @Date: 2024/12/27 10:16
 * @Version: 1.0
 */
@Getter
public enum EnterOutPortStatus {
    UN_CONFIRM(0, "未审核"),
    PASS(1, "已通过"),
    REFUSE(2, "已拒绝");
    private final Integer code;
    private final String desc;

    EnterOutPortStatus(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getByCode(Integer code) {
        for (EnterOutPortStatus status : EnterOutPortStatus.values()) {
            if (status.getCode().equals(code)) {
                return status.getDesc();
            }
        }
        return null;
    }
}
