package com.iformall.enums;

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

    // 1-核销成功消息, 2-核销失败消息

    VERIFY_SUCCESS(1, "核销成功消息"),
    VERIFY_FAIL(2, "核销失败消息"),
    AUDIT_MESSAGE(3, "审核结果通知")
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
