package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumProfitSharingReceiverType {
    PROFIT_SHARING_RECEIVER_MERCHANT_ID(0, "MERCHANT_ID"),
    PROFIT_SHARING_RECEIVER_PERSONAL_WECHATID(1, "PERSONAL_WECHATID"),
    PROFIT_SHARING_RECEIVER_PERSONAL_OPENID(2, "PERSONAL_OPENID"),
    PROFIT_SHARING_RECEIVER_PERSONAL_SUB_OPENID(3, "PERSONAL_SUB_OPENID"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
