package com.hai.openApi.type;

import com.hai.enum_type.DeviceTypeEnum;
import com.hai.order.type.OrderProductType;

import java.util.Objects;

public enum OperatorTypeEnum {
    type1(1, "电信运营商"),
    type2(2, "移动运营商"),
    type3(3, "联通运营商"),
    ;
    private Integer type;

    private String name;

    OperatorTypeEnum(int type, String name) {
        this.type = type;
        this.name = name;
    }

    public static OperatorTypeEnum getDataByType(Integer type) {
        for (OperatorTypeEnum ele : values()) {
            if(Objects.equals(type,ele.getType())) return ele;
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

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