package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumAppType {

    // 1-B端, 2-C端, 3-服务号, 4-订阅号

    B(1, "B端"),
    C(2, "C端"),
    MP_S(3,"公众号-服务号"),
    MP_P(4, "公众号-订阅号"),
    ;

    public static EnumAppType getEnum(Integer code) {
        for (EnumAppType value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumAppType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
