package com.fs.store.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;

@Getter
@AllArgsConstructor
public enum AfterSalesStatusEnum {

    STATUS_0(0,"用户提交售后"),
    STATUS_1(1,"平台已审核"),
    STATUS_2(2,"用户已发货"),
    STATUS_3(3,"仓库已审核"),
    STATUS_4(4,"财务已审核"),
    STATUS_5(5,"用户取消售后"),
    STATUS_6(6,"平台取消售后");


    private Integer value;
    private String desc;

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

}
