package com.cf.imes.module.executor.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单导入临时表类型枚举
 *
 * @author Gqr
 * @since 2025/1/8 16:20
 */
@Getter
@AllArgsConstructor
public enum OrderImportTmpDataTypeEnum {
    ORDER(0),
    BODY(1),
    GROUP(2),
    GOODS(3),
    PLATE(4),
    PART(5),
    PART_EDGING(6),
    PART_HARDWARE(7),
    PART_ASSEMBLY(8),
    PART_REMARK(9);

    private int type;

    /**
     * 是否匹配
     *
     * @param type
     * @return
     */
    public static OrderImportTmpDataTypeEnum match(int type) {
        for (OrderImportTmpDataTypeEnum typeEnum : OrderImportTmpDataTypeEnum.values()) {
            if (typeEnum.type == type) {
                return typeEnum;
            }
        }
        return null;
    }
}