package com.multictrl.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum DJIImage {
    DJI("DJI", "source-material/dji.png"),
    DOCK1("DJI Dock1", "source-material/dock1.png"),
    DOCK2("DJI Dock2", "source-material/dock2.png"),
    DOCK3("DJI Dock3", "source-material/dock3.png");

    private final String name;
    private final String imageUrl;

    //根据名称获取图片地址
    public static String getImageUrlByName(String name) {
        for (DJIImage djiImage : DJIImage.values()) {
            if (djiImage.getName().equals(name)) {
                return djiImage.getImageUrl();
            }
        }
        return null;
    }
}
