package app.closer.data.local.converters

import androidx.room.TypeConverter

class Converters {
    @TypeConverter
    fun fromStringList(value: List<String>?): String? {
        return value?.toString()
    }

    @TypeConverter
    fun toStringList(value: String?): List<String>? {
        return value?.takeIf { it != "[]" }?.drop(1)?.dropLast(1)?.split(", ")?.map { it.trim() }
    }
}
