package com.enums;

import java.util.Arrays;

/**
 * Enum - 附件类型
 *
 */
public enum MemberAuthTypeEnum {
    WEIXIN(1, "微信"),
    MOBILE(2, "手机号");
    public Integer value;
    public String name;

    MemberAuthTypeEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

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

    public static MemberAuthTypeEnum getByValue(Byte value) {
        for (MemberAuthTypeEnum type : MemberAuthTypeEnum.values()) {
            if (type.value.equals(value)) {
                return type;
            }
        }
        return null;
    }
}
