package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumBillPayWay {
    CASH(1, "现金缴费"),
    ALIPAY(2, "支付宝缴费"),
    WECHAT_PAY(3, "微信缴费"),
    BANK(4, "银行卡转账缴费"),
    OTHER(-1, "其他缴费");

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
