package com.miya.fastcashier.net

import com.fastcashier.lib_common.function.account.SelfCashierAccountInfo
import com.fastcashier.lib_common.net.ApiConfig
import com.fastcashier.lib_common.net.BaseApi
import com.fastcashier.lib_common.net.BaseResponse
import com.miya.fastcashier.net.param.LoginParams
import okhttp3.MultipartBody
import retrofit2.Call
import retrofit2.http.*

/**
 * 请求地址配置
 */
interface MiyaApi : BaseApi {

    companion object {

        /**
         * 登录
         */
        const val LOGIN: String = "verify/auth/token"

        /**
         * 上传日志文件
         */
        var UPLOAD_LOG_FILE: String = "verify/r-log/upload-log-file"
    }

    @POST(LOGIN)
    fun login(@Body loginParams: LoginParams): Call<BaseResponse<SelfCashierAccountInfo>>

    @Multipart
    @POST
    fun uploadFile(@Url url: String?, @Part part: MultipartBody.Part): Call<BaseResponse<String>>
}