package com.hfkj.sysenum;

import java.util.Objects;

/**
 * 商户类型
 * @author hurui
 */
public enum MerTypeEnum {
    status1(1, "个体商户", "SUBJECT_TYPE_INDIVIDUAL"),
    status2(2, "企业商户", "SUBJECT_TYPE_ENTERPRISE"),
    status3(3, "小微商户", ""),
    ;

    private Integer number;

    private String name;

    private String wxCode;

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

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

    public String getWxCode() {
        return wxCode;
    }

    public void setWxCode(String wxCode) {
        this.wxCode = wxCode;
    }
}
