package com.sckw.transport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @desc: 物流订单类型枚举
 * @author: lfdc
 * @date: 2023-09-11 11:51
 */
@Getter
@AllArgsConstructor
public enum OrderTypeEnum {
    CONSIGN_ORDER(1, "托运订单"),
    ACCEPT_CARRIAGE_ORDER(2, "承运订单"),

    ;

    private final Integer type;

    private final String label;

    public static String getLabel(Integer type) {
        for (OrderTypeEnum ele : OrderTypeEnum.values()) {
            if (ele.getType().equals(type)) {
                return ele.getLabel();
            }
        }
        return null;
    }
}
