package com.fs.his.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.stream.Stream;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum PushLogTypeEnum {
    ORDER(0f,"订单通知"),
    ORDER_STORE(0.1f,"药品订单通知"),
    ORDER_PACKAGE(0.2f,"套餐包订单通知"),
    ORDER_INQUIRY(0.3f,"问诊订单通知"),
    ORDER_INTEGRAL(0.4f,"积分订单通知"),
    HEALTH(1f,"健康管理类通知"),
    MARKET(2f,"营销类通知"),
    COURSE(3f,"课程类通知");




    private Float value;
    private String desc;

    public static PushLogTypeEnum toType(int value) {
        return Stream.of(PushLogTypeEnum.values())
                .filter(p -> p.value == value)
                .findAny()
                .orElse(null);
    }
}
