package com.iformall.enums;


/**
 * @author Stormeye
 */

public enum EnumPosOrderStatus {

    PENDING_PAYMENT(0, "待付款"),
    PENDING(1, "支付中"),
    PAYMENT_SUCCESS(2, "已支付"),
    OVERTIME_CANCEL(3, "已取消"),
    PENDING_REFUND(4, "待退款"),
    REFUNDING(5, "退款中"),
    REFUND_SUCCESS(6,"已退款"),
    REFUND_FAILD(7, "退款失败"),
    PENDING_VERIFY(10, "待核销"),
    VERIFING(11, "核销中"),
    VERIFY_SUCCESS(12, "已核销"),
    VERIFY_CANCEL(13, "核销待退"),
    VERIFY_CANCELING(14, "核销退中"),
    VERIFY_CANCELED(15, "核销已退")
    ;


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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
