package com.fs.his.enums;

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

import java.util.stream.Stream;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum PushLogDesTypeEnum {
    ORDER_UN_PAY(0,"订单未支付"),
    ORDER_SUCCESS_PAY(1,"订单支付成功"),
    ORDER_SEND(2,"订单已发货"),
    ORDER_DISPATCH(3,"订单派送中"),
    ORDER_SIGN(4,"订单已签收"),
    HEALTH_RECEIVE(5,"接诊提醒"),
    IM_MSG(6,"消息提醒"),
    STUDY_COURSE(7,"课程学习提醒"),
    MARKET_PUSH(8,"营销推送提醒");




    private Integer value;
    private String desc;

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