package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumSettleRecordWay {
    //清算方式 1现金2支付宝3微信4银行卡转账5其他
    M(1, "现金"),
    ZFB(2, "支付宝"),
    WEBCAT(3, "微信"),
    CARD(4, "银行卡转账"),
    OTHER(5, "其他"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
