package com.hfkj.sysenum;

import java.util.Objects;

/**
 * 平台类型
 * @author hurui
 */
public enum PlatformTypeEnum {
    type0(0, "惠支付"),
    type1(1, "拉卡拉"),
    type2(2, "国通"),
    type3(3, "建行"),
    type4(4, "微信"),
    type5(5, "随行付"),
    ;


    private Integer number;

    private String name;

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

    public static PlatformTypeEnum getDataByNumber(Integer number) {
        for (PlatformTypeEnum ele : values()) {
            if (Objects.equals(number,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;
    }
}
