package com.hfkj.sysenum.fileRecords;


import lombok.Getter;

import java.util.Objects;

@Getter
public enum FileRecordsEnum {
    /**
     * 实物订单
     */
    status1(1, "实物订单"),

    /**
     * 虚拟订单
     */
    status2(2, "虚拟产品订单"),

    /**
     * 肯德基订单
     */
    status3(3, "肯德基订单"),

    /**
     * 星巴克订单
     */
    status4(4, "星巴克订单"),

    /**
     * 财务对账订单
     */
    status5(5, "财务对账订单"),

    /**
     * 物流订单上传订单
     */
    status6(6, "物流订单上传订单"),

    status7(7, "物流订单下载订单"),
    ;

    private final int code;

    private final String name;


    FileRecordsEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static FileRecordsEnum getData(Integer type) {
        for (FileRecordsEnum ele : values()) {
            if (Objects.equals(type,ele.getCode())) return ele;
        }
        return null;
    }
}
