package com.sckw.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

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

    PURCHASE("1", "采购单位"),
    SALE("2", "销售单位");

    private final String type;

    private final String label;

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