package com.gh.gamecenter.room.converter;

import androidx.room.TypeConverter;

import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.gamecenter.entity.SignEntity;

/**
 * Created by khy on 17/04/18.
 */

public class SignDataConverter {

    @TypeConverter
    public static String toSignDataString(SignEntity.Data data) {
        return GsonUtils.toJson(data);
    }

    @TypeConverter
    public static SignEntity.Data toSignData(String token) {
        return GsonUtils.fromJson(token, SignEntity.Data.class);
    }

}
