package com.gh.vspace.db

import androidx.room.TypeConverter
import com.gh.gamecenter.core.utils.GsonUtils
import com.lightgame.download.DownloadEntity

class VGameConverter {

    @TypeConverter
    fun convertDownload2String(any: DownloadEntity): String {
        return GsonUtils.toJson(any)
    }

    @TypeConverter
    fun convertString2DownloadEntity(string: String): DownloadEntity {
        return GsonUtils.fromJson(string, DownloadEntity::class.java)
    }

}