package com.sckw.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @desc: 订单类型枚举
 * @author: yzc
 * @date: 2023-09-11 11:51
 */
@Getter
@AllArgsConstructor
public enum OrderTypeEnum {

    PURCHASE_ORDER(1, "采购订单"),
    SALE_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;
    }
}
