package com.fs.his.enums;

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

import java.util.stream.Stream;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum FsPackageOrderStatusEnum {
    STATUS_NE1(-1,"已取消"),
    STATUS_NE2(-2,"已退款"),
    STATUS_1(1,"待支付"),
    STATUS_2(2,"服务中"),
    STATUS_3(3,"已完成");




    private Integer value;
    private String desc;

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