package com.iformall.enums;

/**
 * Created by Stormeye on 2019/09/17.
 */
public enum EnumCouponPasswordStatus {


    INIT(0, "初始"),
    MSG_SENDING(1, "消息发送中"),
    MSG_SENDED(2, "消息已发送"),
    USED(3, "已使用"),
    CANCEL(4, "已作废");

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
