package com.fs.qw.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;

@Getter
@AllArgsConstructor
public enum cdnDownloadTypeEnum {

    APP_THUMBNAIL(1,"小程序缩略图"),
    IMAGE(2,"高清图片"),
    THUMBNAIL(3,"缩略图"),
    VIDEO(4,"视频"),
    FILE(5,"文件"),
    VOICE(6,"语音");


    private Integer value;
    private String desc;
    public static cdnDownloadTypeEnum toType(Integer value) {
        return Stream.of(cdnDownloadTypeEnum.values())
                .filter(p -> p.value.equals(value))
                .findAny()
                .orElse(null);
    }
}
