package com.hai.order.type;

import java.util.Objects;

/**
 * 子订单状态
 * @className: OrderChildGoodsType
 * @author: HuRui
 * @date: 2022/8/24
 **/
public enum RechargePlatformType {
    STATUS0(0, "未知"),
    STATUS1(1, "尖椒"),
    STATUS2(2, "龙阅"),
    STATUS3(3, "城宇"),
    STATUS4(4, "畅停"),
    STATUS100(100, "手动"),
            ;

    private Integer number;

    private String name;

    RechargePlatformType(int number, String name) {
        this.number = number;
        this.name = name;
    }

    /**
     * 根据类型查询数据
     * @param type
     * @return
     */
    public static RechargePlatformType getDataByType(Integer type) {
        for (RechargePlatformType ele : values()) {
            if(Objects.equals(type,ele.getNumber())) return ele;
        }
        return null;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
