package com.iformall.enums;

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

    //0:待发送1:发送中2:已发送3:发送失败4已作废
    PENDING(0, "待发送"),
    SENDING(1, "发送中"),
    HAS_SENT(2, "已发送"),
    SEND_FAILED(3, "发送失败")
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
