package com.fs.his.enums;

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

import java.util.stream.Stream;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum FsExtractTypeEnum {

    WEIXIN("weixin","微信"),
    ALIPAY("alipay","支付宝"),
    BANK("bank","银行卡");

    private String value;
    private String desc;

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