package com.remax.visualnovel.manager.login

import com.remax.visualnovel.entity.response.User
import com.remax.visualnovel.repository.mmkv.UserLocalRepository


/**
 * Created by HJW on 2023/3/17
 *
 * 登录要保存/读取的相关数据
 */
class LoginInfoSave {

    /**
     * 保存登录的user
     */
    fun putUser(user: User?) {
        UserLocalRepository.localUser = user
    }

    fun getUser() = UserLocalRepository.localUser

    /**
     * 保存token
     */
    fun putToken(token: String?) {
        UserLocalRepository.token = token ?: ""
    }

    fun getToken(): String {
        return UserLocalRepository.token
    }


}