package com.hfkj.sysenum;

import java.util.Objects;

/**
 * 结算类型
 * @author hurui
 */

public enum MerOnlineType {
    type1(1, "APP"),
    type2(2, "网站"),
    type3(3, "公众号/小程序/服务窗"),
    ;

    private Integer number;

    private String name;


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

    public static MerOnlineType getDataByNumber(Integer number) {
        for (MerOnlineType 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;
    }

}
