package com.develop.common.data_repo.net.model.request

import com.blankj.utilcode.util.AppUtils
import com.develop.base.ext.genMultipartBody
import com.develop.base.ext.getSN
import com.develop.common.data_repo.FoodDataProvider
import okhttp3.RequestBody

object DeviceInfoBody {
    fun genDeviceInfoBody(
    ): RequestBody {
        val v = FoodDataProvider.getUserDatabase().devConfigDao().recipeVersion()
        val recipeUpdateTime: Long = v?.recipeUpdateTime ?: 0
        val map = HashMap<String, String>()
        map["apkVersin"] = AppUtils.getAppVersionName()
        map["sn"] = getSN()
        map["recipeUpdateTime"] = recipeUpdateTime.toString()
        return map.genMultipartBody()
    }
}