package com.ycwl.basic.storage.enums;

import lombok.Getter;

public enum StorageType {
    LOCAL("LOCAL"),
    AWS_OSS("AWS_OSS"),
    ALI_OSS("ALI_OSS");

    @Getter
    private final String type;

    StorageType(String type) {
        this.type = type;
    }

    public static StorageType getStorageType(String type) {
        for (StorageType storageType : StorageType.values()) {
            if (storageType.getType().equals(type)) {
                return storageType;
            }
        }
        return null;
    }
}
