package com.iformall.enums;

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

    COUPON_ORDER_USED(1, "拼团中"),
    COUPON_ORDER_OVER_TIME(2, "拼团成功"),
    COUPON_ORDER_INVALID(3, "拼团超时"),
    CARD_USING(4, "拼团失败"),;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
