package ink.wgink.module.file.service.v2;

import ink.wgink.module.file.enums.UploadTypeEnum;
import ink.wgink.module.file.pojo.dtos.FileUploadSuccessDTO;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * @ClassName: IFileV2Service
 * @Description: 文件V2
 * @Author: wanggeng
 * @Date: 2022/4/13 16:15
 * @Version: 1.0
 */
public interface IFileV2Service {

    /**
     * 单文件上传
     *
     * @param uploadFile     上传文件
     * @param uploadTypeEnum 上传类型
     * @param requestParams  请求参数
     * @return
     */
    FileUploadSuccessDTO uploadSingle(MultipartFile uploadFile, UploadTypeEnum uploadTypeEnum, Map<String, Object> requestParams);

    /**
     * 单文件上传
     *
     * @param token          token
     * @param uploadFile     上传文件
     * @param uploadTypeEnum 上传类型
     * @param requestParams  请求参数
     * @return
     */
    FileUploadSuccessDTO uploadSingleByToken(String token, MultipartFile uploadFile, UploadTypeEnum uploadTypeEnum, Map<String, Object> requestParams);

    /**
     * 单文件上传
     *
     * @param userId         用户ID
     * @param uploadFile     上传文件
     * @param uploadTypeEnum 上传类型
     * @param requestParams  请求参数
     * @return
     */
    FileUploadSuccessDTO uploadSingleByUserId(String userId, MultipartFile uploadFile, UploadTypeEnum uploadTypeEnum, Map<String, Object> requestParams);

}
