package com.fs.his.enums;

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

import java.util.stream.Stream;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum FsInquiryOrderStatusEnum {
    STATUS_NE1(-1,"已取消"),
    STATUS_NE2(-2,"已退款"),
    STATUS_NE3(-3,"已拒单"),
    STATUS_1(1,"待支付"),
    STATUS_2(2,"待接诊"),
    STATUS_3(3,"问诊中"),
    STATUS_4(4,"已完成");




    private Integer value;
    private String desc;

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