package com.fs.event;


import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;


/**
 * 模板监听枚举
 */
@Getter
@AllArgsConstructor
public enum TemplateListenEnum {
    TYPE_1("1","订单取消通知"),
    TYPE_2("2","接单通知"),
    TYPE_3("3","待支付推送套餐包"),
    TYPE_4("4","随访创建咨询"),
    TYPE_5("5","医生回复咨询");
    private String value;
    private String desc;

    public static TemplateListenEnum toType(String value) {
        return Stream.of(TemplateListenEnum.values())
                .filter(p -> p.value.equals(value))
                .findAny()
                .orElse(null);
    }
}
