package com.dji.sample.media.model;

import lombok.Getter;

import java.util.Arrays;

/**
 * @author hqjiang
 * @version 1.0
 * @date 2024/7/2
 */
@Getter
public enum MediaTypeEnum {

    PIC_ORIGIN(1, "原图"),

    PIC_SHOT(2, "截图"),

    PIC_PANORAMA(3, "全景图"),

    VIDEO(4, "视频"),

    UNKNOWN(-1, "其他");

    int val;

    String text;

    MediaTypeEnum(int val, String text) {
        this.text = text;
        this.val = val;
    }

    public static MediaTypeEnum find(int val) {
        return Arrays.stream(MediaTypeEnum.values()).filter(statue -> statue.val == val).findAny().orElse(UNKNOWN);
    }
}
