package com.sckw.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @desc: 订单地址类型枚举
 * @author: yzc
 * @date: 2023-09-18 15:42
 */
@Getter
@AllArgsConstructor
public enum OrderAddressTypeEnum {

    LOAD("1", "装货地址"),
    UNLOAD("2", "卸货地址");

    private final String type;

    private final String label;

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