package com.sckw.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @desc: 订单来源枚举
 * @author: yzc
 * @date: 2023-09-18 15:42
 */
@Getter
@AllArgsConstructor
public enum OrderSourceEnum {

    PURCHASE("1", "采购下单"),
    SALE("2", "代客下单");

    private final String type;

    private final String label;

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