package com.iformall.enums;

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

    // 0-未支付;1-已分账;2:已人工分账;

    NOT_PAY(0, "未支付,开始记录"),
    PS_SHARED(1, "已分账"),
    MANUAL_PAY(2, "已人工分账"),
    PREV_PAY(10, "预支付(POS短期内占用)"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
