package com.wall.photography.wallpaper.room

import androidx.room.TypeConverter
import com.google.gson.Gson
import com.wall.photography.wallpaper.data.Author

class AuthorTypeCovert {

    @TypeConverter
    fun getAuthor(value: String): Author {

        return Gson().fromJson(value, Author::class.java)
    }

    @TypeConverter
    fun authorToString(author: Author): String {
        return Gson().toJson(author)
    }
}