package com.za.common.log

import io.reactivex.rxjava3.core.Observable
import okhttp3.MultipartBody
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Query

interface LogService {
    //日志上传
    @Multipart
    @POST("/oss/minio/upload")
    fun uploadLog(
        @Part file: MultipartBody.Part?,
        @Query("fileName") fileName: String?,
        @Query("bucketName") bucketName: String?
    ): Observable<LogBaseResponse<String>>
}

data class LogBaseResponse<T : Any>(
    val data: T?,
    val msg: String?,
    val success: Boolean?,
    val code: Int?,
    val total: Int?,
)